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
| Name | Type | Attributes | Description |
|---|---|---|---|
MATH_FUNCTIONS | character(len=*) | parameter | Names (weekdate_*: the day, the third argument, 1 when omitted). |
MATH_ARGS | integer(kind=I4P) | parameter | Arguments. |
palette_now | type(palette_object) | save | The palette of gnuplot's palette(z) (the current panel's). |
palette_cb | real(kind=R8P) | save | Its color axis range (cb2gray). |
palette_log | logical | save | A 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
subroutine math_function(f, x, n, r, is_int, ok)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
f | integer(kind=I4P) | in | Function index. | |
x | real(kind=R8P) | in | Arguments. | |
n | integer(kind=I8P) | in | First argument as an integer (orders). | |
r | real(kind=R8P) | out | Value. | |
is_int | logical | out | Integer value (r holds it). | |
ok | logical | out | Defined. |
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
subroutine time_field(name, t, r)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
name | character(len=*) | in | Function name. | |
t | real(kind=R8P) | in | Time [s]. | |
r | real(kind=R8P) | out | Field. |
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.
subroutine set_palette_function(p, cb, log_axis)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
p | type(palette_object) | in | Palette. | |
cb | real(kind=R8P) | in | Color axis range. | |
log_axis | logical | in | Log 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=:)
function math_order(f) result(message)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
f | integer(kind=I4P) | in | Function index in MATH_FUNCTIONS. |
Call graph
weekday_of
Weekday of a date, 0 on Sunday.
Attributes: pure
Returns: integer(kind=I8P)
function weekday_of(year, month, day) result(wday)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
year | integer(kind=I8P) | in | Year. | |
month | integer(kind=I8P) | in | Month, from 1. | |
day | integer(kind=I8P) | in | Day 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)
function week_of(t, standard) result(week)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
t | real(kind=R8P) | in | Time [s]. | |
standard | integer(kind=I4P) | in | 0 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)
function week_date(year, week, day, standard) result(t)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
year | integer(kind=I8P) | in | Week-date year. | |
week | integer(kind=I8P) | in | Week, 1 to 53. | |
day | integer(kind=I8P) | in | Day of the week, 1 to 7. | |
standard | integer(kind=I4P) | in | 0 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)
function hsv_packed(hsv) result(rgb)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
hsv | real(kind=R8P) | in | Hue, saturation, value. |
Call graph