Skip to content

foresight_axes ​

foresight_axes, a plot panel: the axes, the plotted series, the key and the decorations.

Layout follows gnuplot defaults: full border with inward ticks mirrored on the opposite side, tick labels outside bottom and left, key inside the plot area (top right by default) with right-aligned titles and the samples on their right. A key outside lies in a side margin (left, right) or, centred, above or below the plot; below and above lay its entries out in rows (horizontal), as many per row as the panel width holds.

A second y axis (gnuplot y2) scales the series plotted on it (axes x1y2) on its own, autoscaled from them alone; as gnuplot, its ticks and labels are off until set y2tics (on the right border, not mirrored), and it is drawn only when it has data or a fully fixed range. Text extents are measured by the output device (estimated for vector formats, whose viewer renders the glyphs).

Boxes stand on y = 0 (boxes) and fills reach their baseline (filledcurves y=V): the box edges and the baselines are stored as the bar ends xlow/xhigh and ylow, so they widen the autoscale as error bars do. Unlike gnuplot, which leaves zero out of the y autoscale of boxes and the auto-width edges out of the x one, bars are drawn whole and with lengths proportional to their values.

Histograms (with histograms) lay out their bars from all the histogram series of the panel, as gnuplot: rows at their abscissae (the point numbers 0, 1, ... from a script), clustered the k series side by side in slots 1/(k + gap) wide centred on the row, rowstacked one stack per row, 1 wide, positive values up from 0 and negative ones down from 0; boxwidth scales each bar. The layout is redone at every histogram added, the original values kept in values; the x autoscale reaches one unit beyond the first and last rows, as gnuplot. Unlike gnuplot, clustered bars reach 0 in the y autoscale, as boxes.

Text labels of the abscissae (xtic(N)) of every series replace the x ticks (see foresight_axis).

Circles (with circles, gnuplot) have their radius in x units (2% of the plot width by default) and are drawn round on the page; with two angles [deg, counterclockwise from the x direction] they are wedges. A pie (with pie, a foresight extension) is alone in its panel, without axes: its slices proportional to the values, from 12 o'clock clockwise, each in its palette color, a key entry per slice with its percentage; donut leaves a hole.

Images (with image) color a regular grid of values by the panel palette (foresight_palette) over the color axis cbaxis, autoscaled to the values or set (cbrange), its ends never extended to ticks; the x and y axes of a panel with an image fit its pixel edges, unextended, as gnuplot. The color box lies at the right of the plot area. A theme other than classic replaces the default palette with its own (dark glass to emissive colors for vfd).

A polar panel (polar, gnuplot set polar) keeps its series as theta:r and projects them at each rendering about the pole at r = rmin (the r axis start), x and y autoscaling to the disc of the largest radius; the frame stays rectangular unless set otherwise (border, border_polar, ratio, the x and y ticks off), as gnuplot. Its polar grid, border and r axis line are data geometry (zoomed by a viewer); the r tick labels and theta labels (ttics) are page geometry, in the group fs-polar.

Readouts (with readout, see foresight_readout) show the last finite value of their series in seven-segment digits. They take no part in autoscale, the key or the plot area: they form a block of readouts, in a column or a row, placed inside the plot area as the key is (top left by default) over a window hiding the curves below. A panel of readouts alone has no axes: its block grows to fill the panel, unless a digit size is set.

Source: src/lib/foresight_axes.F90

Dependencies

Contents ​

Variables ​

NameTypeAttributesDescription
PADreal(kind=R8P)parameterOuter padding [px].
TICK_MAJORreal(kind=R8P)parameterMajor tick length [px].
TICK_MINORreal(kind=R8P)parameterMinor tick length [px].
GAPreal(kind=R8P)parameterGap between border, tick labels and axis labels [px].
LINE_HEIGHTreal(kind=R8P)parameterText line height [font size].
SAMPLE_LENGTHreal(kind=R8P)parameterKey sample length [font size].
CAP_LENGTHreal(kind=R8P)parameterError bar cap length [px].
FRAME_COLORcharacter(len=*)parameterBorder and tick color.
GRID_COLORcharacter(len=*)parameterGrid line color.
GRID_DASHEScharacter(len=*)parameterGrid line dash array.
WINDOW_FILLcharacter(len=*)parameterReadout window fill: the page background.
DIGIT_HEIGHTreal(kind=R8P)parameterDefault readout digit height [font size].
COLORBOX_SIZEreal(kind=R8P)parameterColor box width [font size].
POLAR_STYLEScharacter(len=*)parameterStyles of a polar panel.
CIRCLE_SIDESinteger(kind=I4P)parameterSides of the polygon drawing a circle.
PI_R8real(kind=R8P)parameterpi.

Derived Types ​

paxis_object ​

A parallel axis (gnuplot set paxis N) of parallel axis plots and spider plots.

Components ​

NameTypeAttributesDescription
axistype(axis_object)Range and ticks: autoscaled to the values without extension, no ticks.
labelcharacter(len=:)allocatableLabel of a spider plot axis, the item title if unallocated.

boxplot_style ​

Layout of the boxplots, gnuplot set style boxplot.

Components ​

NameTypeAttributesDescription
rangereal(kind=R8P)Whiskers to the farthest point within range interquartile ranges.
fractionreal(kind=R8P)If > 0, whiskers spanning this fraction of the points instead.
outlierslogicalDraw the points beyond the whiskers.
pointtypeinteger(kind=I4P)Point type of the outliers.
financebarslogicalDrawn as finance bars, else as candlesticks.
median_widthreal(kind=R8P)Median line width [px]; negative: the box line width, 0: none.
separationreal(kind=R8P)Distance between the boxplots of the factor levels.
labelscharacter(len=4)Factor names as x tick labels: auto (or x), off.
sortedlogicalFactor levels in sorted order, else in order of appearance.

axes_object ​

Plot panel.

Components ​

NameTypeAttributesDescription
xaxistype(axis_object)Horizontal axis.
yaxistype(axis_object)Vertical axis.
y2axistype(axis_object)Second
y2_activelogicalThe second y axis is drawn, set by setup_axes.
seriestype(series_object)allocatablePlotted series.
titlecharacter(len=:)allocatablePanel title, empty for none.
gridlogicalDraw grid lines at the major ticks.
keylogicalDraw the key.
key_hcharacter(len=6)Key horizontal position: left, center, right.
key_vcharacter(len=6)Key vertical position: top, center, bottom.
key_boxlogicalDraw a box around the key.
key_outsidelogicalKey outside the plot area (gnuplot outside).
key_margincharacter(len=6)top or bottom margin (gnuplot above, below), else
key_horizontallogicalEntries side by side, in rows.
originreal(kind=R8P)Bottom left corner, page fraction (set origin).
sizereal(kind=R8P)Width, height, page fraction (set size).
fill_defaulttype(style_object)Fill of the filled styles, set style fill (its fill
boxwidthreal(kind=R8P)Box width, set boxwidth; 0 for auto (boxes touching).
boxwidth_relativelogicalboxwidth scales the auto width.
histogram_rowstackedlogicalHistograms stacked by row, else clustered.
histogram_gapreal(kind=R8P)Gap between clusters [bar slots].
palettetype(palette_object)Palette of the images, set palette.
cbaxistype(axis_object)Color axis of the images, set cbrange.
colorboxlogicalDraw the color box of the images.
readoutlogicalDraw the readouts.
readout_hcharacter(len=6)Readout block horizontal position: left, center, right.
readout_vcharacter(len=6)Readout block vertical position: top, center, bottom.
readout_horizontallogicalReadouts side by side, else in a column.
readout_opaquelogicalWindow behind the readouts over a plot.
readout_sizereal(kind=R8P)Digit height [px]; 0 for the default, which fills
polarlogicalPolar coordinates (set polar): the series are theta:r.
degreeslogicalAngles in degrees (set angles degrees), else radians.
theta_originreal(kind=R8P)Direction of theta = 0 (set theta) [deg,
theta_clockwiselogicalTheta grows clockwise.
raxistype(axis_object)Radial axis: rrange, rtics.
raxis_onlogicalDraw the radial axis (set|unset raxis).
taxistype(axis_object)Angle range of the plotted functions, trange.
tticstype(tics_object)Theta labels around the polar plot.
grid_polarreal(kind=R8P)Spoke step of the polar grid [deg]; 0: rectangular grid.
borderinteger(kind=I4P)Border sides (gnuplot mask): 1 bottom, 2 left, 4 top, 8
border_polarlogicalCircle at the largest r (set border polar).
ratioreal(kind=R8P)Plot area height over width (set size ratio, square is
boxplottype(boxplot_style)Layout of the boxplots, set style boxplot.
paxestype(paxis_object)allocatableParallel axes p1, p2, ... (set paxis), as many as set.
spiderplotlogicalSpider plot coordinates (set spiderplot).
spider_styletype(style_object)Polygons of the spider plots (set style spiderplot).
grid_spiderlogicalWeb of the spider plot (set grid spiderplot).

Type-Bound Procedures ​

NameAttributesDescription
add_seriespass(self)Add a data series.
data_extentpass(self)Extent of the placeable data.
renderpass(self)Render the panel.
draw_framepass(self)Draw border, ticks, labels and title.
draw_gridpass(self)Draw the grid.
draw_polar_axespass(self)Draw the radial axis and the theta labels.
draw_polar_gridpass(self)Draw the polar grid.
page_anglepass(self)Page angle of a theta.
draw_keypass(self)Draw the key.
draw_readoutspass(self)Draw the readouts.
key_layoutpass(self)Key size and entry grid.
key_placepass(self)Where the key lies.
draw_seriespass(self)Draw a series.
has_titlepass(self)Whether the panel has a title.
is_readoutpass(self)Whether a series is a readout.
has_imagepass(self)Whether the panel has an image.
draw_colorboxpass(self)Draw the color box.
draw_piepass(self)Draw a pie panel.
draw_gaugespass(self)Draw a panel of gauges.
draw_radarpass(self)Draw a radar panel.
draw_rosepass(self)Draw a rose panel.
draw_parallelpass(self)Draw a parallel axis panel.
draw_spiderpass(self)Draw a spider plot panel.
parallel_axispass(self)A parallel axis set up for its values.
colorbox_widthpass(self)Room of the color box [px].
place_plot_areapass(self)Plot area from the margins.
setup_axespass(self)Effective ranges and ticks.

Subroutines ​

add_series ​

Add the series (x, y) with gnuplot-like style options; unset options take gnuplot defaults.

Error bar styles need their bounds: ylow/yhigh for yerrorbars, xlow/xhigh for xerrorbars, all four for xyerrorbars. axes is gnuplot's x1y1 (default) or x1y2, the second y axis. A readout takes its format (DEFAULT_READOUT_FORMAT if absent) and only the color among the style options.

boxes take the box widths width (NaN for the default), else the panel boxwidth, else touching boxes; filledcurves fill to the line y = base, between ylow and y, or the closed polygon of the points. fs (gnuplot fill style words, 'solid 0.5 noborder') overrides the panel fill of either; histograms take the fill too. xlabels are text labels of the abscissae (blank for none), replacing the x ticks.

boxerrorbars are boxes (as boxes) with the y error bars ylow/yhigh; boxxyerror rectangles from xlow to xhigh, ylow to yhigh; candlesticks and financebars take y the opening (or box start), ylow the low, yhigh the high and close the closing (or box end) values, candlesticks a width (else boxwidth, else a few pixels) and whiskerbars. A boxplot takes the values y at the position x(1), one box per level of factors if given (separation apart, named on the x axis), its width width(1) (else boxwidth, else 0.5); the statistics are computed here, with the panel boxplot style.

vectors go from each point by dx, dy; arrows by length and angle; both with head words. ellipses take major (both diameters if alone), minor and angle (the default 5% x 3% of the plot without diameters); polygons close each NaN-separated run of points; labels write labels with the label options; sectors are the annular sectors from azimuth x and radius y by angle and width, about origins.

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

Arguments

NameTypeIntentAttributesDescription
selfclass(axes_object)inoutPanel.
xreal(kind=R8P)inAbscissae.
yreal(kind=R8P)inOrdinates.
titlecharacter(len=*)inoptionalKey title, empty or absent for none.
withcharacter(len=*)inoptionalPlotting style: lines (default), points, linespoints.
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 or x1y2.
ptinteger(kind=I4P)inoptionalgnuplot point type: 0 a dot, 1.. the shapes.
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.
zreal(kind=R8P)inoptionalImage values (column, row): x and y are then the pixel
radiusreal(kind=R8P)inoptionalCircle radii [x units], NaN for the default.
anglesreal(kind=R8P)inoptionalWedge start and end angles (2, point) [deg].
donutreal(kind=R8P)inoptionalPie hole, a fraction of the radius (0 to below 1).
scalereal(kind=R8P)inoptionalGauge scale: the values at the start and end of the sweep.
linearlogicalinoptionalRose sectors with the radius (not the area) by value.
closereal(kind=R8P)inoptionalClosing prices of candlesticks and finance bars (y the
whiskerbarsreal(kind=R8P)inoptionalCrossbars of the candlestick whiskers, a fraction of the
factorscharacter(len=*)inoptionalFactor level of each value of a boxplot.
dxreal(kind=R8P)inoptionalVector extents along x.
dyreal(kind=R8P)inoptionalVector extents along y.
lengthreal(kind=R8P)inoptionalArrow lengths (> 0 x units, in (-1, 0) plot width fraction).
anglereal(kind=R8P)inoptionalArrow or ellipse angles, sector angular extents [the angle
majorreal(kind=R8P)inoptionalEllipse major diameters [x units].
minorreal(kind=R8P)inoptionalEllipse minor diameters [y units].
labelscharacter(len=*)inoptionalTexts of labels.
labelcharacter(len=*)inoptionalLabel options: gnuplot with labels words.
headcharacter(len=*)inoptionalArrowhead words: head, heads, nohead, backhead,
originsreal(kind=R8P)inoptionalSector centres (2, point), [0, 0] if absent.
curvecharacter(len=*)inoptionalFilled curve options: gnuplot closed, x1, x2,
channelsreal(kind=R8P)inoptionalRGB image colors (4, column, row), 0 to 255: red,
atreal(kind=R8P)inoptionalPosition of a parallel axis (its number if absent).

Call graph

data_extent ​

Extent of the series points placeable on their axes, the whole data before any range is set: x over every series, y per axis (1 the first, 2 the second).

Attributes: pure

fortran
subroutine data_extent(self, xmin, xmax, ymin, ymax, found)

Arguments

NameTypeIntentAttributesDescription
selfclass(axes_object)inPanel.
xminreal(kind=R8P)outSmallest abscissa.
xmaxreal(kind=R8P)outLargest abscissa.
yminreal(kind=R8P)outSmallest ordinate, per y axis.
ymaxreal(kind=R8P)outLargest ordinate, per y axis.
foundlogicaloutAny placeable point, per y axis.

Call graph

render ​

Render the panel into the pixel box of top-left corner (x0, y0) and size width x height.

fortran
subroutine render(self, backend, x0, y0, width, height, font_size)

Arguments

NameTypeIntentAttributesDescription
selfclass(axes_object)inoutPanel.
backendclass(backend_object)inoutOutput device.
x0real(kind=R8P)inBox left side [px].
y0real(kind=R8P)inBox top side [px].
widthreal(kind=R8P)inBox width [px].
heightreal(kind=R8P)inBox height [px].
font_sizereal(kind=R8P)inFont size [px].

Call graph

draw_frame ​

Draw border, ticks (mirrored if so set), tick labels, axis labels and title.

fortran
subroutine draw_frame(self, backend, area, x0, y0, x1, font_size)

Arguments

NameTypeIntentAttributesDescription
selfclass(axes_object)inPanel.
backendclass(backend_object)inoutOutput device.
areareal(kind=R8P)inPlot area: left, right, top, bottom [px].
x0real(kind=R8P)inBox left side [px].
y0real(kind=R8P)inBox top side [px].
x1real(kind=R8P)inBox right side [px].
font_sizereal(kind=R8P)inFont size [px].

Call graph

draw_grid ​

Draw grid lines at the major ticks.

fortran
subroutine draw_grid(self, backend, area)

Arguments

NameTypeIntentAttributesDescription
selfclass(axes_object)inPanel.
backendclass(backend_object)inoutOutput device.
areareal(kind=R8P)inPlot area: left, right, top, bottom [px].

Call graph

draw_polar_grid ​

Draw the polar grid in the plot area: rings at the major r ticks, spokes every grid_polar degrees of theta.

fortran
subroutine draw_polar_grid(self, backend)

Arguments

NameTypeIntentAttributesDescription
selfclass(axes_object)inPanel.
backendclass(backend_object)inoutOutput device.

Call graph

draw_polar_axes ​

Draw the ticks of the radial axis (a line from the pole to the largest r towards the right of the page whatever the theta origin, drawn with the data) and their labels below it, as gnuplot; and the theta labels (ttics) outside the largest r, with ticks on the polar border. Page geometry: hidden by the viewer while zoomed.

fortran
subroutine draw_polar_axes(self, backend, area, font_size)

Arguments

NameTypeIntentAttributesDescription
selfclass(axes_object)inPanel.
backendclass(backend_object)inoutOutput device.
areareal(kind=R8P)inPlot area: left, right, top, bottom [px].
font_sizereal(kind=R8P)inFont size [px].

Call graph

draw_key ​

Draw the key at its place (key_place): right-aligned titles, style samples on their right; entries in a column, or row after row (key_horizontal).

fortran
subroutine draw_key(self, backend, area, box, font_size, grid, extent)

Arguments

NameTypeIntentAttributesDescription
selfclass(axes_object)inPanel.
backendclass(backend_object)inoutOutput device.
areareal(kind=R8P)inPlot area: left, right, top, bottom [px].
boxreal(kind=R8P)inPanel box: left, top, right, bottom [px].
font_sizereal(kind=R8P)inFont size [px].
gridinteger(kind=I4P)inEntries, columns, rows (key_layout).
extentreal(kind=R8P)inKey width and height [px] (key_layout).

Call graph

draw_readouts ​

Draw the block of readouts in area, as the key is placed inside the plot area: a column (or a row) of readouts, over an opaque window unless fill, where the readouts are alone in the panel and the digits grow until the block fills area (vector devices; text has one size), unless a digit size is set.

fortran
subroutine draw_readouts(self, backend, area, font_size, fill)

Arguments

NameTypeIntentAttributesDescription
selfclass(axes_object)inPanel.
backendclass(backend_object)inoutOutput device.
areareal(kind=R8P)inBox: left, right, top, bottom [px].
font_sizereal(kind=R8P)inFont size [px].
filllogicalinReadouts alone, filling the box.

Call graph

key_layout ​

Key grid and size: entries (titled series), columns (1, or as many as room holds when horizontal) and rows; each entry is the widest title, a gap and the sample, with a gap between entries.

Attributes: pure

fortran
subroutine key_layout(self, backend, font_size, room, grid, extent)

Arguments

NameTypeIntentAttributesDescription
selfclass(axes_object)inPanel.
backendclass(backend_object)inOutput device, for text widths.
font_sizereal(kind=R8P)inFont size [px].
roomreal(kind=R8P)inWidth available to a row of entries [px].
gridinteger(kind=I4P)outEntries, columns, rows.
extentreal(kind=R8P)outKey width and height [px].

Call graph

draw_series ​

Draw the s-th series in the plot area against its vertical axis yaxis; unplaceable points (NaN, non-positive on log axes) break the line.

fortran
subroutine draw_series(self, backend, s, yaxis, area, font_size)

Arguments

NameTypeIntentAttributesDescription
selfclass(axes_object)inPanel.
backendclass(backend_object)inoutOutput device.
sinteger(kind=I4P)inSeries index.
yaxistype(axis_object)inVertical axis of the series.
areareal(kind=R8P)inPlot area: left, right, top, bottom [px].
font_sizereal(kind=R8P)inFont size [px], for the label offsets.

Call graph

outline ​

Outline of a circle (radius r, from a1 to a2 covering 360 degrees and no hole), a wedge (from the centre along the arc from a1 to a2 [deg, counterclockwise]) or, with a hole of radius r_in, a ring sector: the vertices relative to the centre [same unit as r, y upward]; arcs sampled every 360/64 degrees at most.

Attributes: pure

fortran
subroutine outline(r, r_in, a1, a2, px, py)

Arguments

NameTypeIntentAttributesDescription
rreal(kind=R8P)inRadius.
r_inreal(kind=R8P)inHole radius, 0 for none.
a1real(kind=R8P)inStart angle [deg].
a2real(kind=R8P)inEnd angle [deg]; below a1: one more turn, as gnuplot.
pxreal(kind=R8P)outallocatableVertex abscissae.
pyreal(kind=R8P)outallocatableVertex ordinates.

Call graph

image_range ​

Range of the finite values of the images among the series all. A module procedure on the series array, as layout_histograms: gfortran 16 debug builds misread self%series(s)%grid through the class dummy.

Attributes: pure

fortran
subroutine image_range(all, zmin, zmax, found)

Arguments

NameTypeIntentAttributesDescription
alltype(series_object)inSeries of the panel.
zminreal(kind=R8P)outSmallest value.
zmaxreal(kind=R8P)outLargest value.
foundlogicaloutAny finite value.

layout_histograms ​

Bars of every histogram series of all from their values: clustered side by side in each row, or stacked by row (positive values up from 0, negative ones down, each sign on its own stack). A module procedure on the series array, not a binding: gfortran 16 corrupts the descriptor of self%series reached through the class dummy after its reallocation by add_series.

fortran
subroutine layout_histograms(all, rowstacked, gap, boxwidth)

Arguments

NameTypeIntentAttributesDescription
alltype(series_object)inoutSeries of the panel.
rowstackedlogicalinStacked by row, else clustered.
gapreal(kind=R8P)inGap between clusters [bar slots].
boxwidthreal(kind=R8P)inBar width factor, 0 for 1.

Call graph

draw_pie ​

A pie panel in the box (left, right, top, bottom) [px]: the slices of the values, from 12 o'clock clockwise in the palette colors, a hole of the donut fraction of the radius; the key at the right, an entry per slice with its label and percentage.

fortran
subroutine draw_pie(self, backend, box, font_size)

Arguments

NameTypeIntentAttributesDescription
selfclass(axes_object)inPanel.
backendclass(backend_object)inoutOutput device.
boxreal(kind=R8P)inBox: left, right, top, bottom [px].
font_sizereal(kind=R8P)inFont size [px].

Call graph

draw_gauges ​

Gauges side by side in the box (left, right, top, bottom) [px], one per series: a track of 270 degrees from 7:30 clockwise to 4:30, faint, lit from its start to the last finite value over the gauge scale (in segments cells if set, a cell lit when covered at least half); the scale ticks outside, the value in seven-segment digits under the centre, titled by the series.

fortran
subroutine draw_gauges(self, backend, box, font_size)

Arguments

NameTypeIntentAttributesDescription
selfclass(axes_object)inPanel.
backendclass(backend_object)inoutOutput device.
boxreal(kind=R8P)inBox: left, right, top, bottom [px].
font_sizereal(kind=R8P)inFont size [px].

Call graph

draw_radar ​

A radar (spider) chart in the box (left, right, top, bottom) [px]: a spoke per row, from 12 o'clock clockwise, named by the xtic labels of the first series having them; rings at the ticks of the common radial scale (from 0, or the smallest value if negative, extended to a tick); a polygon per series; the key at the right.

fortran
subroutine draw_radar(self, backend, box, font_size)

Arguments

NameTypeIntentAttributesDescription
selfclass(axes_object)inPanel.
backendclass(backend_object)inoutOutput device.
boxreal(kind=R8P)inBox: left, right, top, bottom [px].
font_sizereal(kind=R8P)inFont size [px].

Call graph

draw_rose ​

A rose (Nightingale) chart in the box (left, right, top, bottom) [px]: equal sectors from 12 o'clock clockwise, one per row in the palette colors, the sector area proportional to the value (its radius with linear); rings at the ticks of the value scale; the key at the right, the sector names.

fortran
subroutine draw_rose(self, backend, box, font_size)

Arguments

NameTypeIntentAttributesDescription
selfclass(axes_object)inPanel.
backendclass(backend_object)inoutOutput device.
boxreal(kind=R8P)inBox: left, right, top, bottom [px].
font_sizereal(kind=R8P)inFont size [px].

Call graph

chart_key ​

A chart key at the top right: an entry per label, a filled sample in its color on the right of its text.

fortran
subroutine chart_key(backend, right, top, labels, colors, density, font_size)

Arguments

NameTypeIntentAttributesDescription
backendclass(backend_object)inoutOutput device.
rightreal(kind=R8P)inKey right side [px].
topreal(kind=R8P)inKey top [px].
labelscharacter(len=*)inEntries.
colorscharacter(len=*)inSample colors.
densityreal(kind=R8P)inSample opacity.
font_sizereal(kind=R8P)inFont size [px].

Call graph

polar_extent ​

Largest |r| of the points of the series all (theta:r) drawn on a polar panel, readouts aside.

Attributes: pure

fortran
subroutine polar_extent(all, rmax, found)

Arguments

NameTypeIntentAttributesDescription
alltype(series_object)inSeries, theta:r.
rmaxreal(kind=R8P)outLargest |r|.
foundlogicaloutAny point.

polar_project ​

Project the series all from theta:r to x:y about the pole at r = rmin, as gnuplot: x = (r - rmin) cos(phi), y = (r - rmin) sin(phi), phi the page angle of theta; with cut (a fixed rmin) a point with r below rmin is undefined, else it lies across the pole. Readouts kept. (A module procedure, not a binding: gfortran 16 debug builds misread the components of self%series reached through the class dummy after their reallocation.)

Attributes: pure

fortran
subroutine polar_project(all, rmin, cut, degrees, origin, clockwise)

Arguments

NameTypeIntentAttributesDescription
alltype(series_object)inoutSeries: theta:r in, x:y out.
rminreal(kind=R8P)inr at the pole.
cutlogicalinPoints below rmin undefined.
degreeslogicalinTheta in degrees, else radians.
originreal(kind=R8P)inPage angle of theta = 0 [deg].
clockwiselogicalinTheta grows clockwise.

boxplot_words ​

Update the boxplot style with gnuplot set style boxplot words: range R, fraction F, [no]outliers, pointtype|pt P, candlesticks, financebars, medianlinewidth W, separation S, labels off|auto|x, sorted, unsorted. bad names the first problem, empty if none (the style is then unchanged).

Attributes: pure

fortran
subroutine boxplot_words(words, style, bad)

Arguments

NameTypeIntentAttributesDescription
wordscharacter(len=*)inWords.
styletype(boxplot_style)inoutBoxplot style.
badcharacter(len=:)outallocatableProblem, empty if none.

Call graph

curve_words ​

Filled curve options of series from gnuplot words: closed, x1 (to the bottom), x2 (to the top), xy=X,Y (to a point), above, below (where the curve is above or below its line or second curve). bad names the first problem.

Attributes: pure

fortran
subroutine curve_words(words, series, bad)

Arguments

NameTypeIntentAttributesDescription
wordscharacter(len=*)inWords.
seriestype(series_object)inoutFilled curve series.
badcharacter(len=:)outallocatableProblem, empty if none.

Call graph

spider_words ​

The spider plot style from gnuplot set style spiderplot words: fill style words (after an optional fs or fillstyle), lw|linewidth W, pt|pointtype N, ps|pointsize S. bad names the first problem.

fortran
subroutine spider_words(words, style, bad)

Arguments

NameTypeIntentAttributesDescription
wordscharacter(len=*)inWords.
styletype(style_object)inoutSpider plot style.
badcharacter(len=:)outallocatableProblem, empty if none.

Call graph

head_words ​

Arrowheads from gnuplot words: head (at the end), heads (both), nohead, backhead (at the start); filled, empty or nofilled (open). bad names an unknown word, empty if none.

Attributes: pure

fortran
subroutine head_words(words, head, filled, bad)

Arguments

NameTypeIntentAttributesDescription
wordscharacter(len=*)inWords.
headinteger(kind=I4P)inoutHeads: 0 none, 1 end, 2 start, 3 both.
filledlogicalinoutFilled heads.
badcharacter(len=:)outallocatableUnknown word, empty if none.

Call graph

label_words ​

Label options of series from gnuplot with labels words: left, center, right, rotate by A, norotate, offset X,Y [characters], point / nopoint, tc|textcolor [rgb] "color". bad names the first problem.

Attributes: pure

fortran
subroutine label_words(words, series, bad)

Arguments

NameTypeIntentAttributesDescription
wordscharacter(len=*)inWords.
seriestype(series_object)inoutLabels series.
badcharacter(len=:)outallocatableProblem, empty if none.

Call graph

scan_word ​

Next blank separated word of text from pos, advanced past it; a quoted word may hold blanks. Empty at the end.

Attributes: pure

fortran
subroutine scan_word(text, pos, word)

Arguments

NameTypeIntentAttributesDescription
textcharacter(len=*)inText.
posinteger(kind=I4P)inoutScan position.
wordcharacter(len=:)outallocatableWord.

Call graph

draw_parallel ​

A parallel axis plot in the box (left, right, top, bottom) [px], as gnuplot: a vertical axis per series at its number (or at), the x range one unit beyond the first and last, each axis scaled on its own (set paxis) and titled below by its series; a line per row across the axes, in the first series' style; the frame around.

fortran
subroutine draw_parallel(self, backend, box, font_size)

Arguments

NameTypeIntentAttributesDescription
selfclass(axes_object)inPanel.
backendclass(backend_object)inoutOutput device.
boxreal(kind=R8P)inBox: left, right, top, bottom [px].
font_sizereal(kind=R8P)inFont size [px].

Call graph

draw_spider ​

A spider plot in the box (left, right, top, bottom) [px], as gnuplot: a radial axis per series, the first up, the others clockwise, each scaled on its own (set paxis, the smallest value at the centre by default) and labelled outside by its series title, else by set paxis N label; the web (set grid spiderplot) at the ticks of axis 1; a polygon per row in its palette color and the spider plot style, named in the key by the key(N) column.

fortran
subroutine draw_spider(self, backend, box, font_size)

Arguments

NameTypeIntentAttributesDescription
selfclass(axes_object)inPanel.
backendclass(backend_object)inoutOutput device.
boxreal(kind=R8P)inBox: left, right, top, bottom [px].
font_sizereal(kind=R8P)inFont size [px].

Call graph

draw_colorbox ​

The color box: the palette gradient over the color axis (bottom to top), its frame, ticks, labels and label, between the plot area and the panel right side right.

fortran
subroutine draw_colorbox(self, backend, area, right, font_size)

Arguments

NameTypeIntentAttributesDescription
selfclass(axes_object)inPanel.
backendclass(backend_object)inoutOutput device.
areareal(kind=R8P)inPlot area: left, right, top, bottom [px].
rightreal(kind=R8P)inPanel right side [px].
font_sizereal(kind=R8P)inFont size [px].

Call graph

setup_axes ​

Effective ranges and ticks for the plot area: x from every series, each y axis from its own series and the points inside the x range, as gnuplot. The second y axis is active when it has data or both its ends are fixed.

A polar panel sets up its r axis from the series as given (raw, theta:r), projects them into its series, and autoscales x and y to the disc of the largest radius, as gnuplot.

fortran
subroutine setup_axes(self, area, raw)

Arguments

NameTypeIntentAttributesDescription
selfclass(axes_object)inoutPanel.
areareal(kind=R8P)inPlot area: left, right, top, bottom [px].
rawtype(series_object)inoptionalSeries of a polar panel, theta:r.

Call graph

axes_names ​

Axes named by gnuplot's concatenated axis names, e.g. x, y2, xy, xyy2: each found one sets its flag (the others are left unchanged); bad is the first unsupported rest (x2 included), empty if none.

Attributes: pure

fortran
subroutine axes_names(names, x, y, y2, bad)

Arguments

NameTypeIntentAttributesDescription
namescharacter(len=*)inAxis names.
xlogicalinoutx named.
ylogicalinouty named.
y2logicalinouty2 named.
badcharacter(len=:)outallocatableUnsupported rest, empty if none.

Call graph

readout_position ​

Update the readout block position from the set key position words inside the plot area (see key_position): outside, below and above are not readout positions.

Attributes: pure

fortran
subroutine readout_position(words, horizontal, vertical, layout, bad)

Arguments

NameTypeIntentAttributesDescription
wordscharacter(len=*)inBlank separated words.
horizontalcharacter(len=6)inoutHorizontal position.
verticalcharacter(len=6)inoutVertical position.
layoutlogicalinoutReadouts side by side.
badcharacter(len=:)outallocatableFirst word not a position, empty if none.

Call graph

key_position ​

Update the key position from gnuplot set key position words, applied in order: left, right, top, bottom, and center, which centres the direction not given yet by words (both if none, as gnuplot); inside, outside; below (under) and above (over), centred rows below or above the plot; horizontal, vertical the layout of the entries.

Attributes: pure

fortran
subroutine key_position(words, horizontal, vertical, outside, margin, layout, bad)

Arguments

NameTypeIntentAttributesDescription
wordscharacter(len=*)inBlank separated words.
horizontalcharacter(len=6)inoutHorizontal position.
verticalcharacter(len=6)inoutVertical position.
outsidelogicalinoutOutside the plot area.
margincharacter(len=6)inouttop, bottom or empty.
layoutlogicalinoutEntries side by side.
badcharacter(len=:)outallocatableFirst word not a position, empty if none.

Call graph

Functions ​

page_angle ​

Page angle of the theta theta [deg] (counterclockwise from the right) [rad], after set theta.

Attributes: elemental

Returns: real(kind=R8P)

fortran
function page_angle(self, theta) result(a)

Arguments

NameTypeIntentAttributesDescription
selfclass(axes_object)inPanel.
thetareal(kind=R8P)inTheta [deg].

Call graph

key_place ​

Where the key lies: inside the plot area, in the left or right margin, top (above the plot) or bottom (below it); outside and centred both ways it stays inside, as gnuplot.

Attributes: pure

Returns: character(len=6)

fortran
function key_place(self) result(place)

Arguments

NameTypeIntentAttributesDescription
selfclass(axes_object)inPanel.

Call graph

chart_key_width ​

Width of a chart key [px]: the widest entry, a gap, the sample.

Attributes: pure

Returns: real(kind=R8P)

fortran
function chart_key_width(backend, labels, font_size) result(width)

Arguments

NameTypeIntentAttributesDescription
backendclass(backend_object)inOutput device.
labelscharacter(len=*)inEntries.
font_sizereal(kind=R8P)inFont size [px].

Call graph

polar_series ​

Whether series can be drawn on a polar panel (see POLAR_STYLES).

Attributes: elemental

Returns: logical

fortran
function polar_series(series) result(ok)

Arguments

NameTypeIntentAttributesDescription
seriestype(series_object)inSeries.

Call graph

parallel_axis ​

The parallel axis k (set paxis k, else autoscaled without extension and without ticks) set up for the values of the k-th series, npx pixels long.

Returns: type(axis_object)

fortran
function parallel_axis(self, k, npx) result(axis)

Arguments

NameTypeIntentAttributesDescription
selfclass(axes_object)inPanel.
kinteger(kind=I4P)inAxis number.
npxreal(kind=R8P)inAxis length [px].

Call graph

is_panel_chart ​

Whether the style with is a chart alone in its panel, without the x and y axes: pie, gauge, radar, rose, and the parallel axis and spider plots.

Attributes: elemental

Returns: logical

fortran
function is_panel_chart(with) result(is)

Arguments

NameTypeIntentAttributesDescription
withinteger(kind=I4P)inStyle code.

Call graph

has_image ​

Whether the panel has an image; with palette true, an image of values colored by the palette (not RGB).

Attributes: pure

Returns: logical

fortran
function has_image(self, palette) result(has)

Arguments

NameTypeIntentAttributesDescription
selfclass(axes_object)inPanel.
palettelogicalinoptionalPalette images only.

Call graph

any_image ​

Whether the series all hold an image, a palette one (not RGB) if palette. A module procedure on the series array, as image_range: gfortran 16 debug builds misread the components of self%series(s) through the class dummy.

Attributes: pure

Returns: logical

fortran
function any_image(all, palette) result(has)

Arguments

NameTypeIntentAttributesDescription
alltype(series_object)inSeries of the panel.
palettelogicalinPalette images only.

Call graph

effective_palette ​

palette, or the palette of the theme if it has the default colors: from the dark glass to the emissive colors (vfd), from the pale glass to the dark segments (lcd), quantized as palette (maxcolors).

Returns: type(palette_object)

fortran
function effective_palette(palette, theme) result(p)

Arguments

NameTypeIntentAttributesDescription
palettetype(palette_object)inPanel palette.
themecharacter(len=*)inTheme name.

Call graph

is_readout ​

Whether the s-th series is a readout.

Attributes: elemental

Returns: logical

fortran
function is_readout(self, s) result(is)

Arguments

NameTypeIntentAttributesDescription
selfclass(axes_object)inPanel.
sinteger(kind=I4P)inSeries index.

Call graph

has_title ​

Whether the panel has a non-empty title.

Attributes: pure

Returns: logical

fortran
function has_title(self) result(has)

Arguments

NameTypeIntentAttributesDescription
selfclass(axes_object)inPanel.

Call graph

place_plot_area ​

Plot area left by the margins that tick labels, axis labels, title and a key above need, measured by the device.

Attributes: pure

Returns: real(kind=R8P)

fortran
function place_plot_area(self, backend, x0, y0, width, height, font_size, above) result(area)

Arguments

NameTypeIntentAttributesDescription
selfclass(axes_object)inPanel.
backendclass(backend_object)inOutput device, for text widths.
x0real(kind=R8P)inBox left side [px].
y0real(kind=R8P)inBox top side [px].
widthreal(kind=R8P)inBox width [px].
heightreal(kind=R8P)inBox height [px].
font_sizereal(kind=R8P)inFont size [px].
abovereal(kind=R8P)inRoom for a key between the title and the plot [px].

Call graph

colorbox_width ​

Room of the color box at the right of the plot area: a gap, the box, a gap, its tick labels, the label [px].

Attributes: pure

Returns: real(kind=R8P)

fortran
function colorbox_width(self, backend, font_size) result(room)

Arguments

NameTypeIntentAttributesDescription
selfclass(axes_object)inPanel.
backendclass(backend_object)inOutput device, for text widths.
font_sizereal(kind=R8P)inFont size [px].

Call graph