Skip to content

foresight_series ​

foresight_series, a plotted data series.

Source: src/lib/foresight_series.F90

Dependencies

Contents ​

Variables ​

NameTypeAttributesDescription
LABEL_LENinteger(kind=I4P)parameterLongest text label of a point (xtic, labels), longer ones cut; fixed: nvfortran 26.9 corrupts the heap assigning and copying deferred-length character array components.

Derived Types ​

series_object ​

Data series.

Components

NameTypeAttributesDescription
xreal(kind=R8P)allocatableAbscissae.
yreal(kind=R8P)allocatableOrdinates.
xlowreal(kind=R8P)allocatableHorizontal error bar starts, allocated for x error bars.
xhighreal(kind=R8P)allocatableHorizontal error bar ends, allocated for x error bars.
ylowreal(kind=R8P)allocatableVertical error bar starts, allocated for y error bars.
yhighreal(kind=R8P)allocatableVertical error bar ends, allocated for y error bars.
title_plainlogicalThe title as it is, not enhanced text (an automatic title, gnuplot's noenhanced).
titlecharacter(len=:)allocatableKey title, empty for none; the label of a readout.
formatcharacter(len=:)allocatableReadout format (foresight_readout), readouts only.
xlabelscharacter(len=LABEL_LEN)allocatableText labels of the abscissae (xtic(N)), blank for none.
label_axischaracter(len=2)Axis the text labels mark: x (xtic), x2 (x2tic) at the abscissae, y (ytic), y2 (y2tic) at the ordinates.
pointintervalinteger(kind=I4P)A point marker every N points, the first one included (gnuplot pointinterval).
own_colorscharacter(len=24)allocatableA histogram's colors per row (lc variable), kept through its layouts (which rebuild colors).
colorscharacter(len=24)allocatableColor of each point (gnuplot lc variable), unallocated for none; of lc palette z, set at each rendering.
palette_modeinteger(kind=I4P)Color from the palette (gnuplot lc palette): 0 none, 1 a value per point (z, zvalues), 2 a color axis value (cb), 3 a fraction of the palette (frac); value.
palette_valuereal(kind=R8P)The cb value or the frac fraction.
zvaluesreal(kind=R8P)allocatablePalette value of each point (lc palette z), unallocated for none.
valuesreal(kind=R8P)allocatableValues of a histogram, y being the top of its bar or stack segment.
gridreal(kind=R8P)allocatableValues of an image (column, row), rows upward; x and y are then its left and right, bottom and top pixel edges.
radiusreal(kind=R8P)allocatableRadii of circles [x units], NaN for the default (2% of the plot width).
arcsreal(kind=R8P)allocatableStart and end angles of wedges (2, point) [deg, counterclockwise from the x direction]; unallocated for whole circles.
donutreal(kind=R8P)Inner radius of a pie, a fraction of its radius (0: a pie).
scalereal(kind=R8P)Value range of a gauge: start and end of its sweep.
linearlogicalRose sectors with the radius (not the area) by value.
boundsreal(kind=R8P)allocatableSecond pair of ordinates per point (2, point): the error bar ends of boxerrorbars, the box ends of candlesticks (open, close) and of boxplot (first, third quartile); unallocated otherwise.
outliersreal(kind=R8P)allocatableOutliers of a boxplot (2, outlier): abscissa, ordinate.
whiskerbarsreal(kind=R8P)Crossbars of the candlestick whiskers, a fraction of the box width; 0 for none.
tipsreal(kind=R8P)allocatableSecond number pair per point (2, point): the tips of vectors, the length and angle [deg] of arrows.
shapereal(kind=R8P)allocatableEllipse major, minor diameter and angle [deg] (3, point); NaN diameters for the default size.
headinteger(kind=I4P)Arrowheads: 0 none, 1 end, 2 start, 3 both.
head_filledlogicalFilled arrowheads.
textscharacter(len=LABEL_LEN)allocatableTexts of labels, one per point.
text_anchorcharacter(len=6)Label anchor: start, middle, end.
text_rotatereal(kind=R8P)Label rotation [deg, counterclockwise].
text_offsetreal(kind=R8P)Label offset [characters, y upward].
text_colorcharacter(len=:)allocatableLabel color, the frame color if unallocated.
fonttype(font_object)Label font (with labels font "...").
text_pointlogicalLabels mark their point.
curve_tointeger(kind=I4P)Fill of filledcurves: 0 closed, to ylow (a line or a band); 1 to the bottom (gnuplot x1), 2 to the top (x2), 3 to the point curve_point (xy=).
curve_sideinteger(kind=I4P)Fill restricted where the curve is above (1) or below (-1) its line or second curve; 0 both.
curve_pointreal(kind=R8P)Point of xy=X,Y.
atreal(kind=R8P)Position of a parallel axis (gnuplot at); 0 for its number.
hist_groupinteger(kind=I4P)Histogram group (gnuplot newhistogram), 0 the first.
rowsreal(kind=R8P)allocatableRows of a histogram (its abscissae as given), from 0.
vertex_rowsinteger(kind=I4P)allocatableData row of each vertex of sectors (0 for a separator).
vertex_centresreal(kind=R8P)allocatableCentre (2, vertex) of the sector of each vertex (cartesian sectors; NaN for a separator), for units xx|yy.
hist_at_setlogicalThe group starts at hist_at, else after the previous one.
hist_atreal(kind=R8P)Start of the histogram group (gnuplot newhistogram at X).
hist_titlecharacter(len=:)allocatableTitle of the histogram group, below the x axis.
at_setlogicalat given.
channelsreal(kind=R8P)allocatableRed, green, blue, alpha of an RGB image (4, column, row), 0 to 255 (grid holds the red ones); unallocated for a palette image.
styletype(style_object)Drawing style.
y2logicalOn the second y axis (gnuplot axes x1y2), else on the first.
x2logicalOn the second x axis (gnuplot axes x2y1), else on the first.
spannedlogicalThe autoscale also includes span.
spanreal(kind=R8P)Extent beyond the points, x from-to and y from-to: the outer edges of bins and their y = 0, as gnuplot.
text_boxedlogicalLabels in a text box (gnuplot with labels boxed).
head_sizereal(kind=R8P)Arrowhead length (0: the default head) and angle [deg] of vectors and arrows (gnuplot size L,A).
head_fixedlogicalThe heads keep their size on short arrows (fixed).
head_systemcharacter(len=9)System of the head length: first, graph, screen, character.
title_atinteger(kind=I4P)Title place (gnuplot title ... at): 0 the key, 1 before the first point, 2 after the last one, 3 a page position, 4 a plot area position (graph coordinates).
title_xyreal(kind=R8P)That position, screen fractions from the bottom left.
key_mid_palettelogicalKey sample in the palette's middle color (gnuplot's polar gridded surface).
crisplogicalPolygons drawn with crisp edges, no antialiased seams between them (gnuplot's svg cells of a polar gridded surface).
point_sizesreal(kind=R8P)allocatableEach point's size (gnuplot ps variable), else the style's.
point_typesinteger(kind=I4P)allocatableEach point's type (gnuplot pt variable; 0 a dot), else the style's.
hypertextlogicalLabels shown on mouse-over of their points (hypertext).
point_colorcharacter(len=:)allocatableColor of the points of labels (their lc), black if unset.
title_justifyinteger(kind=I4P)title at beginning|end left|right: 1 left, 2 right, 0 the place's own (right before the first point).
pointnumberinteger(kind=I4P)About N point markers evenly spread, 0 for all (gnuplot pointnumber).
ellipse_unitscharacter(len=2)Units of the ellipse diameters: xy (major in x, minor in y), xx (both in x), yy (both in y).
text_rotationsreal(kind=R8P)allocatableRotation of each label [deg] (gnuplot rotate variable), text_rotate for all when unallocated.
arrow_headsinteger(kind=I4P)allocatableHeads of each arrow (gnuplot arrowstyle variable), as head; the series' own for all when unallocated.
arrow_filledlogicalallocatableFilled heads of each arrow, as head_filled.
arrow_widthsreal(kind=R8P)allocatableLine width of each arrow [px].
arrow_sizesreal(kind=R8P)allocatableHead length and angle of each arrow, as head_size.
arrow_systemscharacter(len=9)allocatableSystem of each head length, as head_system.
xlabels2character(len=LABEL_LEN)allocatableText labels of a second axis (xtic(..):ytic(..)).
label_axis2character(len=2)Axis of those labels.
title_autologicalThe title a script's automatic one (the item as written).
noautoscalelogicalOut of the autoscaling of its axes (gnuplot noautoscale).
gnuplot_samplelogicalA script's key sample, as gnuplot 6.0: an arrow for vectors and arrows, none for labels (their point with point); else the library's line.
fill_borderlogicalfilledcurves: the fill style's border, never drawn by the library (see fill_edges).
fill_edgesinteger(kind=I4P)filledcurves: where that border is drawn: 0 nowhere (the library's), 1 as gnuplot 6.0 (a script's): around the key sample, and along a closed curve (not its closing side).
blank_tickslogicalA blank text label is a tick too (a script's xtic(""), the rug, as gnuplot); else no tick (the library's).
spider_groupinteger(kind=I4P)Spider plot group (gnuplot newspiderplot), 0 the first: its series restart at the first axis.
spider_keylogicalA key entry of a spider plot group (gnuplot keyentry with spiderplot), no axis.
spider_colorcharacter(len=24)Polygon color of the group (the lc of its first item), blank for the row linetypes.
spider_lwreal(kind=R8P)Polygon border width of the group (the lw of its first item), 0 for the spider plot style's.
radial_barslogicalError bars of a polar panel: the ends x:y in xlow:ylow and xhigh:yhigh, drawn along the radius.
colormapinteger(kind=I4P)Named colormap of the palette colors (the panel's colormaps), 0 for the panel palette.
zreal(kind=R8P)allocatableHeights of a 3D series (gnuplot splot), one per point (NaN at the breaks between scans, as x and y); unallocated for a 2D series.
scansinteger(kind=I4P)allocatableScans of a 3D series (2, scan): the first and last point of each (gnuplot's iso-curves: a data block, a matrix row, a function line).
scan_setsinteger(kind=I4P)allocatableDataset of each scan, from 0: each a surface of its own (gnuplot).
grid_scansinteger(kind=I4P)Leading scans making the surface grid; the others are the cross iso-curves of a function (drawn, not gridded).
data_scanslogicalScans read from data, which gnuplot keeps last first (its table order); a function's are in order.
sampled_scanslogicalScans of a script's function surface, in gnuplot's list order (its pm3d scan order mirrors a data file's).
key_blanklogicalA key entry of its title alone, no sample (gnuplot's pm3d surfaces).
no_contourslogicalNo contour lines (gnuplot's item option nocontours).
no_surfacelogicalIts surface not drawn (gnuplot's item option nosurface).
maskedlogicalMasked by the with mask polygons (item option mask).
back_colorcharacter(len=:)allocatableColor of the underside of a surface with set hidden3d, unallocated for its own.
zvalues_rgblogicalzvalues are packed colors 0xAARRGGBB (gnuplot's pm3d lc rgb variable), not palette values.
cb_lonelogicalThe color axis autoscales over its last two finite zvalues only (pm3d quadrangles: the lone points of the surface's range within the ranges set, gnuplot's).
colors_keptlogicalcolors set per point; the palette paints only the points of a finite zvalues (the color range of pm3d quads).
no_hiddenlogicalOut of the hidden surfaces of set hidden3d (item option nohidden3d): drawn as it is.
key_textcharacter(len=:)allocatableA text as the key sample (gnuplot's keyentry "text"), unallocated if none.
contourlogicalContour lines of a surface in a 3D view (drawn without its surface too).
contour_baselogicalThose on the base plane (set contour base).
contour_labelslogicalIts contours drawn as labels of their levels (a function with labels, gnuplot's cntr3d_labels).
zlowreal(kind=R8P)allocatablewith zerrorfill: the low ends of the z errors.
zhighreal(kind=R8P)allocatableTheir high ends.
zerrorfilllogicalwith zerrorfill: quadrangles from zlow to zhigh between the points (gnuplot's plot3d_zerrorfill), the line through z.
contourfilllogicalwith contourfill: pm3d quadrangles clipped to z slices, each slice in one color (gnuplot's plot3d_contourfill).
rgb_valuesreal(kind=R8P)allocatableThe packed colors 0xAARRGGBB of lc rgb variable lines (those of an implicit pm3d surface, gnuplot's color_from_rgbvar).
pm3d_pendinglogicalA surface whose pm3d quadrangles a 3D view draws once its projection is known (view3d_pm3d_quads), not drawn itself.

Type-Bound Procedures

NameAttributesDescription
extentpass(self)Accumulate the data extent.
validpass(self)Mask of the placeable points.

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_series

Subroutines ​

extent ​

Widen the extent (xmin, xmax, ymin, ymax) to the placeable points of the series.

With xwindow only the points whose abscissa lies inside it count: gnuplot autoscales y on the points inside the x range only. Error bar ends placeable on their axis widen the extent too, as in gnuplot; histogram rows widen the x extent by one unit on each side, as gnuplot. Semi-major axis. Semi-minor axis. Angle [rad]. Half width. Half height.

Attributes: pure

fortran
subroutine extent(self, xaxis, yaxis, xmin, xmax, ymin, ymax, found, xwindow)

Arguments

NameTypeIntentAttributesDescription
selfclass(series_object)inSeries.
xaxistype(axis_object)inHorizontal axis.
yaxistype(axis_object)inVertical axis.
xminreal(kind=R8P)inoutSmallest abscissa.
xmaxreal(kind=R8P)inoutLargest abscissa.
yminreal(kind=R8P)inoutSmallest ordinate.
ymaxreal(kind=R8P)inoutLargest ordinate.
foundlogicalinoutSet if the series has any counted point.
xwindowreal(kind=R8P)inoptionalAbscissa window, in any order.

Call graph

push_series ​

Append item to list (an unallocated list is empty), through a temporary: see push.

Attributes: pure

fortran
subroutine push_series(list, item)

Arguments

NameTypeIntentAttributesDescription
listtype(series_object)inoutallocatableList.
itemtype(series_object)inNew item.

Functions ​

valid ​

Mask of the points placeable on both axes; the others are gaps, as gnuplot undefined points.

Attributes: pure

Returns: logical

fortran
function valid(self, xaxis, yaxis) result(mask)

Arguments

NameTypeIntentAttributesDescription
selfclass(series_object)inSeries.
xaxistype(axis_object)inHorizontal axis.
yaxistype(axis_object)inVertical axis.

Call graph

Released under the GPL v3, BSD 2-Clause, BSD 3-Clause or MIT License.