Skip to content

foresight_figure ​

foresight_figure, a figure: page, font and a grid of plot panels, driven by a gnuplot-like API.

Every method mirrors a gnuplot command (plot, set title, set xrange, set logscale, set multiplot, ...) so that the command line interpreter maps one-to-one onto this API. Settings and plots apply to the current panel; a figure has one panel unless set_multiplot lays out a grid, filled panel by panel with next_panel.

fortran
 type(figure_object) :: fig
 real(R8P)           :: x(3), y(3)
 x = [1.0_R8P, 2.0_R8P, 3.0_R8P]
 y = x**2
 call fig%set_title('parabola')
 call fig%plot(x, y, title='x^2', with='linespoints')
 call fig%save('parabola.svg')

Source: src/lib/foresight_figure.F90

Dependencies

Contents ​

Variables ​

NameTypeAttributesDescription
PADreal(kind=R8P)parameterOuter padding [px].
GAPreal(kind=R8P)parameterGap below the multiplot title [px].
LINE_HEIGHTreal(kind=R8P)parameterText line height [font size].

Derived Types ​

figure_object ​

Figure.

Components ​

NameTypeAttributesDescription
widthreal(kind=R8P)Page width [px], gnuplot svg terminal default.
heightreal(kind=R8P)Page height [px], gnuplot svg terminal default.
font_sizereal(kind=R8P)Font size [px].
refreshinteger(kind=I4P)HTML page reload period [s], 0 for none.
clear_screenlogicalClear the terminal before text output (live view).
text_charsetcharacter(len=9)Text output: dumb characters, or the block
text_colorscharacter(len=7)Text output colors: mono, ansi, ansi256,
themetype(theme_object)Output theme (foresight_theme), classic by default.
rowsinteger(kind=I4P)Panel grid rows.
colsinteger(kind=I4P)Panel grid columns.
currentinteger(kind=I4P)Current panel, filled row by row.
layoutlogicalMultiplot grid: panels in cells, else in their
manuallogicalManual multiplot: panels added on demand.
titlecharacter(len=:)allocatableMultiplot title, empty for none.
panelstype(axes_object)allocatablePlot panels.

Type-Bound Procedures ​

NameAttributesDescription
clearpass(self)Remove the series of the current panel, keeping the settings.
imagepass(self)gnuplot plot ... with image, a grid of values.
rgbimagepass(self)gnuplot plot ... with rgbimage|rgbalpha, a grid of colors.
initpass(self)Reset the figure, optionally resizing it.
next_panelpass(self)Move to the next multiplot panel, carrying the settings over.
plotpass(self)gnuplot plot, one series per call.
savepass(self)Render to a file; the format follows the extension.
set_anglespass(self)gnuplot set angles.
set_borderpass(self)gnuplot set border / unset border.
set_boxwidthpass(self)gnuplot set boxwidth.
set_cblabelpass(self)gnuplot set cblabel.
set_cbrangepass(self)gnuplot set cbrange.
set_colorboxpass(self)gnuplot set colorbox / unset colorbox.
set_formatpass(self)gnuplot set format.
set_gridpass(self)gnuplot set grid / unset grid.
set_keypass(self)gnuplot set key / unset key.
set_logscalepass(self)gnuplot set logscale.
set_multiplotpass(self)gnuplot set multiplot layout rows,cols title "...".
set_originpass(self)gnuplot set origin.
set_palettepass(self)gnuplot set palette.
set_paxispass(self)gnuplot set paxis N range|tics|label.
set_polarpass(self)gnuplot set polar / unset polar.
set_raxispass(self)gnuplot set raxis / unset raxis.
set_readoutpass(self)Readouts: on/off, position, window, digit size.
set_refreshpass(self)HTML page reload period, for live monitoring.
set_rrangepass(self)gnuplot set rrange.
set_rticspass(self)gnuplot set rtics / unset rtics.
set_sizepass(self)gnuplot set size.
set_style_fillpass(self)gnuplot set style fill.
set_style_histogrampass(self)gnuplot set style histogram.
set_style_boxplotpass(self)gnuplot set style boxplot.
set_style_spiderplotpass(self)gnuplot set style spiderplot.
set_spiderplotpass(self)gnuplot set spiderplot / unset spiderplot.
set_textpass(self)Text output: gnuplot dumb or block terminal, colors.
set_themepass(self)Output theme: classic, vfd, lcd; glow.
set_thetapass(self)gnuplot set theta.
set_titlepass(self)gnuplot set title.
set_trangepass(self)gnuplot set trange.
set_tticspass(self)gnuplot set ttics / unset ttics.
set_xlabelpass(self)gnuplot set xlabel.
set_xrangepass(self)gnuplot set xrange.
set_xticspass(self)gnuplot set xtics.
set_ylabelpass(self)gnuplot set ylabel.
set_yrangepass(self)gnuplot set yrange.
set_yticspass(self)gnuplot set ytics.
set_y2labelpass(self)gnuplot set y2label.
set_y2rangepass(self)gnuplot set y2range.
set_y2ticspass(self)gnuplot set y2tics.
unset_logscalepass(self)gnuplot unset logscale.
unset_multiplotpass(self)gnuplot unset multiplot.
unset_xticspass(self)gnuplot unset xtics.
unset_yticspass(self)gnuplot unset ytics.
unset_y2ticspass(self)gnuplot unset y2tics.
ensure_panelspass(self)Allocate the single default panel if needed.
renderpass(self)Render on a device.

Subroutines ​

clear ​

Remove the series of the current panel, keeping every setting: a new gnuplot plot replaces the previous one.

fortran
subroutine clear(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.

Call graph

rgbimage ​

Image of the colors red, green, blue (and alpha, opaque if absent) per pixel (column, row), 0 to 255, as gnuplot plot ... with rgbimage (rgbalpha): pixel centres x(column), y(row) as image; a NaN component makes its pixel transparent. No palette nor color box.

fortran
subroutine rgbimage(self, red, green, blue, x, y, title, alpha)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
redreal(kind=R8P)inRed components (column, row), rows upward.
greenreal(kind=R8P)inGreen components.
bluereal(kind=R8P)inBlue components.
xreal(kind=R8P)inoptionalPixel centre abscissae.
yreal(kind=R8P)inoptionalPixel centre ordinates.
titlecharacter(len=*)inoptionalKey title.
alphareal(kind=R8P)inoptionalOpacities, 0 (transparent) to 255.

Call graph

image ​

Image of the values z(column, row) (a heatmap), as gnuplot plot ... with image: pixel centres x(column) and y(row), evenly spaced and increasing (0, 1, ... if absent, as gnuplot matrix), colored by set_palette over set_cbrange; NaN values are transparent. The x and y axes fit the pixel edges.

fortran
subroutine image(self, z, x, y, title)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
zreal(kind=R8P)inValues (column, row), rows upward.
xreal(kind=R8P)inoptionalPixel centre abscissae.
yreal(kind=R8P)inoptionalPixel centre ordinates.
titlecharacter(len=*)inoptionalKey title.

Call graph

init ​

Reset the figure to gnuplot defaults, optionally resizing it.

fortran
subroutine init(self, width, height, font_size)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
widthinteger(kind=I4P)inoptionalPage width [px].
heightinteger(kind=I4P)inoptionalPage height [px].
font_sizereal(kind=R8P)inoptionalFont size [px].

Call graph

next_panel ​

Move to the next panel of the multiplot: the next grid cell, or a new panel in a manual multiplot; the settings of the current panel carry over, as in gnuplot.

fortran
subroutine next_panel(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.

Call graph

plot ​

Add the series (x, y) to the current panel, as gnuplot plot ... title ... with ... lc ... lw ... dt ... ps ... axes.

Error bar styles (yerrorbars, xerrorbars, xyerrorbars) take the bar bounds ylow/yhigh, xlow/xhigh. axes='x1y2' plots the series against the second y axis, scaled on its own. pt is gnuplot's point type (0 a dot, 1 plus, 2 cross, 3 star, 4-5 square, 6-7 circle, 8-9 triangle, 10-11 inverted triangle, 12-13 diamond, 14-15 pentagon, odd ones from 5 filled; cycling every 15), 9 px wide at ps 1; without it points are round dots.

with='readout' (a foresight extension) shows the last finite y in seven-segment digits, titled by title, on a glass of format (a printf conversion with a field width, '%9.2e'; '%10.3e' if absent): see foresight_readout and set_readout. A readout takes lc only among the style options.

with='boxes' draws a bar from y = 0 to each y, width wide (per box; NaN or absent: set_boxwidth, else the boxes touch); with='filledcurves' fills down to base, between ylow and y, or the closed polygon of the points. fs takes gnuplot fill style words ('solid 0.5 noborder'), over set_style_fill.

with='histograms' draws a bar per y in the row at x (0, 1, 2, ... as gnuplot), laid out with the other histograms of the panel by set_style_histogram. xlabels label the abscissae (gnuplot xtic(N)): text labels then replace the x ticks.

with='circles' draws a circle per point, radius in x units (2% of the plot width if absent or NaN), a wedge with angles(:, i) = start and end [deg, counterclockwise from the x direction]. with='pie' (a foresight extension, alone in its panel) draws the y as slices from 12 o'clock clockwise, labelled by xlabels with their percentage in the key; donut (0 to below 1) leaves a hole of that fraction of the radius.

Panel charts (foresight extensions, alone in their panel, several of the same kind side by side for gauges and radars): with='gauge' shows the last finite y on a 270-degree sweep over scale (its two end values), lit in fs='segments N' cells if set, the value in digits of format; with='radar' a polygon over a spoke per point, named by xlabels; with='rose' equal sectors of area by value (radius by value with linear).

with='boxerrorbars' draws boxes (as boxes) with y error bars from ylow to yhigh; boxxyerror a rectangle from xlow to xhigh, ylow to yhigh; candlesticks and financebars take the open y, low ylow, high yhigh and close (a box-and-whisker plot: box start, whisker ends, box end), candlesticks a width and whiskerbars (crossbars, a fraction of the box width). with='boxplot' draws the quartiles, median, whiskers and outliers of the values y at x(1), one box per level of factors if given, laid out by set_style_boxplot.

with='vectors' draws arrows from the points by dx, dy; arrows by length (> 0 x units, kept at any angle; in (-1, 0) a fraction of the plot width) and angle [deg]; head takes gnuplot's words ('heads filled'). ellipses take major, minor diameters (x and y units) and angle [deg]; polygons fill each NaN-separated run of points; labels write labels(i) at the points with the label words ('left offset 1,0 point'); sectors draw the annular sectors from azimuth x, radius y by angle (the angle unit) and width.

fortran
subroutine plot(self, x, y, title, with, lc, lw, dt, ps, xlow, xhigh, ylow, yhigh, axes, pt, format, width, base, fs, xlabels, radius, angles, donut, scale, linear, close, whiskerbars, factors, dx, dy, length, angle, major, minor, labels, label, head, origins, curve, at)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
xreal(kind=R8P)inAbscissae.
yreal(kind=R8P)inOrdinates.
titlecharacter(len=*)inoptionalKey title, empty or absent for none.
withcharacter(len=*)inoptionalPlotting style: lines (default), points, ....
lccharacter(len=*)inoptionalLine color (SVG color); default from the gnuplot palette.
lwreal(kind=R8P)inoptionalLine width [px].
dtinteger(kind=I4P)inoptionalDash type, 1..5.
psreal(kind=R8P)inoptionalPoint size scale factor.
xlowreal(kind=R8P)inoptionalHorizontal error bar starts.
xhighreal(kind=R8P)inoptionalHorizontal error bar ends.
ylowreal(kind=R8P)inoptionalVertical error bar starts.
yhighreal(kind=R8P)inoptionalVertical error bar ends.
axescharacter(len=*)inoptionalAxes of the series: x1y1 (default) or x1y2.
ptinteger(kind=I4P)inoptionalgnuplot point type, >= 0.
formatcharacter(len=*)inoptionalReadout format.
widthreal(kind=R8P)inoptionalBox widths.
basereal(kind=R8P)inoptionalBaseline of a fill.
fscharacter(len=*)inoptionalFill style words.
xlabelscharacter(len=*)inoptionalText labels of the abscissae.
radiusreal(kind=R8P)inoptionalCircle radii [x units].
anglesreal(kind=R8P)inoptionalWedge angles (2, point) [deg].
donutreal(kind=R8P)inoptionalPie hole fraction.
scalereal(kind=R8P)inoptionalGauge scale: the values at the sweep ends.
linearlogicalinoptionalRose radius by value.
closereal(kind=R8P)inoptionalClosing values of candlesticks and finance bars.
whiskerbarsreal(kind=R8P)inoptionalCandlestick whisker crossbars, a box width fraction.
factorscharacter(len=*)inoptionalFactor level of each boxplot value.
dxreal(kind=R8P)inoptionalVector extents along x.
dyreal(kind=R8P)inoptionalVector extents along y.
lengthreal(kind=R8P)inoptionalArrow lengths.
anglereal(kind=R8P)inoptionalArrow or ellipse angles [deg], sector extents.
majorreal(kind=R8P)inoptionalEllipse major diameters.
minorreal(kind=R8P)inoptionalEllipse minor diameters.
labelscharacter(len=*)inoptionalTexts of labels.
labelcharacter(len=*)inoptionalLabel option words.
headcharacter(len=*)inoptionalArrowhead words.
originsreal(kind=R8P)inoptionalSector centres (2, point).
curvecharacter(len=*)inoptionalFilled curve options ('x1', 'above', 'xy=0,1').
atreal(kind=R8P)inoptionalPosition of a parallel axis.

Call graph

save ​

Render the figure to file; the format follows the name: .svg static, .html interactive, .txt text (the gnuplot dumb or block terminal, see set_text), - text on standard output.

fortran
subroutine save(self, file)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
filecharacter(len=*)inOutput file.

Call graph

set_cblabel ​

Color box label, as gnuplot set cblabel; empty for none.

fortran
subroutine set_cblabel(self, label)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
labelcharacter(len=*)inLabel.

Call graph

set_cbrange ​

Color range of the images, as gnuplot set cbrange [min:max]: an absent end is autoscaled to the values.

fortran
subroutine set_cbrange(self, min, max)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
minreal(kind=R8P)inoptionalValue of the first palette color.
maxreal(kind=R8P)inoptionalValue of the last palette color.

Call graph

set_colorbox ​

Draw the color box of the images (on absent or true), as gnuplot set colorbox, or not.

fortran
subroutine set_colorbox(self, on)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
onlogicalinoptionalColor box on.

Call graph

set_palette ​

Palette of the images, as gnuplot set palette: '' (the default, rgbformulae 7,5,15), 'rgbformulae 33,13,10', 'defined (0 "blue", 1 "white", 2 "red")', 'gray', 'viridis', 'negative', 'maxcolors 8'.

fortran
subroutine set_palette(self, words)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
wordscharacter(len=*)inPalette words.

Call graph

set_angles ​

Unit of the angles, as gnuplot set angles degrees|radians (radians by default): theta of a polar panel and the trigonometric functions of its expressions (set_angles affects the script interpreter's compilation).

fortran
subroutine set_angles(self, unit)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
unitcharacter(len=*)indegrees or radians.

Call graph

set_border ​

Border sides, as gnuplot set border MASK [polar] (unset border is mask 0): 1 bottom, 2 left, 4 top, 8 right (31 by default, the full frame); polar adds the circle of the largest r on a polar panel. Without mask, polar keeps the sides (gnuplot: unset border; set border polar draws the circle alone), else the full frame is restored.

fortran
subroutine set_border(self, mask, polar)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
maskinteger(kind=I4P)inoptionalSides; 31 if absent.
polarlogicalinoptionalPolar border.

Call graph

set_boxwidth ​

Box width, as gnuplot set boxwidth W [absolute|relative]: width absent or 0 for the default, the boxes touching; relative scales that default instead of setting the width.

fortran
subroutine set_boxwidth(self, width, relative)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
widthreal(kind=R8P)inoptionalWidth, or fraction of the default with relative.
relativelogicalinoptionalRelative width.

Call graph

set_style_fill ​

Fill of the boxes and filled curves plotted next, as gnuplot set style fill: 'empty', 'solid 0.5', 'transparent solid 0.3 noborder', 'solid border lc "black"'.

fortran
subroutine set_style_fill(self, words)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
wordscharacter(len=*)inFill style words.

Call graph

set_style_histogram ​

Layout of the histograms plotted next, as gnuplot set style histogram clustered [gap G]|rowstacked: styleclustered (the default) or rowstacked; gap the space between clusters, in bar widths (2 by default).

fortran
subroutine set_style_histogram(self, style, gap)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
stylecharacter(len=*)inclustered or rowstacked.
gapreal(kind=R8P)inoptionalGap between clusters [bars].

Call graph

set_style_boxplot ​

Layout of the boxplots plotted next, as gnuplot set style boxplot: words among range R (1.5), fraction F, outliers (the default) or nooutliers, pointtype P (7), candlesticks (the default) or financebars, medianlinewidth W, separation S (1), labels off|auto|x, sorted or unsorted (the default).

fortran
subroutine set_style_boxplot(self, words)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
wordscharacter(len=*)inStyle words.

Call graph

set_format ​

Tick label format of the axes named x, y, y2 (all when absent), as gnuplot set format: text with one printf conversion %[flags][width][.precision] f, e, E, g, G or h (g with a x10 superscript exponent), e.g. '%.1e' or '%g s'; an empty format restores the default labels.

fortran
subroutine set_format(self, format, axes)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
formatcharacter(len=*)inLabel format.
axescharacter(len=*)inoptionalAxes names, e.g. y, xy or y2.

Call graph

set_paxis ​

Parallel axis n of the parallel axis and spider plots, as gnuplot set paxis n range [min:max] (an absent end autoscaled to the values, without extension), set paxis n tics [START,]STEP[,END] (tics true: automatic ticks; false: none, the default), set paxis n label "text" (spider plots).

fortran
subroutine set_paxis(self, n, min, max, step, start, end, tics, label)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
ninteger(kind=I4P)inAxis number, >= 1.
minreal(kind=R8P)inoptionalRange start.
maxreal(kind=R8P)inoptionalRange end.
stepreal(kind=R8P)inoptionalTick step.
startreal(kind=R8P)inoptionalFirst tick.
endreal(kind=R8P)inoptionalLast tick.
ticslogicalinoptionalTicks on (automatic) or off.
labelcharacter(len=*)inoptionalAxis label.

Call graph

set_spiderplot ​

Spider plot coordinates (on absent or true), as gnuplot set spiderplot: the items of the panel are spider plot axes (its data style), its key not titled by the items; false restores the data style lines.

fortran
subroutine set_spiderplot(self, on)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
onlogicalinoptionalSpider plot on.

Call graph

set_style_spiderplot ​

Polygons of the spider plots plotted next, as gnuplot set style spiderplot: fill style words ('fs transparent solid 0.2 border', fs optional) and lw W, pt N, ps S.

fortran
subroutine set_style_spiderplot(self, words)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
wordscharacter(len=*)inStyle words.

Call graph

set_grid ​

Draw grid lines at the major ticks (on absent or true), as gnuplot set grid, or not. On a polar panel, polar > 0 draws the polar grid instead (gnuplot set grid polar STEP): rings at the major r ticks and spokes every polar degrees of theta; 0 restores the rectangular grid. spider draws the web of the spider plots (gnuplot set grid spiderplot) at the ticks of their first axis.

fortran
subroutine set_grid(self, on, polar, spider)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
onlogicalinoptionalGrid on.
polarreal(kind=R8P)inoptionalSpoke step [deg], 0 for the rectangular grid.
spiderlogicalinoptionalSpider plot web.

Call graph

set_key ​

Draw the key (on absent or true), as gnuplot set key, or not; position takes gnuplot's words, e.g. 'bottom left', 'center' (inside the plot area, top right by default), 'outside', 'below', 'above', 'horizontal'; box draws a box around it.

fortran
subroutine set_key(self, on, position, box)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
onlogicalinoptionalKey on.
positioncharacter(len=*)inoptionalPosition words: left, right, center, top, bottom.
boxlogicalinoptionalBox around the key.

Call graph

set_logscale ​

Base-10 log scale on the axes named x, y, y2; all axes when absent, as gnuplot.

fortran
subroutine set_logscale(self, axes)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
axescharacter(len=*)inoptionalAxes names, e.g. y, xy or y2.

Call graph

set_multiplot ​

Lay out a rows x cols grid of panels, filled row by row starting from the first; every panel starts from the settings of the current one, without its series. Without rows and cols, a manual multiplot: each panel lies in its set_origin/set_size box, as gnuplot set multiplot without layout.

fortran
subroutine set_multiplot(self, rows, cols, title)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
rowsinteger(kind=I4P)inoptionalGrid rows.
colsinteger(kind=I4P)inoptionalGrid columns.
titlecharacter(len=*)inoptionalMultiplot title.

Call graph

set_origin ​

Bottom left corner of the plot as page fractions, as gnuplot set origin x,y: for a single plot and the panels of a manual multiplot (not with a layout).

fortran
subroutine set_origin(self, x, y)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
xreal(kind=R8P)inLeft side, page width fraction.
yreal(kind=R8P)inBottom side, page height fraction.

Call graph

set_text ​

Text output (.txt, -): charset dumb (default), drawing with characters, or the gnuplot block character set half, quadrants, sextants, braille; colors mono (default), ansi, ansi256 or ansirgb, the series in ANSI colors. Absent arguments keep their setting.

fortran
subroutine set_text(self, charset, colors)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
charsetcharacter(len=*)inoptionalCharacter set.
colorscharacter(len=*)inoptionalColor mode.

Call graph

set_polar ​

Polar coordinates (on absent or true), as gnuplot set polar: the series of the panel are theta:r (theta in set_angles units, from the set_theta origin), drawn at x = (r - rmin) cos(theta), y = (r - rmin) sin(theta) joined by straight segments; x and y autoscale to the disc of the largest r. The frame stays rectangular, as gnuplot: a round plot sets the polar border, the polar grid, the square size and turns the x and y ticks off.

fortran
subroutine set_polar(self, on)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
onlogicalinoptionalPolar on.

Call graph

set_raxis ​

Draw the radial axis of a polar panel (on absent or true; the default), as gnuplot set raxis, or not.

fortran
subroutine set_raxis(self, on)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
onlogicalinoptionalAxis on.

Call graph

set_readout ​

Draw the readouts (on absent or true) or not; position takes the set key words inside the plot area (left, right, center, top, bottom; top left by default) and horizontal or vertical (the default) for a row or a column of readouts; opaque draws a window behind them (default true); size is the digit height [px], 0 for the default (2.5 font sizes, growing to fill a panel of readouts alone).

fortran
subroutine set_readout(self, on, position, opaque, size)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
onlogicalinoptionalReadouts on.
positioncharacter(len=*)inoptionalPosition words.
opaquelogicalinoptionalWindow behind the readouts.
sizereal(kind=R8P)inoptionalDigit height [px].

Call graph

set_refresh ​

Make the HTML page reload itself every seconds (0 disables): live view of a file rewritten by a running job.

The zoom survives the reload, being kept in the page URL as data values.

Attributes: pure

fortran
subroutine set_refresh(self, seconds)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
secondsinteger(kind=I4P)inReload period [s].

Call graph

set_rrange ​

r range of a polar panel, as gnuplot set rrange [min:max]: min lies at the pole (0 when absent), the points below it are undefined; an absent max autoscales to the largest |r|, extended to the r ticks.

fortran
subroutine set_rrange(self, min, max)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
minreal(kind=R8P)inoptionalr at the pole.
maxreal(kind=R8P)inoptionalLargest r.

Call graph

set_rtics ​

r ticks of a polar panel every step from start to end, automatic without step (the default), as gnuplot set rtics; on false turns them off (unset rtics).

fortran
subroutine set_rtics(self, step, start, end, on)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
stepreal(kind=R8P)inoptionalTick step.
startreal(kind=R8P)inoptionalFirst tick.
endreal(kind=R8P)inoptionalLast tick.
onlogicalinoptionalTicks on.

Call graph

set_size ​

Size of the plot as page fractions, as gnuplot set size w,h: for a single plot and the panels of a manual multiplot (not with a layout). ratio > 0 fixes the plot area height over width (gnuplot set size ratio R, square is 1), 0 frees it (noratio).

fortran
subroutine set_size(self, width, height, ratio)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
widthreal(kind=R8P)inoptionalWidth, page width fraction, > 0.
heightreal(kind=R8P)inoptionalHeight, page height fraction, > 0.
ratioreal(kind=R8P)inoptionalPlot area height over width, 0 for none.

Call graph

set_theme ​

Output theme (a foresight extension): name classic (the default), vfd (a vacuum fluorescent display: black glass, emissive colors, glowing data) or lcd (a backlit liquid crystal display); glow overrides the theme's glow (on in vfd). Text output takes the theme colors of the series only (ansi colors).

fortran
subroutine set_theme(self, name, glow)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
namecharacter(len=*)inoptionalTheme name.
glowlogicalinoptionalGlowing data.

Call graph

set_theta ​

Where theta = 0 lies on a polar panel, right (the default), top, left or bottom, and whether theta grows clockwise (default counterclockwise), as gnuplot set theta.

fortran
subroutine set_theta(self, origin, clockwise)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
origincharacter(len=*)inoptionalDirection of theta = 0.
clockwiselogicalinoptionalTheta grows clockwise.

Call graph

set_title ​

Set the title of the current panel, empty for none.

fortran
subroutine set_title(self, title)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
titlecharacter(len=*)inTitle.

Call graph

set_trange ​

Angle range the script functions of a polar panel are sampled over, as gnuplot set trange [min:max] (in set_angles units; a full turn from 0 when absent).

fortran
subroutine set_trange(self, min, max)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
minreal(kind=R8P)inoptionalFirst angle.
maxreal(kind=R8P)inoptionalLast angle.

Call graph

set_ttics ​

Theta labels of a polar panel outside its largest r, every step degrees from start (0), whatever the angle unit, as gnuplot set ttics START,STEP; every 45 degrees without step (gnuplot draws none); format the label format; on false turns them off (the default, unset ttics).

fortran
subroutine set_ttics(self, step, start, format, on)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
stepreal(kind=R8P)inoptionalLabel step [deg].
startreal(kind=R8P)inoptionalFirst label [deg].
formatcharacter(len=*)inoptionalLabel format.
onlogicalinoptionalLabels on.

Call graph

set_xlabel ​

Set the x axis label of the current panel, empty for none.

fortran
subroutine set_xlabel(self, label)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
labelcharacter(len=*)inLabel.

Call graph

set_xrange ​

Set the x range as gnuplot set xrange [min:max]: an absent end is autoscaled, min > max reverses the axis.

fortran
subroutine set_xrange(self, min, max)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
minreal(kind=R8P)inoptionalValue at the axis start.
maxreal(kind=R8P)inoptionalValue at the axis end.

Call graph

set_xtics ​

x ticks every step from start to end (both optional), as gnuplot set xtics START,STEP,END; automatic without step. On a log axis the step is a factor (> 1): ticks at start * step**k. mirror false draws them on the bottom border only (gnuplot nomirror).

fortran
subroutine set_xtics(self, step, start, end, mirror)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
stepreal(kind=R8P)inoptionalTick step, a factor on log axes.
startreal(kind=R8P)inoptionalFirst tick.
endreal(kind=R8P)inoptionalLast tick.
mirrorlogicalinoptionalTicks also on the top border.

Call graph

set_ylabel ​

Set the y axis label of the current panel, empty for none.

fortran
subroutine set_ylabel(self, label)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
labelcharacter(len=*)inLabel.

Call graph

set_yrange ​

Set the y range as gnuplot set yrange [min:max]: an absent end is autoscaled, min > max reverses the axis.

fortran
subroutine set_yrange(self, min, max)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
minreal(kind=R8P)inoptionalValue at the axis start.
maxreal(kind=R8P)inoptionalValue at the axis end.

Call graph

set_ytics ​

y ticks every step from start to end (both optional), as gnuplot set ytics START,STEP,END; automatic without step. On a log axis the step is a factor (> 1): ticks at start * step**k. mirror false draws them on the left border only (gnuplot nomirror), leaving the right one to the second y axis.

fortran
subroutine set_ytics(self, step, start, end, mirror)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
stepreal(kind=R8P)inoptionalTick step, a factor on log axes.
startreal(kind=R8P)inoptionalFirst tick.
endreal(kind=R8P)inoptionalLast tick.
mirrorlogicalinoptionalTicks also on the right border.

Call graph

set_y2label ​

Set the second y axis label of the current panel, on the right, empty for none.

fortran
subroutine set_y2label(self, label)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
labelcharacter(len=*)inLabel.

Call graph

set_y2range ​

Set the second y axis range as gnuplot set y2range [min:max]: an absent end is autoscaled on the x1y2 series.

fortran
subroutine set_y2range(self, min, max)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
minreal(kind=R8P)inoptionalValue at the axis start.
maxreal(kind=R8P)inoptionalValue at the axis end.

Call graph

set_y2tics ​

Ticks and labels of the second y axis on the right border, as gnuplot set y2tics START,STEP,END (automatic without step); off by default, as in gnuplot. mirror true draws the ticks on the left border too.

fortran
subroutine set_y2tics(self, step, start, end, mirror)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
stepreal(kind=R8P)inoptionalTick step, a factor on log axes.
startreal(kind=R8P)inoptionalFirst tick.
endreal(kind=R8P)inoptionalLast tick.
mirrorlogicalinoptionalTicks also on the left border.

Call graph

unset_logscale ​

Linear scale on the axes named x, y, y2; all axes when absent, as gnuplot.

fortran
subroutine unset_logscale(self, axes)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
axescharacter(len=*)inoptionalAxes names, e.g. y, xy or y2.

Call graph

unset_multiplot ​

Back to a single panel, keeping the settings of the current one without its series.

fortran
subroutine unset_multiplot(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.

Call graph

unset_xtics ​

No x ticks, tick labels nor grid lines, as gnuplot unset xtics; autoscaled ends are then not extended.

fortran
subroutine unset_xtics(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.

Call graph

unset_ytics ​

No y ticks, tick labels nor grid lines, as gnuplot unset ytics; autoscaled ends are then not extended.

fortran
subroutine unset_ytics(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.

Call graph

unset_y2tics ​

No second y axis ticks nor tick labels, the default, as gnuplot unset y2tics.

fortran
subroutine unset_y2tics(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.

Call graph

ensure_panels ​

Allocate the single default panel of a fresh figure.

fortran
subroutine ensure_panels(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.

Call graph

render ​

Render the figure on backend, writing file: the multiplot title on top, panels in grid cells of a layout or else in their origin/size boxes; in a multiplot the panels never plotted stay blank, as in gnuplot.

fortran
subroutine render(self, backend, file)

Arguments

NameTypeIntentAttributesDescription
selfclass(figure_object)inoutFigure.
backendclass(backend_object)inoutOutput device.
filecharacter(len=*)inOutput file.

Call graph

set_tics ​

Fixed ticks from real settings, or automatic ones without step; invalid settings stop. mirror alone (no step, start, end) keeps the tick positions, as gnuplot set xtics nomirror, turning off ticks on at their last positions.

fortran
subroutine set_tics(tics, caller, step, start, end, mirror)

Arguments

NameTypeIntentAttributesDescription
ticstype(tics_object)inoutAxis tick settings.
callercharacter(len=*)inProcedure name, for messages.
stepreal(kind=R8P)inoptionalTick step.
startreal(kind=R8P)inoptionalFirst tick.
endreal(kind=R8P)inoptionalLast tick.
mirrorlogicalinoptionalTicks also on the opposite border.

Call graph

Functions ​

which_axes ​

Axes named in axes (x, y, y2, concatenated), all when absent; unsupported names stop.

Returns: logical

fortran
function which_axes(axes, caller) result(named)

Arguments

NameTypeIntentAttributesDescription
axescharacter(len=*)inoptionalAxes names.
callercharacter(len=*)inProcedure name, for messages.

Call graph

extension ​

Lower case extension of file, empty if none.

Attributes: pure

Returns: character(len=:)

fortran
function extension(file) result(ext)

Arguments

NameTypeIntentAttributesDescription
filecharacter(len=*)inFile name.

Call graph