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
- style_object
- pattern_parts
- fill_style
- default_color
- style_name
- style_with
- dasharray
- draws_lines
- draws_points
- draws_xbars
- draws_ybars
- fills
- fill_color
- stroke_color
- point_diameter
Variables
| Name | Type | Attributes | Description |
|---|---|---|---|
WITH_LINES | integer(kind=I4P) | parameter | gnuplot with lines. |
WITH_POINTS | integer(kind=I4P) | parameter | gnuplot with points. |
WITH_LINESPOINTS | integer(kind=I4P) | parameter | gnuplot with linespoints. |
WITH_YERRORBARS | integer(kind=I4P) | parameter | gnuplot with yerrorbars. |
WITH_XERRORBARS | integer(kind=I4P) | parameter | gnuplot with xerrorbars. |
WITH_XYERRORBARS | integer(kind=I4P) | parameter | gnuplot with xyerrorbars. |
WITH_READOUT | integer(kind=I4P) | parameter | foresight with readout: the last value in seven-segment digits. |
WITH_BOXES | integer(kind=I4P) | parameter | gnuplot with boxes. |
WITH_FILLEDCURVES | integer(kind=I4P) | parameter | gnuplot with filledcurves. |
WITH_HISTOGRAMS | integer(kind=I4P) | parameter | gnuplot with histograms. |
WITH_IMAGE | integer(kind=I4P) | parameter | gnuplot with image. |
WITH_CIRCLES | integer(kind=I4P) | parameter | gnuplot with circles: circles and wedges. |
WITH_PIE | integer(kind=I4P) | parameter | foresight with pie: a pie or donut chart. |
WITH_GAUGE | integer(kind=I4P) | parameter | foresight with gauge: the last value on a sweep gauge. |
WITH_RADAR | integer(kind=I4P) | parameter | foresight with radar: a polygon over the spokes of the rows. |
WITH_ROSE | integer(kind=I4P) | parameter | foresight with rose: equal sectors, area or radius by value. |
WITH_IMPULSES | integer(kind=I4P) | parameter | gnuplot with impulses: a segment from y = 0 to each point. |
WITH_STEPS | integer(kind=I4P) | parameter | gnuplot with steps: horizontal, then vertical. |
WITH_FSTEPS | integer(kind=I4P) | parameter | gnuplot with fsteps: vertical, then horizontal. |
WITH_HISTEPS | integer(kind=I4P) | parameter | gnuplot with histeps: steps around the points, from y = 0. |
WITH_DOTS | integer(kind=I4P) | parameter | gnuplot with dots: a tiny dot per point. |
WITH_YERRORLINES | integer(kind=I4P) | parameter | gnuplot with yerrorlines: linespoints and y error bars. |
WITH_XERRORLINES | integer(kind=I4P) | parameter | gnuplot with xerrorlines: linespoints and x error bars. |
WITH_XYERRORLINES | integer(kind=I4P) | parameter | gnuplot with xyerrorlines: linespoints and both bars. |
WITH_BOXERRORBARS | integer(kind=I4P) | parameter | gnuplot with boxerrorbars: boxes with y error bars. |
WITH_BOXXYERROR | integer(kind=I4P) | parameter | gnuplot with boxxyerror: a rectangle per point. |
WITH_CANDLESTICKS | integer(kind=I4P) | parameter | gnuplot with candlesticks: box and whiskers. |
WITH_FINANCEBARS | integer(kind=I4P) | parameter | gnuplot with financebars: high-low bars, open/close ticks. |
WITH_BOXPLOT | integer(kind=I4P) | parameter | gnuplot with boxplot: quartiles of the values, outliers. |
WITH_VECTORS | integer(kind=I4P) | parameter | gnuplot with vectors: arrows from x:y by dx:dy. |
WITH_ARROWS | integer(kind=I4P) | parameter | gnuplot with arrows: arrows from x:y by length and angle. |
WITH_ELLIPSES | integer(kind=I4P) | parameter | gnuplot with ellipses: an ellipse per point. |
WITH_POLYGONS | integer(kind=I4P) | parameter | gnuplot with polygons: a closed polygon per block. |
WITH_LABELS | integer(kind=I4P) | parameter | gnuplot with labels: text at each point. |
WITH_SECTORS | integer(kind=I4P) | parameter | gnuplot with sectors: annular sectors. |
WITH_PARALLELAXES | integer(kind=I4P) | parameter | gnuplot with parallelaxes: an axis per item, a line per row. |
WITH_SPIDERPLOT | integer(kind=I4P) | parameter | gnuplot with spiderplot: a radial axis per item, a polygon |
STYLE_NAMES | character(len=*) | parameter | Supported style names. |
FILL_EMPTY | integer(kind=I4P) | parameter | gnuplot set style fill empty: no fill. |
FILL_SOLID | integer(kind=I4P) | parameter | gnuplot set style fill solid. |
FILL_PATTERN | integer(kind=I4P) | parameter | gnuplot set style fill pattern N. |
PATTERNS | integer(kind=I4P) | parameter | Fill patterns of gnuplot's svg terminal, cycling: 0 empty, 1 |
PALETTE | character(len=7) | parameter | gnuplot 5 line colors. |
DIAMETER_AT_UNIT_SIZE | real(kind=R8P) | parameter | Round dot diameter at pointsize 1 [px]. |
MARKER_AT_UNIT_SIZE | real(kind=R8P) | parameter | Point type size at pointsize 1 [px], gnuplot svg. |
Derived Types
style_object
Series drawing style.
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
with | integer(kind=I4P) | Plotting style. | |
color | character(len=:) | allocatable | Line and point color (SVG color). |
linewidth | real(kind=R8P) | Line width [px]. | |
dashtype | integer(kind=I4P) | gnuplot dash type: 1 solid, 2..5 dash patterns. | |
pointsize | real(kind=R8P) | Point size scale factor. | |
pointtype | integer(kind=I4P) | gnuplot point type: 0 a dot, 1.. the shapes (cycling every | |
fill | integer(kind=I4P) | Fill of filled styles. | |
density | real(kind=R8P) | Fill opacity, solid fills. | |
border | logical | Border of filled styles. | |
border_color | character(len=:) | allocatable | Border color, empty for the line color. |
segments | integer(kind=I4P) | Cells over the y range of a segmented fill, 0 for none. | |
pattern | integer(kind=I4P) | Fill pattern (FILL_PATTERN), cycling every PATTERNS. |
Type-Bound Procedures
| Name | Attributes | Description |
|---|---|---|
dasharray | pass(self) | SVG dash array. |
draws_xbars | pass(self) | Whether horizontal error bars are drawn. |
fills | pass(self) | Whether the style is a filled one. |
fill_color | pass(self) | Fill color, none if empty. |
stroke_color | pass(self) | Border color of a filled style, none if no border. |
draws_ybars | pass(self) | Whether vertical error bars are drawn. |
draws_lines | pass(self) | Whether lines are drawn. |
draws_points | pass(self) | Whether points are drawn. |
point_diameter | pass(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
subroutine pattern_parts(fill, pattern, color)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
fill | character(len=*) | in | Fill color. | |
pattern | integer(kind=I4P) | out | Pattern, 0 for none. | |
color | character(len=:) | out | allocatable | Color. |
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.
subroutine fill_style(words, style, bad)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
words | character(len=*) | in | Fill style words. | |
style | type(style_object) | inout | Style updated. | |
bad | character(len=:) | out | allocatable | First 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=:)
function default_color(index) result(color)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
index | integer(kind=I4P) | in | Series 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=:)
function style_name(word) result(name)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
word | character(len=*) | in | Style word. |
Call graph
style_with
Plotting style code of a gnuplot with keyword, full or abbreviated (see style_name).
Returns: integer(kind=I4P)
function style_with(name) result(with)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
name | character(len=*) | in | gnuplot 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=:)
function dasharray(self) result(dashes)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(style_object) | in | Style. |
Call graph
draws_lines
Whether the style draws lines.
Attributes: elemental
Returns: logical
function draws_lines(self) result(lines)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(style_object) | in | Style. |
Call graph
draws_points
Whether the style draws points: every style but lines and readouts (error bars mark their points).
Attributes: elemental
Returns: logical
function draws_points(self) result(points)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(style_object) | in | Style. |
Call graph
draws_xbars
Whether the style draws horizontal error bars.
Attributes: elemental
Returns: logical
function draws_xbars(self) result(bars)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(style_object) | in | Style. |
Call graph
draws_ybars
Whether the style draws vertical error bars.
Attributes: elemental
Returns: logical
function draws_ybars(self) result(bars)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(style_object) | in | Style. |
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
function fills(self) result(filled)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(style_object) | in | Style. |
Call graph
fill_color
Fill color of a filled style: the line color when solid, none when empty.
Attributes: pure
Returns: character(len=:)
function fill_color(self) result(color)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(style_object) | in | Style. |
Call graph
stroke_color
Border color of a filled style: its own, the line color, or none without border.
Attributes: pure
Returns: character(len=:)
function stroke_color(self) result(color)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(style_object) | in | Style. |
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)
function point_diameter(self) result(diameter)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(style_object) | in | Style. |
Call graph