| theme_medium | R Documentation |
A theme says how a plot should look.
A medium says where it will be seen, which is a separate question:
the same institutional theme serves a figure worked on at a desk,
projected in a lecture theatre, printed in an article,
and read on a phone, but each of those wants a different size of text
and, in one case, a different ground.
stocnet_medium() sets the medium for all subsequent plots,
as stocnet_theme() sets the theme, and leaves the theme alone.
If no medium is specified (i.e. the function is called without argument), the current medium is reported. The default medium is "screen".
stocnet_medium(medium = NULL, persist = FALSE)
set_stocnet_medium(medium = NULL, persist = FALSE)
ag_size()
medium |
String naming a medium. By default "screen". The following media are currently available: screen, presentation, mobile, print. This string can be capitalised or not. |
persist |
Logical, by default FALSE.
If TRUE, the medium is remembered across sessions,
by writing it to the user's configuration directory
(see |
The media available are:
"screen", the default, which draws as {autograph} always has.
"presentation", which enlarges text by half, for a figure read from the back of a room.
"mobile", which enlarges text further, for a figure read in a narrow
column on a handheld screen.
Keep such a figure to one point, with few categories:
a legend of more than about seven keys, or more than about three panels
from graphs(), will not survive the width.
"print", which leaves text at its usual size but draws on white, whatever ground the theme prefers. A dark or tinted ground costs ink and is often not reproduced.
The medium scales text, not marks.
Node sizes are relative to the layout they sit in,
so enlarging them without enlarging the layout would crowd it.
Where a figure needs larger nodes as well, set node_size in graphr().
The medium does not set the size of the file written.
Give ggplot2::ggsave() the width, height and resolution the medium
calls for as well.
stocnet_medium() sets the medium to be used across all
stocnet packages. The medium is written to an option and held there.
ag_size() returns the multiplier the current medium applies to text
sizes, which is 1 unless the medium says otherwise.
Other themes:
check_colors,
list_fonts(),
theme_colorblind,
theme_set
stocnet_medium("presentation")
ag_size()
stocnet_medium("screen")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.