Figure plot data management module
Single Responsibility: Manage plot data storage and operations Extracted from fortplot_figure_core to improve modularity
Validate plot data and provide informative warnings for edge cases Added for Issue #432: Better user feedback for problematic data
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | x(:) | |||
real(kind=wp), | intent(in) | :: | y(:) | |||
character(len=*), | intent(in), | optional | :: | label |
Add line plot data to internal storage with edge case validation Fixed Issue #432: Added data validation for better user feedback
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) | :: | colors(:,:) | |||
real(kind=wp), | intent(in) | :: | x(:) | |||
real(kind=wp), | intent(in) | :: | y(:) | |||
character(len=*), | intent(in), | optional | :: | label | ||
character(len=*), | intent(in), | optional | :: | linestyle | ||
real(kind=wp), | intent(in) | :: | color(3) | |||
character(len=*), | intent(in), | optional | :: | marker |
Add contour plot data to internal storage
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) | :: | colors(:,:) | |||
real(kind=wp), | intent(in) | :: | x_grid(:) | |||
real(kind=wp), | intent(in) | :: | y_grid(:) | |||
real(kind=wp), | intent(in) | :: | z_grid(:,:) | |||
real(kind=wp), | intent(in), | optional | :: | levels(:) | ||
character(len=*), | intent(in), | optional | :: | label |
Add colored contour plot data
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) | :: | x_grid(:) | |||
real(kind=wp), | intent(in) | :: | y_grid(:) | |||
real(kind=wp), | intent(in) | :: | z_grid(:,:) | |||
real(kind=wp), | intent(in), | optional | :: | levels(:) | ||
character(len=*), | intent(in), | optional | :: | colormap | ||
logical, | intent(in), | optional | :: | show_colorbar | ||
character(len=*), | intent(in), | optional | :: | label |
Add pcolormesh plot data
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) | :: | x(:) | |||
real(kind=wp), | intent(in) | :: | y(:) | |||
real(kind=wp), | intent(in) | :: | c(:,:) | |||
character(len=*), | intent(in), | optional | :: | colormap | ||
real(kind=wp), | intent(in), | optional | :: | vmin | ||
real(kind=wp), | intent(in), | optional | :: | vmax | ||
real(kind=wp), | intent(in), | optional | :: | edgecolors(3) | ||
real(kind=wp), | intent(in), | optional | :: | linewidths |
Generate default contour levels
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(plot_data_t), | intent(inout) | :: | plot_data |
Setup figure legend
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(legend_t), | intent(inout) | :: | legend_data | |||
logical, | intent(inout) | :: | show_legend | |||
type(plot_data_t), | intent(in) | :: | plots(:) | |||
integer, | intent(in) | :: | plot_count | |||
character(len=*), | intent(in), | optional | :: | location |
Update y data for an existing plot
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) | :: | y_new(:) |