Layout and margin calculations for plotting backends
This module handles plot area geometry and margin calculations, following Single Responsibility Principle by focusing solely on layout-related functionality.
Author: fortplot contributors
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=wp), | public | :: | left | = | 0.125_wp | ||
| real(kind=wp), | public | :: | right | = | 0.9_wp | ||
| real(kind=wp), | public | :: | bottom | = | 0.11_wp | ||
| real(kind=wp), | public | :: | top | = | 0.88_wp | 
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | left | ||||
| integer, | public | :: | bottom | ||||
| integer, | public | :: | width | ||||
| integer, | public | :: | height | 
Calculate plot area based on canvas size and margins (matplotlib-compatible) Note: left/bottom are margins, right/top are edge positions
| 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 |