fortplot_figure_subplots Module

Subplot management functionality for figure_t

Extracted from fortplot_figure_core to meet QADS size limits. Provides grid-based subplot creation and management.



Functions

public function get_subplot_plot_count(subplots_array, subplot_rows, subplot_cols, row, col) result(count)

Get the number of plots in a specific subplot

Arguments

Type IntentOptional Attributes Name
type(subplot_data_t), intent(in) :: subplots_array(:,:)
integer, intent(in) :: subplot_rows
integer, intent(in) :: subplot_cols
integer, intent(in) :: row
integer, intent(in) :: col

Return Value integer

public function get_subplot_title(subplots_array, subplot_rows, subplot_cols, row, col) result(title)

Get the title for a specific subplot

Arguments

Type IntentOptional Attributes Name
type(subplot_data_t), intent(in) :: subplots_array(:,:)
integer, intent(in) :: subplot_rows
integer, intent(in) :: subplot_cols
integer, intent(in) :: row
integer, intent(in) :: col

Return Value character(len=:), allocatable


Subroutines

public subroutine create_subplots(subplots_array, subplot_rows, subplot_cols, nrows, ncols, subplot_active)

Create a grid of subplots

Arguments

Type IntentOptional Attributes Name
type(subplot_data_t), intent(inout), allocatable :: subplots_array(:,:)
integer, intent(out) :: subplot_rows
integer, intent(out) :: subplot_cols
integer, intent(in) :: nrows
integer, intent(in) :: ncols
logical, intent(out) :: subplot_active

public subroutine add_subplot_plot(subplots_array, subplot_rows, subplot_cols, row, col, x, y, label, linestyle, color, default_colors, max_colors)

Add a plot to a specific subplot

Arguments

Type IntentOptional Attributes Name
type(subplot_data_t), intent(inout) :: subplots_array(:,:)
integer, intent(in) :: subplot_rows
integer, intent(in) :: subplot_cols
integer, intent(in) :: row
integer, intent(in) :: col
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), optional :: color(3)
real(kind=wp), intent(in) :: default_colors(:,:)
integer, intent(in) :: max_colors

public subroutine set_subplot_title(subplots_array, subplot_rows, subplot_cols, row, col, title)

Set the title for a specific subplot

Arguments

Type IntentOptional Attributes Name
type(subplot_data_t), intent(inout) :: subplots_array(:,:)
integer, intent(in) :: subplot_rows
integer, intent(in) :: subplot_cols
integer, intent(in) :: row
integer, intent(in) :: col
character(len=*), intent(in) :: title

public subroutine set_subplot_xlabel(subplots_array, subplot_rows, subplot_cols, row, col, xlabel)

Set the x-axis label for a specific subplot

Arguments

Type IntentOptional Attributes Name
type(subplot_data_t), intent(inout) :: subplots_array(:,:)
integer, intent(in) :: subplot_rows
integer, intent(in) :: subplot_cols
integer, intent(in) :: row
integer, intent(in) :: col
character(len=*), intent(in) :: xlabel

public subroutine set_subplot_ylabel(subplots_array, subplot_rows, subplot_cols, row, col, ylabel)

Set the y-axis label for a specific subplot

Arguments

Type IntentOptional Attributes Name
type(subplot_data_t), intent(inout) :: subplots_array(:,:)
integer, intent(in) :: subplot_rows
integer, intent(in) :: subplot_cols
integer, intent(in) :: row
integer, intent(in) :: col
character(len=*), intent(in) :: ylabel