cmapplot 1.1.0
This pair of updates primarily makes many changes to finalize_plot()
to enable printing plots without the left-hand "sidebar" -- the area that contains the title and the caption. Most but not all changes are under the hood and should not impact the user. Those that will impact the user include:
- There is a new argument,
inherit
, that allows the user to specify whether cmapplot should attempt to inherit titles and/or captions from the underlying ggplot object. - The argument
title_width
has been renamedsidebar_width
to better reflect its function. - Setting
sidebar_width = 0
now has the effect of shifting the title above the topline and shifting the caption from the title column to directly below the plot. If the user does not want a title on the vertical layout graphic, this can be achieved by leavingtitle = ""
, the default, and (if relevant) specifying thatfinalize_plot()
should not attempt to inherit a title from the underlying ggplot object. - There is a new argument,
caption_align
, which takes numeric range 0 to 1.0
, the default, aligns the caption bottom or left (in title-column and below-plot captions, respectively).1
aligns the caption top or right.0.5
centers. The argumentcaption_valign
has been deprecated. - The value
margin_title_l
has been replaced withmargin_sidebar_l
, which only affects horizontal layout graphics. The margin for titles and captions in the vertical layout is based onmargin_plot_l
. - Separately, this version also creates this
NEWS.md
file for the pkgdown website.
Under-the-hood changes to finalize_plot()
are documented in PR #111, specifically here.
Backward compatibility notes
Users who have written code with previous versions of cmapplot should note these known compatibility issues:
- In
finalize_plot()
, the argumentcaption_valign
has been deprecated and will now issue a message alert (but will still work, for now). Please update your code to use the new argumentcaption_align
. - In
finalize_plot()
, the argumenttitle_width
has been deprecated and will now issue a message alert (but will still work, for now). Please update your code to use the new argumentsidebar_width
. - Any overrides using the deprecated value
margin_title_l
will no longer have any affect. Usemargin_sidebar_l
instead.