| theme_regsen | R Documentation |
A ggplot2 theme tuned for figures that will be dropped into a paper. It follows the conventions of the economics journals: an L of axis lines rather than a box, no grid, ticks outside the panel, no figure title (the caption carries it), and a legend along the top so the plot region keeps its aspect ratio when the figure is scaled down to one column.
theme_regsen(
base_size = 11,
base_family = "",
grid = c("none", "y", "x", "both"),
legend_position = "top"
)
base_size |
Base font size in points. |
base_family |
Base font family. The empty string uses the device default, which keeps figures reproducible across machines. |
grid |
One of |
legend_position |
Passed to |
To match a LaTeX manuscript's body type, pass a serif family, e.g.
theme_regsen(base_family = "Times New Roman"). Fonts are left to the
caller because what is installed varies by machine, and a missing family
would make figures unreproducible.
The default base_size of 11 assumes a figure rendered at roughly
6 inches wide. For a two-column journal figure, render at 3.3 inches and
pass base_size = 9; the type will then sit at about 8pt on the page.
A ggplot2 theme object, which can be added to any plot.
data(bfg2020)
res <- regsen_bounds(
avgrep2000to2016 ~ tye_tfe890_500kNI_100_l6 + log_area_2010 + lat + lon,
data = bfg2020, compare = c("log_area_2010", "lat", "lon"), cbar = 0.1
)
plot(res) + theme_regsen(base_size = 9)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.