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 a subplot grid and return axis indices in row-major order.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | nrows | |||
| integer, | intent(in) | :: | ncols |
Disable interactive mode
Draw the current figure and pause for specified duration
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | seconds |
Ensure the global figure exists and is initialized
Public wrapper to guarantee the singleton is ready for use
Create or reset the shared figure.
| 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.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | nrows | |||
| integer, | intent(in) | :: | ncols | |||
| integer, | intent(in) | :: | index |
Initialize a subplot grid.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | nrows | |||
| integer, | intent(in) | :: | ncols | |||
| integer, | intent(out), | optional, | allocatable | :: | axes(:,:) | |
| logical, | intent(in), | optional | :: | sharex | ||
| logical, | intent(in), | optional | :: | sharey |
Save the current figure.
| 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 the figure and return a status code.
| 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 |
Show a line plot and optionally apply labels before displaying it.
| 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 | ||
| 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 |
Display the current figure.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| logical, | intent(in), | optional | :: | blocking |
Launch the system image viewer for the current figure.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| logical, | intent(in), | optional | :: | blocking |