Skip to content

foresight_style ​

foresight_style, series drawing style (gnuplot with, lc, lw, dt, pt, ps, fs).

Filled styles (boxes, filledcurves) take gnuplot's fill style: empty (the default, the border only), solid D (the line color at opacity D, 1 by default; transparent before it changes nothing in SVG, as gnuplot's svg terminal), with a border in the line color, another color (border lc "c", border -1 black) or noborder. foresight adds segments N (boxes and histograms): the y range cut into N cells, a bar lighting the cells it covers at least half, the others drawn faintly, as the bar graphs of a 1980s display.

Source: src/lib/foresight_style.F90

Dependencies

Contents ​

Variables ​

NameTypeAttributesDescription
WITH_LINESinteger(kind=I4P)parametergnuplot with lines.
WITH_POINTSinteger(kind=I4P)parametergnuplot with points.
WITH_LINESPOINTSinteger(kind=I4P)parametergnuplot with linespoints.
WITH_YERRORBARSinteger(kind=I4P)parametergnuplot with yerrorbars.
WITH_XERRORBARSinteger(kind=I4P)parametergnuplot with xerrorbars.
WITH_XYERRORBARSinteger(kind=I4P)parametergnuplot with xyerrorbars.
WITH_READOUTinteger(kind=I4P)parameterforesight with readout: the last value in seven-segment digits.
WITH_BOXESinteger(kind=I4P)parametergnuplot with boxes.
WITH_FILLEDCURVESinteger(kind=I4P)parametergnuplot with filledcurves.
WITH_HISTOGRAMSinteger(kind=I4P)parametergnuplot with histograms.
WITH_IMAGEinteger(kind=I4P)parametergnuplot with image.
WITH_CIRCLESinteger(kind=I4P)parametergnuplot with circles: circles and wedges.
WITH_PIEinteger(kind=I4P)parameterforesight with pie: a pie or donut chart.
WITH_GAUGEinteger(kind=I4P)parameterforesight with gauge: the last value on a sweep gauge.
WITH_RADARinteger(kind=I4P)parameterforesight with radar: a polygon over the spokes of the rows.
WITH_ROSEinteger(kind=I4P)parameterforesight with rose: equal sectors, area or radius by value.
WITH_IMPULSESinteger(kind=I4P)parametergnuplot with impulses: a segment from y = 0 to each point.
WITH_STEPSinteger(kind=I4P)parametergnuplot with steps: horizontal, then vertical.
WITH_FSTEPSinteger(kind=I4P)parametergnuplot with fsteps: vertical, then horizontal.
WITH_HISTEPSinteger(kind=I4P)parametergnuplot with histeps: steps around the points, from y = 0.
WITH_DOTSinteger(kind=I4P)parametergnuplot with dots: a tiny dot per point.
WITH_YERRORLINESinteger(kind=I4P)parametergnuplot with yerrorlines: linespoints and y error bars.
WITH_XERRORLINESinteger(kind=I4P)parametergnuplot with xerrorlines: linespoints and x error bars.
WITH_XYERRORLINESinteger(kind=I4P)parametergnuplot with xyerrorlines: linespoints and both bars.
WITH_BOXERRORBARSinteger(kind=I4P)parametergnuplot with boxerrorbars: boxes with y error bars.
WITH_BOXXYERRORinteger(kind=I4P)parametergnuplot with boxxyerror: a rectangle per point.
WITH_CANDLESTICKSinteger(kind=I4P)parametergnuplot with candlesticks: box and whiskers.
WITH_FINANCEBARSinteger(kind=I4P)parametergnuplot with financebars: high-low bars, open/close ticks.
WITH_BOXPLOTinteger(kind=I4P)parametergnuplot with boxplot: quartiles of the values, outliers.
WITH_VECTORSinteger(kind=I4P)parametergnuplot with vectors: arrows from x:y by dx:dy.
WITH_ARROWSinteger(kind=I4P)parametergnuplot with arrows: arrows from x:y by length and angle.
WITH_ELLIPSESinteger(kind=I4P)parametergnuplot with ellipses: an ellipse per point.
WITH_POLYGONSinteger(kind=I4P)parametergnuplot with polygons: a closed polygon per block.
WITH_LABELSinteger(kind=I4P)parametergnuplot with labels: text at each point.
WITH_SECTORSinteger(kind=I4P)parametergnuplot with sectors: annular sectors.
WITH_PARALLELAXESinteger(kind=I4P)parametergnuplot with parallelaxes: an axis per item, a line per row.
WITH_SPIDERPLOTinteger(kind=I4P)parametergnuplot with spiderplot: a radial axis per item, a polygon
STYLE_NAMEScharacter(len=*)parameterSupported style names.
FILL_EMPTYinteger(kind=I4P)parametergnuplot set style fill empty: no fill.
FILL_SOLIDinteger(kind=I4P)parametergnuplot set style fill solid.
FILL_PATTERNinteger(kind=I4P)parametergnuplot set style fill pattern N.
PATTERNSinteger(kind=I4P)parameterFill patterns of gnuplot's svg terminal, cycling: 0 empty, 1
PALETTEcharacter(len=7)parametergnuplot 5 line colors.
DIAMETER_AT_UNIT_SIZEreal(kind=R8P)parameterRound dot diameter at pointsize 1 [px].
MARKER_AT_UNIT_SIZEreal(kind=R8P)parameterPoint type size at pointsize 1 [px], gnuplot svg.

Derived Types ​

style_object ​

Series drawing style.

Components ​

NameTypeAttributesDescription
withinteger(kind=I4P)Plotting style.
colorcharacter(len=:)allocatableLine and point color (SVG color).
linewidthreal(kind=R8P)Line width [px].
dashtypeinteger(kind=I4P)gnuplot dash type: 1 solid, 2..5 dash patterns.
pointsizereal(kind=R8P)Point size scale factor.
pointtypeinteger(kind=I4P)gnuplot point type: 0 a dot, 1.. the shapes (cycling every
fillinteger(kind=I4P)Fill of filled styles.
densityreal(kind=R8P)Fill opacity, solid fills.
borderlogicalBorder of filled styles.
border_colorcharacter(len=:)allocatableBorder color, empty for the line color.
segmentsinteger(kind=I4P)Cells over the y range of a segmented fill, 0 for none.
patterninteger(kind=I4P)Fill pattern (FILL_PATTERN), cycling every PATTERNS.

Type-Bound Procedures ​

NameAttributesDescription
dasharraypass(self)SVG dash array.
draws_xbarspass(self)Whether horizontal error bars are drawn.
fillspass(self)Whether the style is a filled one.
fill_colorpass(self)Fill color, none if empty.
stroke_colorpass(self)Border color of a filled style, none if no border.
draws_ybarspass(self)Whether vertical error bars are drawn.
draws_linespass(self)Whether lines are drawn.
draws_pointspass(self)Whether points are drawn.
point_diameterpass(self)Point diameter [px].

Subroutines ​

pattern_parts ​

The pattern (1 to PATTERNS - 1) and color of a pattern fill pattern:N:color (fill_color); pattern 0 and color the fill itself for any other fill.

Attributes: pure

fortran
subroutine pattern_parts(fill, pattern, color)

Arguments

NameTypeIntentAttributesDescription
fillcharacter(len=*)inFill color.
patterninteger(kind=I4P)outPattern, 0 for none.
colorcharacter(len=:)outallocatableColor.

Call graph

fill_style ​

Update the fill of style from gnuplot fill style words, blank separated: empty, solid [D], transparent solid [D], border [lc [rgb] COLOR | -1] (COLOR quoted or not), noborder, and foresight's segments N (N from 1 to 1000; segments 0 for none); bad is the first word not understood.

fortran
subroutine fill_style(words, style, bad)

Arguments

NameTypeIntentAttributesDescription
wordscharacter(len=*)inFill style words.
styletype(style_object)inoutStyle updated.
badcharacter(len=:)outallocatableFirst word not understood, empty if none.

Call graph

Functions ​

default_color ​

Default color of the index-th series, cycling the gnuplot 5 palette.

Attributes: pure

Returns: character(len=:)

fortran
function default_color(index) result(color)

Arguments

NameTypeIntentAttributesDescription
indexinteger(kind=I4P)inSeries index, from 1.

Call graph

style_name ​

Full name of the gnuplot style word, full or abbreviated as gnuplot accepts it (l, p, lp, i, st, fs, his, d, yerr, yerrorl, ...), or foresight's readout, pie, gauge, radar, rose (full words only); empty if unsupported. As gnuplot, his is histeps and histograms need hist.

Attributes: pure

Returns: character(len=:)

fortran
function style_name(word) result(name)

Arguments

NameTypeIntentAttributesDescription
wordcharacter(len=*)inStyle word.

Call graph

style_with ​

Plotting style code of a gnuplot with keyword, full or abbreviated (see style_name).

Returns: integer(kind=I4P)

fortran
function style_with(name) result(with)

Arguments

NameTypeIntentAttributesDescription
namecharacter(len=*)ingnuplot style keyword.

Call graph

dasharray ​

SVG stroke-dasharray of the dash type, scaled by the line width; empty for solid lines.

Attributes: pure

Returns: character(len=:)

fortran
function dasharray(self) result(dashes)

Arguments

NameTypeIntentAttributesDescription
selfclass(style_object)inStyle.

Call graph

draws_lines ​

Whether the style draws lines.

Attributes: elemental

Returns: logical

fortran
function draws_lines(self) result(lines)

Arguments

NameTypeIntentAttributesDescription
selfclass(style_object)inStyle.

Call graph

draws_points ​

Whether the style draws points: every style but lines and readouts (error bars mark their points).

Attributes: elemental

Returns: logical

fortran
function draws_points(self) result(points)

Arguments

NameTypeIntentAttributesDescription
selfclass(style_object)inStyle.

Call graph

draws_xbars ​

Whether the style draws horizontal error bars.

Attributes: elemental

Returns: logical

fortran
function draws_xbars(self) result(bars)

Arguments

NameTypeIntentAttributesDescription
selfclass(style_object)inStyle.

Call graph

draws_ybars ​

Whether the style draws vertical error bars.

Attributes: elemental

Returns: logical

fortran
function draws_ybars(self) result(bars)

Arguments

NameTypeIntentAttributesDescription
selfclass(style_object)inStyle.

Call graph

fills ​

Whether the style is a filled one: boxes, filledcurves, histograms, circles and the panel charts (pie, gauge, radar, rose).

Attributes: elemental

Returns: logical

fortran
function fills(self) result(filled)

Arguments

NameTypeIntentAttributesDescription
selfclass(style_object)inStyle.

Call graph

fill_color ​

Fill color of a filled style: the line color when solid, none when empty.

Attributes: pure

Returns: character(len=:)

fortran
function fill_color(self) result(color)

Arguments

NameTypeIntentAttributesDescription
selfclass(style_object)inStyle.

Call graph

stroke_color ​

Border color of a filled style: its own, the line color, or none without border.

Attributes: pure

Returns: character(len=:)

fortran
function stroke_color(self) result(color)

Arguments

NameTypeIntentAttributesDescription
selfclass(style_object)inStyle.

Call graph

point_diameter ​

Point size [px]: the round dot diameter, or the width of a point type shape (gnuplot svg scale).

Attributes: elemental

Returns: real(kind=R8P)

fortran
function point_diameter(self) result(diameter)

Arguments

NameTypeIntentAttributesDescription
selfclass(style_object)inStyle.

Call graph