Skip to content

foresight_ticks ​

foresight_ticks, axis tick placement and labelling.

Automatic steps are gnuplot's (quantize_normal_tics, guide 20): they depend on the axis range only, not on its length in pixels (probed on gnuplot 6.0 from 150 to 1200 px: [-2:2] steps by 0.5, [0:1] by 0.2, [0:13] by 2). The range normalised to its decade, f in [1, 10), gives the step 0.2 (f < 2), 0.5 (f < 5) or 1 times the decade. Log axes place majors at integer decades, every 1, 2, 5, 10, ... decades by the same rule on the decade count. Tick values are carried as the integer pair (n, e) meaning n * 10**e, so labels are exact decimal strings, free of floating point noise such as 0.30000000000000004.

User settings (tics_object, gnuplot set xtics and set format) replace the automatic rule: a fixed step from an optional start to an optional end (a multiplying factor on log axes), no ticks at all, or a printf-like label format. Fixed steps are kept as the decimal text the user wrote, so linear ticks stay exact decimals too.

An explicit list (gnuplot set xtics ("label" pos level, ...)) replaces those ticks, or is added to them (add): its items inside the range, a label printed as written (a format when it has a conversion, "%.1f"), the axis label of the position when absent; level 1 is a minor tick. A list alone does not extend the range to a tick grid.

Minor ticks (gnuplot set mxtics [N]) divide each interval between consecutive major ticks of the automatic or fixed ticks in N parts, linearly in value also on log axes, within the range and the fixed ticks' start and end; without N (gnuplot's automatic count) in 2 when the step's leading digit is 2, else 5, and in 9 on log axes. By default linear axes have none, log axes 9 intervals between majors (the 2..9 multiples of a decade on one-decade steps), as gnuplot; unset mxtics removes them.

Time axes (gnuplot set xdata time) follow gnuplot's time rules (quantize_time_tics): the step in whole seconds, minutes, hours, days, weeks, months or years, the ticks justified to whole units (time_tic_just), labels written by strftime with the format set or one gnuplot invents from the range (%H:%M, %m/%d\n%H:%M, ...).

The same rules are mirrored by the interactive viewer, which must regenerate identical ticks after a zoom.

Source: src/lib/foresight_ticks.F90

Dependencies

Contents ​

Variables ​

NameTypeAttributesDescription
TICS_AUTOinteger(kind=I4P)parameterTicks by the automatic rule.
TICS_FIXEDinteger(kind=I4P)parameterTicks at a fixed step.
TICS_NONEinteger(kind=I4P)parameterNo ticks.
MINOR_DEFAULTinteger(kind=I4P)parameterMinor ticks by default: none on linear axes, 2..9 on log ones.
MINOR_AUTOinteger(kind=I4P)parametergnuplot's automatic count, set mxtics.
MINOR_NONEinteger(kind=I4P)parameterNo minor ticks, unset mxtics; N > 1: N intervals.
TOLreal(kind=R8P)parameterTolerance on tick-grid membership, in units of the step.
SCI_HIGHreal(kind=R8P)parameterLabels switch to scientific notation from this magnitude...
SCI_LOWreal(kind=R8P)parameter...or below this one.
MAX_TICKSinteger(kind=I8P)parameterTick count cap: no ticks beyond it (degenerate or extreme zoom).
MAX_POWERinteger(kind=I8P)parameterLargest power of a fixed log step: no ticks beyond it.

Derived Types ​

tick_object ​

Axis tick.

Components

NameTypeAttributesDescription
valuereal(kind=R8P)Data value.
majorlogicalMajor (labelled) tick, else minor.
labelcharacter(len=:)allocatableLabel text, empty for minor ticks.
supcharacter(len=:)allocatableSuperscript appended to the label, empty if none.

tic_item ​

Item of an explicit tick list, gnuplot ("label" pos level).

Components

NameTypeAttributesDescription
valuereal(kind=R8P)Position.
majorlogicalLevel 0 (labelled), else level 1: a minor tick.
labelledlogicalThe label is given, else the axis label of the position.
labelcharacter(len=:)allocatableLabel as written, a format if it has a conversion.

tics_object ​

User tick settings of an axis, gnuplot set xtics and set format.

Components

NameTypeAttributesDescription
modeinteger(kind=I4P)TICS_AUTO, TICS_FIXED or TICS_NONE.
additivelogicalA fixed step added on a log axis too (gnuplot nologscale), not a factor.
plainlogicalThe labels as they are, not enhanced text (noenhanced).
offsetreal(kind=R8P)Label shift [characters, x right, y up], gnuplot offset.
colorcharacter(len=24)Label color, the frame's if blank (gnuplot textcolor).
fonttype(font_object)Label font (gnuplot font "..."), the page's if unset.
on_axislogicalOn the zero axis of the other coordinate, gnuplot axis.
rangelimitedlogicalTicks and border side within the data range.
startcharacter(len=:)allocatableFixed ticks start (decimal text), empty for none.
stepcharacter(len=:)allocatableFixed ticks step, a factor on log axes (decimal text).
endcharacter(len=:)allocatableFixed ticks end (decimal text), empty for none.
formatcharacter(len=:)allocatableLabel format, empty for the default labels.
mirrorlogicalTicks also on the opposite border, gnuplot mirror.
serieslogicalThe automatic or fixed ticks, else the explicit list alone.
minorinteger(kind=I4P)Minor ticks: MINOR_DEFAULT, MINOR_AUTO, MINOR_NONE or N.
minor_countinteger(kind=I4P)Minor ticks of a time axis every minor_count minor_unit (gnuplot set mxtics time N UNITS), 0 none.
minor_unitcharacter(len=7)seconds, minutes, hours, days, weeks, months, years.
rotatereal(kind=R8P)Label angle [deg, counterclockwise], gnuplot rotate by.
justifycharacter(len=6)Label justification of rotated labels: left, right, center, or blank for gnuplot's (right for rotate).
outlogicalTicks outward, gnuplot out.
scalereal(kind=R8P)Major and minor tick lengths, in major lengths (gnuplot scale MAJOR,MINOR; 0 draws no tick).
listtype(tic_item)allocatableExplicit list, gnuplot set xtics ("label" pos level, ...).
per_labellogicalgnuplot's default % h labels, each by %g (with a x10 superscript exponent), of the scripts; else the library's per-axis rule (SCI_HIGH, SCI_LOW).
geographiclogicalLabels in degrees, minutes, seconds by the format (gnuplot set xtics geographic, %D %M %S %E %N).

Type-Bound Procedures

NameAttributesDescription
attributepass(self)Viewer attribute of the tick positions.
clear_listpass(self)Forget the explicit list, back to the automatic or fixed ticks.
disablepass(self)No ticks, the explicit list forgotten, gnuplot unset xtics.
enablepass(self)Turn the ticks on, keeping their positions.
has_formatpass(self)Whether a label format is set.
has_listpass(self)Whether an explicit list is set.
anchorpass(self)Text anchor of the rotated labels.
set_autopass(self)Automatic ticks, forgetting a fixed step.
set_fixedpass(self)Set fixed ticks, validated.
set_listpass(self)Set or extend the explicit list.

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_tick, push_item

Subroutines ​

enable ​

Turn off ticks on again at their last positions, as gnuplot set xtics without positions: the fixed step if one was set (and not reset by set_auto), else automatic. Ticks already on are unchanged.

Attributes: pure

fortran
subroutine enable(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(tics_object)inoutSettings.

Call graph

set_auto ​

Automatic ticks, as gnuplot set xtics auto: the fixed step is forgotten, so enable restores automatic ones.

Attributes: pure

fortran
subroutine set_auto(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(tics_object)inoutSettings.

Call graph

clear_list ​

Forget the explicit list: the automatic or fixed ticks again, as gnuplot set xtics with positions but no add.

Attributes: pure

fortran
subroutine clear_list(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(tics_object)inoutSettings.

Call graph

disable ​

No ticks, as gnuplot unset xtics: the explicit list is forgotten, a fixed step kept for enable.

Attributes: pure

fortran
subroutine disable(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(tics_object)inoutSettings.

Call graph

set_list ​

The explicit list items replaces the ticks, or with add extends the list and keeps the ticks, as gnuplot set xtics [add] ("label" pos level, ...); ticks turned off are turned on.

Attributes: pure

fortran
subroutine set_list(self, items, add)

Arguments

NameTypeIntentAttributesDescription
selfclass(tics_object)inoutSettings.
itemstype(tic_item)inItems.
addlogicalinAdded to the ticks and the list.

Call graph

set_fixed ​

Fixed ticks every step (a factor on log axes) from start to end, given as decimal texts (empty for absent); message is empty on success, else the settings are unchanged.

Attributes: pure

fortran
subroutine set_fixed(self, step, start, end, message)

Arguments

NameTypeIntentAttributesDescription
selfclass(tics_object)inoutSettings.
stepcharacter(len=*)inStep.
startcharacter(len=*)inStart, empty for none.
endcharacter(len=*)inEnd, empty for none.
messagecharacter(len=:)outallocatableProblem, empty if none.

Call graph

nice_step ​

Round raw > 0 to the "nice" step m * 10**e with m in {1, 2, 5}.

Attributes: pure

fortran
subroutine nice_step(raw, m, e)

Arguments

NameTypeIntentAttributesDescription
rawreal(kind=R8P)inRaw step.
minteger(kind=I8P)outStep mantissa.
einteger(kind=I4P)outStep exponent.

gnuplot_step ​

gnuplot's automatic step m * 10**e of an axis range (> 0) long: quantize_normal_tics(range, 20), with the range normalised to its decade (f in [1, 10)): 2 10**(p-1) for f < 2, 5 10**(p-1) for f < 5, else 10**p. Exact powers of ten, so the viewer's mirror finds the same step.

Attributes: pure

fortran
subroutine gnuplot_step(range, m, e)

Arguments

NameTypeIntentAttributesDescription
rangereal(kind=R8P)inAxis range.
minteger(kind=I8P)outStep mantissa.
einteger(kind=I4P)outStep exponent.

Call graph

time_ticks ​

Ticks of a time axis (values in seconds since 1970), as gnuplot's: the automatic step quantize_time_tics (or the fixed step of tics, in seconds), autoscaled ends extended outward to it and justified to whole time units, the ticks justified so too, labelled with the time format of tics or one invented from the range (time_tick_format, timefmt giving the day and month order). Minor ticks: set mxtics N divides each step in N, set mxtics gnuplot's automatic time step, none by default; set mxtics time N UNITS one at every N units of time (seconds to weeks: multiples of N units since the epoch; months and years: the first day of every N-th month or year, counted from 1970), as gnuplot 6.0.

Attributes: pure

fortran
subroutine time_ticks(lo, hi, extend_lo, extend_hi, ticks, tics, timefmt)

Arguments

NameTypeIntentAttributesDescription
loreal(kind=R8P)inoutValue at the axis start (lo > hi: reversed).
hireal(kind=R8P)inoutValue at the axis end.
extend_lologicalinExtend lo outward to the tick grid.
extend_hilogicalinExtend hi outward to the tick grid.
tickstype(tick_object)outallocatableTicks, ascending in value.
ticstype(tics_object)inUser settings.
timefmtcharacter(len=*)inInput time format (gnuplot set timefmt).

Call graph

quantize_time_tics ​

gnuplot's quantize_time_tics: the step tic rounded to whole seconds, minutes, hours, days, weeks, months or years for a range xr [s], and its level (0 seconds ... 6 years).

Attributes: pure

fortran
subroutine quantize_time_tics(tic, xr, level)

Arguments

NameTypeIntentAttributesDescription
ticreal(kind=R8P)inoutStep [s].
xrreal(kind=R8P)inRange [s].
levelinteger(kind=I4P)outTime level.

Call graph

sort_ticks ​

Sort the ticks by value (insertion sort: few ticks, the majors and minors interleaved).

Attributes: pure

fortran
subroutine sort_ticks(ticks)

Arguments

NameTypeIntentAttributesDescription
tickstype(tick_object)inoutTicks.

Call graph

linear_ticks ​

Major ticks of a linear axis (npx pixels long, kept for the interface: gnuplot's density does not depend on it); autoscaled ends are extended outward to the tick grid.

With tics: no ticks and no extension (TICS_NONE), or the fixed grid (TICS_FIXED), and the label format.

Attributes: pure

fortran
subroutine linear_ticks(lo, hi, npx, extend_lo, extend_hi, ticks, tics)

Arguments

NameTypeIntentAttributesDescription
loreal(kind=R8P)inoutValue at the axis start (lo > hi: reversed).
hireal(kind=R8P)inoutValue at the axis end.
npxreal(kind=R8P)inAxis length [px].
extend_lologicalinExtend lo outward to the tick grid.
extend_hilogicalinExtend hi outward to the tick grid.
tickstype(tick_object)outallocatableTicks, ascending in value.
ticstype(tics_object)inoptionalUser settings.

Call graph

log_ticks ​

Ticks of a base-10 log axis npx pixels long; autoscaled ends are extended outward to whole decades.

Majors sit at decades (labelled 10 with the exponent as superscript), minors at 2..9 times a decade when the axis spans at most 10 decades. With fewer than two decades in range the minors are labelled too, in plain decimals; if still fewer than two ticks are labelled (a range inside one decade), linear ticks are placed instead.

With tics: no ticks (TICS_NONE), or ticks multiplying by the step (TICS_FIXED), and the label format; the extension to decades applies anyway, as in gnuplot.

Attributes: pure

fortran
subroutine log_ticks(lo, hi, npx, extend_lo, extend_hi, ticks, tics)

Arguments

NameTypeIntentAttributesDescription
loreal(kind=R8P)inoutValue at the axis start, > 0.
hireal(kind=R8P)inoutValue at the axis end, > 0.
npxreal(kind=R8P)inAxis length [px].
extend_lologicalinExtend lo outward to a decade.
extend_hilogicalinExtend hi outward to a decade.
tickstype(tick_object)outallocatableTicks, majors first.
ticstype(tics_object)inoptionalUser settings.

Call graph

append_minors ​

Append to ticks the minor ticks of the majors first + k step (first step**k on a log axis), n intervals between consecutive majors, linear in value, inside [lo, hi] (either order) and [lower, upper]; none for n < 2.

Attributes: pure

fortran
subroutine append_minors(ticks, first, step, logaxis, n, lo, hi, lower, upper)

Arguments

NameTypeIntentAttributesDescription
tickstype(tick_object)inoutallocatableTicks.
firstreal(kind=R8P)inA major tick.
stepreal(kind=R8P)inMajor step, a factor (> 1) on a log axis.
logaxislogicalinLog axis.
ninteger(kind=I4P)inIntervals between majors.
loreal(kind=R8P)inValue at the axis start.
hireal(kind=R8P)inValue at the axis end.
lowerreal(kind=R8P)inSmallest value of the series.
upperreal(kind=R8P)inLargest value of the series.

Call graph

common_scale ​

Rescale the decimals n * 10**e to their smallest exponent, keeping every mantissa below 1e15 (exact in the viewer's double precision integers); ok false if impossible.

Attributes: pure

fortran
subroutine common_scale(n, e, ok)

Arguments

NameTypeIntentAttributesDescription
ninteger(kind=I8P)inoutMantissas.
einteger(kind=I4P)inoutExponents, all equal on exit.
oklogicaloutRescaled.

Call graph

fixed_values ​

Decimals of the fixed ticks at a common exponent: n holds step, start (0 if none) and end mantissas.

Attributes: pure

fortran
subroutine fixed_values(tics, n, e, has_start, has_end)

Arguments

NameTypeIntentAttributesDescription
ticstype(tics_object)inSettings, TICS_FIXED (validated by set_fixed).
ninteger(kind=I8P)outMantissas: step, start, end.
einteger(kind=I4P)outExponents, equal.
has_startlogicaloutStart given.
has_endlogicaloutEnd given.

Call graph

list_ticks ​

The items of the explicit list of tics inside [lo, hi] (either order), or all of them if everywhere, in the list order: a label as written, by itself as the format if it is one ("%.1f", gnuplot), the axis label of the position (set format, else the default one for the range) if absent; minor items have none.

Attributes: pure

fortran
subroutine list_ticks(tics, lo, hi, everywhere, ticks)

Arguments

NameTypeIntentAttributesDescription
ticstype(tics_object)inSettings.
loreal(kind=R8P)inValue at the axis start.
hireal(kind=R8P)inValue at the axis end.
everywherelogicalinAll the items, whatever the range.
tickstype(tick_object)outallocatableTicks.

Call graph

merge_list ​

Add to ticks the items of the explicit list of tics inside [lo, hi], each replacing a tick at its position (gnuplot set xtics add): the remaining ticks keep their order, the items follow.

Attributes: pure

fortran
subroutine merge_list(tics, lo, hi, ticks)

Arguments

NameTypeIntentAttributesDescription
ticstype(tics_object)inSettings.
loreal(kind=R8P)inValue at the axis start.
hireal(kind=R8P)inValue at the axis end.
tickstype(tick_object)inoutallocatableTicks.

Call graph

fixed_linear_ticks ​

Ticks at start + k * step within [start, end], as gnuplot set xtics START,STEP,END.

An autoscaled end is extended outward to a multiple of the step, unless it lies outside [start, end] (gnuplot).

Attributes: pure

fortran
subroutine fixed_linear_ticks(lo, hi, extend_lo, extend_hi, tics, ticks)

Arguments

NameTypeIntentAttributesDescription
loreal(kind=R8P)inoutValue at the axis start.
hireal(kind=R8P)inoutValue at the axis end.
extend_lologicalinlo autoscaled.
extend_hilogicalinhi autoscaled.
ticstype(tics_object)inSettings, TICS_FIXED.
tickstype(tick_object)outallocatableTicks, ascending in value.

Call graph

fixed_log_ticks ​

Ticks of a log axis at start * step**k (start 1 if absent) within [start, end], as gnuplot set ytics on a log axis: the step is a factor, greater than 1.

Tick values are built by repeated multiplication, so that the viewer reproduces them exactly.

Attributes: pure

fortran
subroutine fixed_log_ticks(lo, hi, tics, ticks)

Arguments

NameTypeIntentAttributesDescription
loreal(kind=R8P)inValue at the axis start, > 0.
hireal(kind=R8P)inValue at the axis end, > 0.
ticstype(tics_object)inSettings, TICS_FIXED.
tickstype(tick_object)outallocatableTicks, ascending in value.

Call graph

tick_label ​

Label of the tick value n * 10**e: by the user format of tics if any, else by format_label; gnuplot's default (per_label) over the axis span: %.Pf when the ends have one sign and P = ceil(-log10(min(|hi - lo|, |lo|))) is 5 to 9 (gnuplot's copy_or_invent_formatstring), else %h per label.

Attributes: pure

fortran
subroutine tick_label(n, e, sci, label, sup, tics, span)

Arguments

NameTypeIntentAttributesDescription
ninteger(kind=I8P)inValue mantissa.
einteger(kind=I4P)inValue exponent.
scilogicalinScientific notation (default labels).
labelcharacter(len=:)outallocatableLabel text.
supcharacter(len=:)outallocatableLabel superscript.
ticstype(tics_object)inoptionalUser settings.
spanreal(kind=R8P)inoptionalAxis start and end.

Call graph

format_label ​

Label of the tick value n * 10**e: plain decimal, or gnuplot-like 1.5x10 with the exponent as superscript.

Attributes: pure

fortran
subroutine format_label(n, e, sci, label, sup)

Arguments

NameTypeIntentAttributesDescription
ninteger(kind=I8P)inValue mantissa.
einteger(kind=I4P)inValue exponent.
scilogicalinScientific notation.
labelcharacter(len=:)outallocatableLabel text.
supcharacter(len=:)outallocatableLabel superscript.

Call graph

push_tick ​

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

Attributes: pure

fortran
subroutine push_tick(list, item)

Arguments

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

push_item ​

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

Attributes: pure

fortran
subroutine push_item(list, item)

Arguments

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

Functions ​

attribute ​

Tick positions for the viewer: empty for automatic, none, or START STEP END with * for an absent end, then minor auto|N unless minor ticks are by default (auto first if automatic), out for outward ticks, rotate ANGLE ANCHOR for rotated labels and scale MAJOR MINOR for tick lengths not the default. With an explicit list (and the axis range [lo, hi], for the default labels of its items): labels and its items (see labels_attribute), after auto or the step when the list is added to them.

Attributes: pure

Returns: character(len=:)

fortran
function attribute(self, lo, hi) result(text)

Arguments

NameTypeIntentAttributesDescription
selfclass(tics_object)inSettings.
loreal(kind=R8P)inoptionalValue at the axis start.
hireal(kind=R8P)inoptionalValue at the axis end.

Call graph

labels_attribute ​

Text labels for the viewer: labels then value:label pairs, blank separated, each label percent-encoded (every byte but letters, digits and -._~), so blanks and colons in a label never split it; a superscript follows as ^sup, a minor tick is value!.

Attributes: pure

Returns: character(len=:)

fortran
function labels_attribute(labels) result(text)

Arguments

NameTypeIntentAttributesDescription
labelstype(tick_object)inLabelled values.

Call graph

anchor ​

Text anchor of the rotated labels, as gnuplot: by their justification, else start (gnuplot rotate by).

Attributes: pure

Returns: character(len=6)

fortran
function anchor(self) result(text_anchor)

Arguments

NameTypeIntentAttributesDescription
selfclass(tics_object)inSettings.

Call graph

has_list ​

Whether an explicit list is set.

Attributes: pure

Returns: logical

fortran
function has_list(self) result(has)

Arguments

NameTypeIntentAttributesDescription
selfclass(tics_object)inSettings.

Call graph

has_format ​

Whether a label format is set.

Attributes: pure

Returns: logical

fortran
function has_format(self) result(has)

Arguments

NameTypeIntentAttributesDescription
selfclass(tics_object)inSettings.

Call graph

time_tick_format ​

Label format of a time axis: format if it is a time format (not a numeric printf one), else gnuplot's invented one (copy_or_invent_formatstring): within one day %H:%M (:%S for steps under a minute, %M alone at the day level); over days %m/%d (%d/%m when timefmt has the day first, then /%y or /%Y across years) and \n%H:%M below the week level.

Attributes: pure

Returns: character(len=:)

fortran
function time_tick_format(format, level, lo, hi, timefmt) result(chosen)

Arguments

NameTypeIntentAttributesDescription
formatcharacter(len=*)inFormat set, empty for none.
levelinteger(kind=I4P)inTime level of the step.
loreal(kind=R8P)inAxis start.
hireal(kind=R8P)inAxis end.
timefmtcharacter(len=*)inInput time format.

Call graph

looks_numeric ​

gnuplot's looks_like_numeric: the first conversion is a numeric printf one (%5.2f, %g, %e, ...).

Attributes: pure

Returns: logical

fortran
function looks_numeric(format) result(numeric)

Arguments

NameTypeIntentAttributesDescription
formatcharacter(len=*)inFormat.

Call graph

duodecimal ​

gnuplot's quantize_duodecimal_tics: a step for arg in a duodecimal reference (12 or 60 based).

Attributes: pure

Returns: real(kind=R8P)

fortran
function duodecimal(arg, guide) result(tic)

Arguments

NameTypeIntentAttributesDescription
argreal(kind=R8P)inRange in the unit.
guideinteger(kind=I4P)inApproximate number of ticks.

Call graph

time_level ​

Time level of a fixed step [s], as gnuplot's setup_tics.

Attributes: pure

Returns: integer(kind=I4P)

fortran
function time_level(step) result(level)

Arguments

NameTypeIntentAttributesDescription
stepreal(kind=R8P)inStep [s].

Call graph

auto_time_minitics ​

gnuplot's make_auto_time_minitics: the minor step [s] of a time step incr at level, 0 for none.

Attributes: pure

Returns: real(kind=R8P)

fortran
function auto_time_minitics(level, incr) result(tinc)

Arguments

NameTypeIntentAttributesDescription
levelinteger(kind=I4P)inTime level.
incrreal(kind=R8P)inMajor step [s].

Call graph

decimal_value ​

Value of a decimal text (a fixed tick start, step or end).

Attributes: pure

Returns: real(kind=R8P)

fortran
function decimal_value(text) result(v)

Arguments

NameTypeIntentAttributesDescription
textcharacter(len=*)inDecimal text.

Call graph

minor_count ​

Intervals between major ticks for the minor ticks of tics: 0 with none, N if set, by default 9 on a log axis and 0 on a linear one, else gnuplot's automatic count: 9 on a log axis, 2 when the leading digit of the step mantissa is 2, else 5.

Attributes: pure

Returns: integer(kind=I4P)

fortran
function minor_count(tics, mantissa, logaxis) result(n)

Arguments

NameTypeIntentAttributesDescription
ticstype(tics_object)inSettings.
mantissainteger(kind=I8P)inStep mantissa (any trailing zeros).
logaxislogicalinLog axis.

Call graph

power ​

first * factor**k by |k| multiplications or divisions: the operation sequence the viewer repeats.

Attributes: pure

Returns: real(kind=R8P)

fortran
function power(first, factor, k) result(v)

Arguments

NameTypeIntentAttributesDescription
firstreal(kind=R8P)inStart.
factorreal(kind=R8P)inFactor.
kinteger(kind=I8P)inPower.

label_format ​

The label format of tics: the user's, else gnuplot's default (per_label) over the axis span: %.Pf when the ends have one sign and P = ceil(-log10(min(|hi - lo|, |lo|))) is 5 to 9 (gnuplot's copy_or_invent_formatstring), else %h, %g per label.

Attributes: pure

Returns: character(len=:)

fortran
function label_format(tics, span) result(format)

Arguments

NameTypeIntentAttributesDescription
ticstype(tics_object)inSettings.
spanreal(kind=R8P)inAxis start and end.

Call graph

grid_value ​

Value n * 10**e, correctly rounded for |e| <= 22 (powers of ten are exact there); beyond, scaled in steps of 1e22, the operation sequence the viewer repeats.

Attributes: pure

Returns: real(kind=R8P)

fortran
function grid_value(n, e) result(value)

Arguments

NameTypeIntentAttributesDescription
ninteger(kind=I8P)inMantissa.
einteger(kind=I4P)inExponent.

Call graph

is_scientific ​

Whether labels of an axis reaching magnitude use scientific notation.

Attributes: pure

Returns: logical

fortran
function is_scientific(magnitude) result(sci)

Arguments

NameTypeIntentAttributesDescription
magnitudereal(kind=R8P)inLargest absolute value on the axis.

Call graph

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