Global figure session helpers shared across matplotlib-compatible wrappers
Provides lifecycle management for the singleton figure used by the matplotlib facade. Responsibilities include creating and reusing the global figure, grid/subplot helpers, and viewer integration utilities.
Return the global figure pointer, initializing on demand
Create subplot grid and return axis indices in row-major order
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | nrows | |||
| integer, | intent(in) | :: | ncols | 
Ensure the global figure exists and is initialized
Public wrapper to guarantee the singleton is ready for use
Create a matplotlib-style figure using the shared singleton
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in), | optional | :: | num | ||
| real(kind=wp), | intent(in), | optional, | dimension(2) | :: | figsize | |
| integer, | intent(in), | optional | :: | dpi | 
Select a subplot in an nrows-by-ncols grid (matplotlib-compatible)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | nrows | |||
| integer, | intent(in) | :: | ncols | |||
| integer, | intent(in) | :: | index | 
Initialize a subplot grid using the global figure
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | nrows | |||
| integer, | intent(in) | :: | ncols | 
Save current figure using matplotlib-compatible API
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | filename | |||
| integer, | intent(in), | optional | :: | dpi | ||
| logical, | intent(in), | optional | :: | transparent | ||
| character(len=*), | intent(in), | optional | :: | bbox_inches | 
Save figure and return status code for testing scenarios
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | filename | |||
| integer, | intent(out) | :: | status | |||
| integer, | intent(in), | optional | :: | dpi | ||
| logical, | intent(in), | optional | :: | transparent | ||
| character(len=*), | intent(in), | optional | :: | bbox_inches | 
Convenience routine mirroring matplotlib.pyplot.show signature with data
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | x(:) | |||
| real(kind=wp), | intent(in) | :: | y(:) | |||
| character(len=*), | intent(in), | optional | :: | label | ||
| character(len=*), | intent(in), | optional | :: | title_text | ||
| character(len=*), | intent(in), | optional | :: | xlabel_text | ||
| character(len=*), | intent(in), | optional | :: | ylabel_text | ||
| logical, | intent(in), | optional | :: | blocking | 
Show the global figure via backend implementation
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| logical, | intent(in), | optional | :: | blocking | 
Launch external viewer with saved figure artifact when available
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| logical, | intent(in), | optional | :: | blocking |