maison 0.3.0
The first version prepared for CRAN.
Breaking changes
-
register_maison_fonts()is nowfind_maison_fonts(). It reports which fonts the session can use and never registered anything, so the old name misled. There is no alias. -
use_maison()is nowset_maison(). It sets session state, likeggplot2::theme_set(); theuse_prefix is kept for functions that write files. It takesbase_family, notfamily, to matchtheme_maison(). - Three color names use underscores, like the palette names:
warm_white,rust_lightandgreen_lightwerewarm-white,rust-lightandgreen-light. -
paletteis the first argument of every scale.scale_*_maison_div()was(midpoint, reverse, palette)andscale_fill_maison_likert()was(reverse, drop, palette); calls that passed those by position need names. - The
"sequential"palette alias is gone. Use"seq_purple". -
categorical_darkhas six colors, not four, in a new order: honey, lilac#A99AAF, leaf, rust, light blue#5884AC, mauve. The second color of a dark chart was leaf and is now lilac, so dark charts with two or more groups change color. Every color keeps at least 3:1 contrast on charcoal. - The neutral step of the
quietpalette is light gray#DADADA, where it was warm_white and vanished on the background. This changesscale_fill_maison_likert("quiet")andscale_*_maison_div("quiet"). -
geom_segment(),geom_curve()and an unmappedgeom_tile()are plum under the theme, where they were the text color and gray.
New
- House defaults for more chart types, all carried by the theme: reference lines (
geom_hline(),geom_vline(),geom_abline()), shaded periods (geom_rect(),annotate("rect")), boxplots, error bars, line ranges and point ranges, ribbons, areas and densities, smooths, and segments. See “House defaults by chart type” in?theme_maison, which also lists what a theme cannot set: boxplot outliers, error bar caps and the translucency of mapped fills. -
theme_maison(void = TRUE)removes axes, axis text and grid lines for donuts and other axis-free charts, and keeps the type scale. -
maison_label_color()returns ink or warm_white for each fill, whichever reads better, for labels inside bars. -
maison_colorsgainsindigo#264884andpetrol#2D7F9A, extras for one-off use. They are in no palette. -
?theme_maisondocumentsgrid = "X"for horizontal bars, and recipes for ggrepel and patchwork. -
theme_maison()gainslegend_location."panel"starts a top or bottom legend where the bars start, for charts with long y-axis labels such as Likert stacks. The default,"plot", is unchanged. -
set_maison()gainsplot_margin, passed totheme_maison(), to give every chart in a document an outer margin. The default is still none. - A gallery vignette,
vignette("gallery", package = "maison"): fifteen chart recipes on simulated data, each with a snapshot test.
Renamed package
- Renamed from madras to maison. Every exported function and object that carried the old name now carries the new one:
theme_maison(),theme_maison_tt(),set_maison(),maison_colors,maison_pal(),maison_highlight(),scale_*_maison_*(),find_maison_fonts()andcheck_maison_fonts(). The old names are gone, not aliased.
maison 0.2.0
Breaking changes
- The categorical palette is now eight colors, in a new order: plum, honey, cobalt, leaf, rust, berry, mauve, charcoal. It was red, plum, mauve, honey, charcoal. Every chart that takes its colors from the theme or from
scale_*_maison_d()changes color, and the limit is eight groups, not five. - Red is no longer a categorical color. It is reserved for
maison_highlight()and emphasis. -
theme_maison(dark = TRUE)uses the newcategorical_darkpalette: honey, leaf, rust, mauve. These are the categorical colors with at least 3:1 contrast against charcoal, so a dark chart now stops at four groups. - The default sequential palette is the
seq_purpleramp, which ends at plum. It ended at charcoal."sequential"still works, as an alias for"seq_purple";"seq_neutral"is the ramp that ends at charcoal. -
theme_maison()has no outer margin by default:plot_marginismargin(0, 0, 0, 0), where it was 30 pt on every side. Passplot_marginto get the room back. - A font family that is not available now falls back to
"sans", with one warning per session. Before, the family was kept and grid warned for every piece of text.fallback = FALSErestores the old behavior.
New
-
maison_colorsgainscobalt,leaf,berryandolive. Olive is a context color for highlight charts:maison_highlight(base = "olive"). - Sequential ramps, each seven steps from warm-white:
seq_purple,seq_neutral,seq_gray,seq_red,seq_honey,seq_green,seq_rustandseq_cobalt. The first seven are hand-tuned;seq_cobaltis generated to match their step spacing (dev/seq-cobalt.R). -
diverging_green, a plum to green diverging palette, and thequietfamily (quiet,quiet_purple,quiet_sage) for scales with no good or bad direction. -
scale_fill_maison_div()and itscolourversions gainpalette:"diverging","diverging_green"or"quiet". -
scale_fill_maison_likert()gainspalette:"likert"or"quiet". -
theme_maison()anduse_maison()gainbackground(NULL,"transparent"or a color) andfallback.
maison 0.1.0
First version. maison replaces the styling code that lived in twill.R, R/tweed.R and new-palette.R.
-
theme_maison()is a complete ggplot2 theme built ontheme_minimal(). It carries the type scale, the warm-white (or, withdark = TRUE, charcoal) background, per-geom defaults for text, labels, bars, points and lines, and the default discrete and continuous palettes. The legend sits above the chart, flush left with the plot edge and untitled;legend_positionmoves it. It needs ggplot2 4.0.0 or later and changes no global state. -
maison_colorsholds the brand colors.maison_pal()returns the categorical, sequential, diverging and Likert palettes as functions ofn. -
scale_fill_maison_d(),scale_fill_maison_c()andscale_fill_maison_div(), withcolourandcolorversions, are explicit scales for when a chart needs something other than the theme default. -
scale_fill_maison_likert()colors agreement scales of 2 to 11 points. Ordered factors bypass theme palettes, so Likert charts need it. -
maison_highlight()builds the values for a highlight chart. -
register_maison_fonts()andcheck_maison_fonts()find the house fonts (Hanken Grotesk, Newsreader, IBM Plex Mono) and say how to install any that are missing. -
theme_maison_tt()is the house tinytable theme. -
use_maison()sets the ggplot2 theme and the tinytable theme for a document in one call.