Skip to content

foresight_mathlib ​

foresight_mathlib, gnuplot 6.0's real special functions by name: the table of names and arities the expression compiler reads, and the dispatch of a call to the ports of gnuplot's algorithms (foresight_bessel, foresight_gammafun, foresight_specfun) and to the elementary ones (round, cbrt, asinh, acosh, atanh). gnuplot's names (case matters: EllipticK), their arguments, and which take an integer order first

Source: src/lib/foresight_mathlib.F90

Dependencies

Contents ​

Variables ​

NameTypeAttributesDescription
MATH_FUNCTIONScharacter(len=*)parameterNames (weekdate_*: the day, the third argument, 1 when omitted).
MATH_ARGSinteger(kind=I4P)parameterArguments.
palette_nowtype(palette_object)saveThe palette of gnuplot's palette(z) (the current panel's).
palette_cbreal(kind=R8P)saveIts color axis range (cb2gray).
palette_loglogicalsaveA log color axis.

Interfaces ​

c_cbrt ​

Subroutines ​

math_function ​

Function f (index in MATH_FUNCTIONS) of the arguments x (n the first one as an integer, for the orders): r the value, an integer if is_int (round); ok false for gnuplot's undefined value, and for a NaN or an infinity (foresight's values are finite). Gray level. Channels.

Attributes: pure

fortran
subroutine math_function(f, x, n, r, is_int, ok)

Arguments

NameTypeIntentAttributesDescription
finteger(kind=I4P)inFunction index.
xreal(kind=R8P)inArguments.
ninteger(kind=I8P)inFirst argument as an integer (orders).
rreal(kind=R8P)outValue.
is_intlogicaloutInteger value (r holds it).
oklogicaloutDefined.

Call graph

time_field ​

gnuplot's tm_sec ... tm_yday of the time t [s]: the field of its broken-down UTC time, as a real (tm_mon and tm_yday from 0, tm_wday 0 on Sunday, tm_year the whole year).

Attributes: pure

fortran
subroutine time_field(name, t, r)

Arguments

NameTypeIntentAttributesDescription
namecharacter(len=*)inFunction name.
treal(kind=R8P)inTime [s].
rreal(kind=R8P)outField.

Call graph

set_palette_function ​

The palette p and color axis range cb (log_axis a log one) of gnuplot's palette(z): the current panel's, set by the interpreter before each statement.

fortran
subroutine set_palette_function(p, cb, log_axis)

Arguments

NameTypeIntentAttributesDescription
ptype(palette_object)inPalette.
cbreal(kind=R8P)inColor axis range.
log_axislogicalinLog color axis.

Call graph

Functions ​

math_order ​

The error of gnuplot when the first argument of function f is not an integer, empty if f takes none.

Attributes: pure

Returns: character(len=:)

fortran
function math_order(f) result(message)

Arguments

NameTypeIntentAttributesDescription
finteger(kind=I4P)inFunction index in MATH_FUNCTIONS.

Call graph

weekday_of ​

Weekday of a date, 0 on Sunday.

Attributes: pure

Returns: integer(kind=I8P)

fortran
function weekday_of(year, month, day) result(wday)

Arguments

NameTypeIntentAttributesDescription
yearinteger(kind=I8P)inYear.
monthinteger(kind=I8P)inMonth, from 1.
dayinteger(kind=I8P)inDay of the month.

Call graph

week_of ​

gnuplot's tmweek: the week of the time t [s], 1 to 53; standard 0 ISO 8601 (weeks from Monday, week 1 the one of the first Thursday), 1 CDC/MMWR (from Sunday). The first days of January may be in week 52 or 53 of the year before, the last days of December in week 1.

Attributes: pure

Returns: integer(kind=I8P)

fortran
function week_of(t, standard) result(week)

Arguments

NameTypeIntentAttributesDescription
treal(kind=R8P)inTime [s].
standardinteger(kind=I4P)in0 ISO, 1 CDC.

Call graph

week_date ​

gnuplot's weekdate: the time [s] of day day (1 the first) of week week of year year; standard 0 ISO 8601 (weeks from Monday), 1 CDC/MMWR (from Sunday): week 1 starts on the first day of the week nearest 1 January.

Attributes: pure

Returns: real(kind=R8P)

fortran
function week_date(year, week, day, standard) result(t)

Arguments

NameTypeIntentAttributesDescription
yearinteger(kind=I8P)inWeek-date year.
weekinteger(kind=I8P)inWeek, 1 to 53.
dayinteger(kind=I8P)inDay of the week, 1 to 7.
standardinteger(kind=I4P)in0 ISO, 1 CDC.

Call graph

hsv_packed ​

gnuplot's hsv2rgb(h, s, v): the components clamped to 0..1, hue 0..1 (not degrees), to red, green and blue (getcolor.c HSV_2_RGB) packed as 0xRRGGBB, each channel int(255 c).

Attributes: pure

Returns: real(kind=R8P)

fortran
function hsv_packed(hsv) result(rgb)

Arguments

NameTypeIntentAttributesDescription
hsvreal(kind=R8P)inHue, saturation, value.

Call graph

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