Skip to content

foresight_theme ​

foresight_theme, output themes: the page colors of a figure (classic, vfd, lcd, washi, night, paper).

A theme recolors the output, never the figure: the layout draws with gnuplot's colors (black frame and text, grey grid, white page, the linetype colors) and the devices map them through map as they write. classic maps nothing, so the default output is unchanged; vfd is a vacuum fluorescent display (black glass, emissive colors, labels printed in blue, glowing data); lcd a backlit liquid crystal display (pale green glass, dark segments). washi and night are the two faces of foresight's own identity, its documentation's light and dark modes: ink on warm paper with a crimson first series, and light text on a near-black red ground with a rose first series; every series color contrasts with its ground at least 3:1 (WCAG non-text contrast). paper is a figure for a paper: the classic page with the Okabe-Ito colors (the figure adds 8 pt texts, foresight_figure set_theme). Colors other than the frame, grid, page and palette ones (an lc '#123456' of the user) are kept. A new figure takes the theme of the environment variable FORESIGHT_THEME (an unknown name ignored) until one is set (foresight_figure).

Source: src/lib/foresight_theme.F90

Dependencies

Contents ​

Variables ​

NameTypeAttributesDescription
THEMEScharacter(len=*)parameterTheme names.

Derived Types ​

theme_object ​

Output theme.

Components

NameTypeAttributesDescription
namecharacter(len=7)Name.
backgroundcharacter(len=7)Page and window background.
framecharacter(len=7)Border, ticks and text.
gridcharacter(len=7)Grid lines.
palettecharacter(len=7)Series colors replacing the linetype colors; blank: kept.
glowlogicalData drawn with a glow.
ghostreal(kind=R8P)Opacity of the unlit segments and cells.

Type-Bound Procedures

NameAttributesDescription
is_classicpass(self)Whether the theme maps nothing.
mappass(self)Theme color of a layout color.

Functions ​

theme_named ​

Theme name (see THEMES); classic for an unknown name.

Attributes: pure

Returns: type(theme_object)

fortran
function theme_named(name) result(theme)

Arguments

NameTypeIntentAttributesDescription
namecharacter(len=*)inTheme name.

Call graph

is_classic ​

Whether the theme maps nothing (classic).

Attributes: elemental

Returns: logical

fortran
function is_classic(self) result(yes)

Arguments

NameTypeIntentAttributesDescription
selfclass(theme_object)inTheme.

Call graph

map ​

Theme color of the layout color: the frame (black), grid (#a0a0a0), page (white) and linetype colors become the theme ones, any other color is kept.

Attributes: pure

Returns: character(len=:)

fortran
function map(self, color) result(mapped)

Arguments

NameTypeIntentAttributesDescription
selfclass(theme_object)inTheme.
colorcharacter(len=*)inLayout color.

Call graph

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