Skip to content

foresight_backend ​

foresight_backend, abstract output device.

Two coordinate spaces. Page primitives take pixel coordinates (origin top-left, y downward). The data_* primitives, valid between begin_plot_area and end_plot_area, take unit-square coordinates of the plot area (origin bottom-left, y upward, [0, 1] spanning the axis ranges) and are clipped to it. Keeping data in unit coordinates lets an interactive device zoom and pan by changing a single view transform.

A panel is bracketed by begin_axes/end_axes, which hand the device the panel geometry and axis ranges, and its redrawable decorations (grid, ticks) by named begin_group/end_group: an interactive device regenerates them after a zoom, a static one just writes them.

Source: src/lib/foresight_backend.F90

Dependencies

Contents ​

Variables ​

NameTypeAttributesDescription
HEAD_LENGTHreal(kind=R8P)parameterArrowhead barb length [px], gnuplot svg default.
HEAD_ANGLEreal(kind=R8P)parameterArrowhead barb angle off the shaft [deg], gnuplot default.

Derived Types ​

axes_view ​

Geometry and axis ranges of a plot panel.

Components ​

NameTypeAttributesDescription
areareal(kind=R8P)Plot area: left, right, top, bottom [px].
xreal(kind=R8P)x axis values at the axis start and end.
yreal(kind=R8P)y axis values at the axis start and end.
xloglogicalLog x axis.
yloglogicalLog y axis.
gridlogicalGrid shown.
font_sizereal(kind=R8P)Font size [px].
xticscharacter(len=:)allocatablex tick positions for the viewer (tics_object%attribute), empty for auto.
yticscharacter(len=:)allocatabley tick positions for the viewer, empty for auto.
xformatcharacter(len=:)allocatablex tick label format, empty for the default.
yformatcharacter(len=:)allocatabley tick label format, empty for the default.
mirrorlogicalTicks mirrored on the opposite border: x, y, y2.
y2_activelogicalSecond y axis drawn; the y2* components are meaningful only then.
y2real(kind=R8P)y2 axis values at the axis start and end.
y2loglogicalLog y2 axis.
y2ticscharacter(len=:)allocatabley2 tick positions for the viewer, empty for auto.
y2formatcharacter(len=:)allocatabley2 tick label format, empty for the default.

backend_object ​

Abstract output device.

Inheritance

Attributes: abstract

Components ​

NameTypeAttributesDescription
themetype(theme_object)Output theme: colors the layout's ones are mapped to (foresight_theme).

Type-Bound Procedures ​

NameAttributesDescription
begin_pagepass(self)Open the output page.
end_pagepass(self)Close the output page.
begin_axespass(self)Open a plot panel.
end_axespass(self)Close the plot panel.
begin_grouppass(self)Open a named group.
end_grouppass(self)Close the group.
rectpass(self)Rectangle [px].
polylinepass(self)Polyline [px].
dotspass(self)Round dots or markers [px].
polygonpass(self)Filled polygon [px].
imagepass(self)Raster image [px].
textpass(self)Text [px].
begin_plot_areapass(self)Open the clipped plot area.
end_plot_areapass(self)Close the plot area.
data_polylinepass(self)Polyline [unit square].
data_dotspass(self)Dots or markers [unit square].
data_barspass(self)Error bars [unit square].
data_polygonpass(self)Filled polygon [unit square].
data_imagepass(self)Raster image [unit square].
text_widthpass(self)Text width [px].
readoutpass(self)Seven-segment readout [px].
readout_extentpass(self)Readout size [px].
data_arrowspass(self)Arrows [unit square].
data_labelpass(self)Text at a point [unit square].

Subroutines ​

arrow_head ​

The barbs of an arrowhead at tip pointing away from tail [px, any orientation]: HEAD_LENGTH px long, HEAD_ANGLE degrees off the shaft, as gnuplot's default head; barbs(:, 1) and barbs(:, 2). A zero length shaft points right.

Attributes: pure

fortran
subroutine arrow_head(tail, tip, barbs)

Arguments

NameTypeIntentAttributesDescription
tailreal(kind=R8P)inTail [px].
tipreal(kind=R8P)inTip [px].
barbsreal(kind=R8P)outBarb ends [px].