fortplot_figure_core_io Module

Figure I/O and rendering operations module

This module contains figure save/show/render functionality extracted from fortplot_figure_core for architectural compliance

ARCHITECTURAL REFACTORING (Issue #678): - Focused module for I/O operations - Single Responsibility Principle compliance - Clean separation from plot management



Subroutines

public subroutine savefig_figure(state, plots, plot_count, filename, blocking, annotations, annotation_count, subplots_array, subplot_rows, subplot_cols)

Save figure to file (backward compatibility version)

Arguments

Type IntentOptional Attributes Name
type(figure_state_t), intent(inout) :: state
type(plot_data_t), intent(inout) :: plots(:)
integer, intent(in) :: plot_count
character(len=*), intent(in) :: filename
logical, intent(in), optional :: blocking
type(text_annotation_t), intent(in), optional :: annotations(:)
integer, intent(in), optional :: annotation_count
type(subplot_data_t), intent(in), optional :: subplots_array(:,:)
integer, intent(in), optional :: subplot_rows
integer, intent(in), optional :: subplot_cols

public subroutine savefig_with_status_figure(state, plots, plot_count, filename, status, blocking, annotations, annotation_count, subplots_array, subplot_rows, subplot_cols)

Save figure to file with error status reporting Added Issue #854: File path validation for user input safety

Arguments

Type IntentOptional Attributes Name
type(figure_state_t), intent(inout) :: state
type(plot_data_t), intent(inout) :: plots(:)
integer, intent(in) :: plot_count
character(len=*), intent(in) :: filename
integer, intent(out) :: status
logical, intent(in), optional :: blocking
type(text_annotation_t), intent(in), optional :: annotations(:)
integer, intent(in), optional :: annotation_count
type(subplot_data_t), intent(in), optional :: subplots_array(:,:)
integer, intent(in), optional :: subplot_rows
integer, intent(in), optional :: subplot_cols

public subroutine show_figure(state, plots, plot_count, blocking, annotations, annotation_count, subplots_array, subplot_rows, subplot_cols)

Display the figure

Arguments

Type IntentOptional Attributes Name
type(figure_state_t), intent(inout) :: state
type(plot_data_t), intent(inout) :: plots(:)
integer, intent(in) :: plot_count
logical, intent(in), optional :: blocking
type(text_annotation_t), intent(in), optional :: annotations(:)
integer, intent(in), optional :: annotation_count
type(subplot_data_t), intent(in), optional :: subplots_array(:,:)
integer, intent(in), optional :: subplot_rows
integer, intent(in), optional :: subplot_cols

public subroutine render_figure_impl(state, plots, plot_count, annotations, annotation_count, subplots_array, subplot_rows, subplot_cols)

Main rendering pipeline implementation Fixed Issue #432: Always render axes/labels even with no plot data Fixed Issue #844: ASCII annotation functionality

Arguments

Type IntentOptional Attributes Name
type(figure_state_t), intent(inout) :: state
type(plot_data_t), intent(inout) :: plots(:)
integer, intent(in) :: plot_count
type(text_annotation_t), intent(in), optional :: annotations(:)
integer, intent(in), optional :: annotation_count
type(subplot_data_t), intent(in), optional :: subplots_array(:,:)
integer, intent(in), optional :: subplot_rows
integer, intent(in), optional :: subplot_cols