Figure plot data management module
Single Responsibility: Manage plot data storage and operations Extracted from fortplot_figure_core to improve modularity
Next colour from the line cycle (plot/axhline/axvline). matplotlib advances the line property cycle only for line artists; scatter and contour draw from the patch/colormap path and never touch it. When the plots array is supplied, count existing line artists so an intervening scatter or contour does not skip a colour. Without it, fall back to the global plot index for callers that have no array in scope.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(figure_state_t), | intent(in) | :: | state | |||
| type(plot_data_t), | intent(in), | optional | :: | plots(:) |
Next colour from the patch cycle (scatter/fill/bar/histogram). matplotlib cycles patches independently of lines, so the first scatter or filled area is tab:blue even when a line was drawn before it, and a following line plot still starts at tab:blue. Counts existing patch artists rather than the global plot index.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(figure_state_t), | intent(in) | :: | state | |||
| type(plot_data_t), | intent(in) | :: | plots(:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in), | contiguous | :: | x(:) | ||
| real(kind=wp), | intent(in), | contiguous | :: | y(:) | ||
| character(len=*), | intent(in), | optional | :: | label |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(plot_data_t), | intent(inout) | :: | plots(:) | |||
| integer, | intent(inout) | :: | plot_count | |||
| integer, | intent(in) | :: | max_plots | |||
| real(kind=wp), | intent(in), | contiguous | :: | x(:) | ||
| real(kind=wp), | intent(in), | contiguous | :: | y(:) | ||
| character(len=*), | intent(in), | optional | :: | label | ||
| character(len=*), | intent(in), | optional | :: | linestyle | ||
| real(kind=wp), | intent(in) | :: | color(3) | |||
| real(kind=wp), | intent(in), | optional | :: | alpha | ||
| character(len=*), | intent(in), | optional | :: | marker |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(plot_data_t), | intent(inout) | :: | plots(:) | |||
| integer, | intent(inout) | :: | plot_count | |||
| integer, | intent(in) | :: | max_plots | |||
| real(kind=wp), | intent(in), | contiguous | :: | x(:) | ||
| real(kind=wp), | intent(in), | contiguous | :: | upper(:) | ||
| real(kind=wp), | intent(in), | contiguous | :: | lower(:) | ||
| logical, | intent(in), | optional | :: | mask(:) | ||
| real(kind=wp), | intent(in) | :: | color(3) | |||
| real(kind=wp), | intent(in), | optional | :: | alpha |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(plot_data_t), | intent(inout) | :: | plots(:) | |||
| integer, | intent(in) | :: | plot_count | |||
| integer, | intent(in) | :: | plot_index | |||
| real(kind=wp), | intent(in), | contiguous | :: | y_new(:) |