Pcolormesh (pseudocolor mesh) plotting functionality
Provides 2D scalar field visualization using colored quadrilaterals on regular or irregular grids. Compatible with matplotlib pcolormesh.
Following SOLID principles: - Single Responsibility: Only handles pcolormesh data structures - Open/Closed: Extensible for different shading modes - Interface Segregation: Minimal, focused interface
Pcolormesh data container Stores grid vertices and color data for quadrilateral mesh rendering
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=wp), | public, | allocatable | :: | x_vertices(:,:) | |||
| real(kind=wp), | public, | allocatable | :: | y_vertices(:,:) | |||
| real(kind=wp), | public, | allocatable | :: | c_values(:,:) | |||
| character(len=20), | public | :: | colormap_name | = | 'viridis' | ||
| real(kind=wp), | public | :: | vmin | = | -huge(1.0_wp) | ||
| real(kind=wp), | public | :: | vmax | = | huge(1.0_wp) | ||
| logical, | public | :: | vmin_set | = | .false. | ||
| logical, | public | :: | vmax_set | = | .false. | ||
| logical, | public | :: | show_edges | = | .false. | ||
| real(kind=wp), | public, | dimension(3) | :: | edge_color | = | [0.0_wp, 0.0_wp, 0.0_wp] | |
| real(kind=wp), | public | :: | edge_width | = | 0.5_wp | ||
| real(kind=wp), | public | :: | alpha | = | 1.0_wp | ||
| integer, | public | :: | nx | = | 0 | ||
| integer, | public | :: | ny | = | 0 | 
| procedure, public :: initialize_regular_grid | |
| procedure, public :: initialize_irregular_grid | |
| procedure, public :: get_data_range | |
| procedure, public :: get_quad_vertices | 
Validate grid dimensions for pcolormesh with flexible dimension support
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | x_coords(:) | |||
| real(kind=wp), | intent(in) | :: | y_coords(:) | |||
| real(kind=wp), | intent(in) | :: | c_data(:,:) | |||
| type(fortplot_error_t), | intent(out), | optional | :: | error | 
Infer vertex edges from center coordinates for uniform grids
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | center_coords(:) | |||
| real(kind=wp), | intent(out) | :: | edge_coords(:) | 
Create 2D meshgrid from 1D coordinate arrays Used internally for regular grid setup
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | x_1d(:) | |||
| real(kind=wp), | intent(in) | :: | y_1d(:) | |||
| real(kind=wp), | intent(out) | :: | x_2d(:,:) | |||
| real(kind=wp), | intent(out) | :: | y_2d(:,:) |