Calculate plot area based on canvas size and margins (matplotlib-compatible) Note: left/bottom are margins, right/top are edge positions
top_offset_px (optional) pushes the plot-area top edge downward by that many image pixels. A twiny (top x-axis) needs this so its tick labels, axis label, and the figure title fit above the axes without clipping. When absent or non-positive the geometry is unchanged, preserving the matplotlib-exact default edges.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | canvas_width | |||
| integer, | intent(in) | :: | canvas_height | |||
| type(plot_margins_t), | intent(in) | :: | margins | |||
| type(plot_area_t), | intent(out) | :: | plot_area | |||
| integer, | intent(in), | optional | :: | top_offset_px |