fix(plot): a figure row's strip shows labels and title independently, and the shared axis is the bottom row's strip
This commit is contained in:
1 parent
8f1e60a105
commit
770da4c2b2
9 files changed
+415
-175
No files matched your search
@@ -140,11 +140,12 @@ class Renderer {
|
||||
/// exactly as a stand-alone plot is, and `draw(Plot&)` itself is unchanged for
|
||||
/// single-plot hosts.
|
||||
|
||||
/// The shared axis is the frame's last text: when the figure says labels belong on
|
||||
/// the bottom only (the default), the rows reserved no x label strip of their own
|
||||
/// and the labels of the last row's x axes are staged once, in the strip
|
||||
/// `FigureLayout::x_axis_strip` measured, under the last row. With that switched
|
||||
/// off, every row draws its own labels and this draws no shared axis at all.
|
||||
/// The figure's one shared x axis is the **bottom row's own**, so it is drawn by
|
||||
/// that row's normal path: when the figure says labels belong on the bottom only
|
||||
/// (the default), the rows above reserve no x chrome and the bottom row stages its
|
||||
/// own labels and title once, inside its own strip -- the rect
|
||||
/// `FigureLayout::x_axis_strip` reads back. With that switched off, every row keeps
|
||||
/// its own chrome and each draws its own labels; there is then no shared axis.
|
||||
|
||||
/// Styling, the text backend and `ui_scale` are installed on **every** row before
|
||||
/// the figure computes its layout, so the strips the rows measure and the strokes
|
||||
@@ -363,11 +364,6 @@ class Renderer {
|
||||
/// ticks, the strips and the grid, so it is computed once, in `draw()`, and handed
|
||||
/// down -- never re-derived per helper.
|
||||
void draw_tick_labels(const Plot& plot, const PlotLayout& layout);
|
||||
/// The x tick labels of every x axis of `plot`, centred on their ticks in `strip`:
|
||||
/// what `draw_tick_labels()` uses with the plot's own `x_label_area`, and what
|
||||
/// `draw(Figure&)` uses with the figure's shared strip -- one rule for a plot's
|
||||
/// labels and a figure's, so the two can never place a label differently.
|
||||
void draw_x_tick_labels(const Plot& plot, const Rect& strip);
|
||||
void draw_titles(const Plot& plot, const PlotLayout& layout);
|
||||
/// The data helpers take it too; they read the axes rect and the transforms it
|
||||
/// pins.
|
||||
|
||||
Reference in new issue
Block a user