Release notes for sbmlsim 0.9.6
A release of one feature: one legend per row, right of the grid, with the entries of all plots of the row. A figure which does not opt in does not change, apart from the position of the legend of its interactive version (see Fixes): the static images are identical to 0.9.5.
Features
- One legend per row (#327). The new setting
legend_scopeofFigureSettingssays which plots a legend collects:"plot"(the default) a legend per plot, as before, and"row"one legend per row of the grid. A figure whose plots of a row draw the same tasks wanted one legend per row, which 0.9.5 could only emulate by showing the legend of the last plot of a row: the entries of the other plots of the row were missing (in the band figures of the acetaminophen model of pkdb_models the study data and the dashed sums, drawn in the other columns) and a row whose last plot was empty had no legend; pkdb_models carried the workaround in 29 copies. The legend of a row now has the entries of all plots of the row, in their order, and shows an entry which reads and looks the same as an earlier one (its label, colours, line, marker, hatch and error bars), e.g. the simulation of every plot, once, the rule by which the interactive figures already merge their entries; entries with the same label which look different stay apart. The legends of the rows are right of the grid, one below the other at the top of their row, also when the last cell of a row is empty or has no plot: right of the right y axes and the colour bars of every plot of the last column, which gets the room of the widest legend, as a legend outside of 0.9.5 widens only the gap right of its plot; a legend taller than its row gives the row the room of its overflow below it. Thelegendof a plot decides whether its entries enter the legend of its row;legend_positionandlegend_locapply to the legends of the plots only. As a setting, the scope cascades like the others: an experiment (figure_settings) or a run sets it for all of its figures,Figure(..., settings={"legend_scope": "row"})for one figure. The interactive figures of plotly give every row a legend of its own (legend,legend2, ...) at the top of the row, which scrolls when it is taller than its row and leaves out the entries of a plot without a legend, whose curves the entry of the row which reads and looks the same still switches. A figure with the scope"plot"is unchanged: the 173 PNG and 173 SVG images which the tests render are byte-identical to 0.9.5, as are the 22 PNG and 17 SVG images and 8 HTML pages which the examples write (the date of an SVG and the path of the checkout aside); of the 48 interactive figures which the tests render, 37 changed in the position of their legend and in nothing else, and 11 (those with colour bars) are identical, see Fixes.
Fixes
- A plot which spans rows stretches over the room below an overflowing legend. A legend outside which is taller than its row gives the row the room of its overflow below it, and the rows below move down; a plot spanning the row and the rows below kept its height and ended above its last row. It now stretches over the room, with its colour bars. No figure of the tests changes, a figure changes only if it has a plot which spans rows next to a legend taller than its row.
- The legends of the interactive figures are right of the last column. plotly reserves 6 % of the plot area right of a grid for the second y axis, so that a legend at the right edge of the plot area was far from the panels (about 220 px for a grid of 6 columns). The legends are now right of the last column, of the ticks of its right y axis if a plot of the column has one, at the gap of the legends right of a colour bar. Of the 48 interactive figures of the tests, 37 change in the position (
x) of their legend and in nothing else.