Merge theme-shortcut scale fields into an (optional) scale object
Source:R/scale.R
dot-merge_scale_with_theme.RdThe theme can express scale settings via keys like
axis.x1.scale.limits / .breaks / .expand / .cap. This helper
builds or augments the canonical scale object:
Arguments
- scale
An existing scale or
NULL.- axis_spec
A per-side axis spec from
.build_axis_spec().
Details
If
scaleisNULLand the theme has at least one relevant entry, aseq_scale_continuous()is constructed from the theme values.If
scaleis non-NULL, anyNULLfields onscaleare filled from the theme. User-supplied fields always win.