Repository navigation
v4.0.0
Summary
This release moves gramm's figure layout to MATLAB's tiledlayout and adds several long-requested features on top of it.
Layout
- Facets, legends and titles are placed with
tiledlayoutinstead of gramm's custom position computations. Resizing is faster and more reliable, figures with multiple gramm plots keep axes aligned. set_parent(parent,'tile',…,'span',…)can draw a gramm plot in a tile of atiledlayout, so gramm plots of different sizes and regular axes can be combined.- New spacing and padding options in
set_layout_options(). - Long titles (figure, facet, row/column) wrap to the available width, toggled with
set_text_options('wrap',…). - Figure theme (light/dark) handling is more robust and follows
ThemeChangedFcn.
New features
- Native datetime and duration data for x, y and grouping variables, with time-based bins (
'bin_width', e.g.hours(2)or'month'). - Native polar axes with
set_polar(), including radar charts (requires R2025a). - Log axes with
set_scale(). 'fill_alpha'controls the transparency of shaded areas in every geom and stat that draws them.- Line style legends are longer, so that the line pattern is visible.
Consistency and robustness
- All methods parse their options and validate them.
- Error bars are native MATLAB
errorbarobjects throughout. - Line width option names unified (
'line_width'; the old names are still accepted).
Documentation and CI
- New layout for the cheat sheet page: sidebar navigation, filter, overview of the steps of a gramm figure, and a dense printable version.
- The cheat sheet is generated from the method help headers and
inputParseroptions (buildtool cheatsheet), and stays up-to-date. All method help headers were rewritten in a common format. - Tutorials and examples are exported by
buildtooland published on the website by the release workflow. Generated HTML is no longer tracked.
Breaking changes
- Requires MATLAB R2022b or later (R2025a for polar plots).
set_layout_options()options of the former manual layout ('position','legend_width','title_centering','redraw_gap','margin_height','margin_width','gap') are removed and give agramm:removedOptionerror. Custom layouts useset_parent()with atiledlayout.- Numeric color data is no longer switched to continuous colors above 15 values: use
set_continuous_color()for scatter plots colored by a continuous variable. - Error bars (
'errorbar','black_errorbar'geoms) areerrorbarobjects instead of a single NaN-separated line: theirXData/YDataare now the centers, and their cap size isCapSize, set withset_line_options('cap_size',…). draw()no longer takes an argument: replaceg.draw(false)withg.set_layout_options('redraw',false)beforedraw().set_datetick()is legacy (datenum x only): datetime x data is displayed natively.
Issues addressed
Fixes #93 (errorbar caps), fixes #95 (square y matrix), fixes #101 (many numeric colors), fixes #111 (area transparency), fixes #113 (drawing in App Designer).
Other inputs
- Fix colormap comment typo by @Kkkakania in #152
- Feature/buildtool package publish by @slahoti1 in #153
- Update CI workflows to use buildtool tasks Feature/buildtool ci workflows by @slahoti1 in #156
New Contributors
- @Kkkakania made their first contribution in #152
Full Changelog: v3.1.2...v4.0.0