fortplot_figure_rendering_pipeline Module

Figure rendering pipeline module

Single Responsibility: Coordinate the complete rendering pipeline Extracted from fortplot_figure_core to improve modularity



Subroutines

public subroutine calculate_figure_data_ranges(plots, plot_count, xlim_set, ylim_set, x_min, x_max, y_min, y_max, x_min_transformed, x_max_transformed, y_min_transformed, y_max_transformed, xscale, yscale, symlog_threshold)

Calculate overall data ranges for the figure with robust edge case handling Fixed Issue #432: Handles zero-size arrays and single points properly

Arguments

Type IntentOptional Attributes Name
type(plot_data_t), intent(in) :: plots(:)
integer, intent(in) :: plot_count
logical, intent(in) :: xlim_set
logical, intent(in) :: ylim_set
real(kind=wp), intent(inout) :: x_min
real(kind=wp), intent(inout) :: x_max
real(kind=wp), intent(inout) :: y_min
real(kind=wp), intent(inout) :: y_max
real(kind=wp), intent(out) :: x_min_transformed
real(kind=wp), intent(out) :: x_max_transformed
real(kind=wp), intent(out) :: y_min_transformed
real(kind=wp), intent(out) :: y_max_transformed
character(len=*), intent(in) :: xscale
character(len=*), intent(in) :: yscale
real(kind=wp), intent(in) :: symlog_threshold

public subroutine setup_coordinate_system(backend, x_min_transformed, x_max_transformed, y_min_transformed, y_max_transformed)

Setup the coordinate system for rendering

Arguments

Type IntentOptional Attributes Name
class(plot_context), intent(inout) :: backend
real(kind=wp), intent(in) :: x_min_transformed
real(kind=wp), intent(in) :: x_max_transformed
real(kind=wp), intent(in) :: y_min_transformed
real(kind=wp), intent(in) :: y_max_transformed

public subroutine render_figure_background(backend)

Render figure background

Arguments

Type IntentOptional Attributes Name
class(plot_context), intent(inout) :: backend

public subroutine render_figure_axes(backend, xscale, yscale, symlog_threshold, x_min, x_max, y_min, y_max, title, xlabel, ylabel)

Render figure axes and labels

Arguments

Type IntentOptional Attributes Name
class(plot_context), intent(inout) :: backend
character(len=*), intent(in) :: xscale
character(len=*), intent(in) :: yscale
real(kind=wp), intent(in) :: symlog_threshold
real(kind=wp), intent(in) :: x_min
real(kind=wp), intent(in) :: x_max
real(kind=wp), intent(in) :: y_min
real(kind=wp), intent(in) :: y_max
character(len=:), intent(in), allocatable :: title
character(len=:), intent(in), allocatable :: xlabel
character(len=:), intent(in), allocatable :: ylabel

public subroutine render_all_plots(backend, plots, plot_count, x_min_transformed, x_max_transformed, y_min_transformed, y_max_transformed, xscale, yscale, symlog_threshold, width, height, margin_left, margin_right, margin_bottom, margin_top)

Render all plots in the figure

Arguments

Type IntentOptional Attributes Name
class(plot_context), intent(inout) :: backend
type(plot_data_t), intent(in) :: plots(:)
integer, intent(in) :: plot_count
real(kind=wp), intent(in) :: x_min_transformed
real(kind=wp), intent(in) :: x_max_transformed
real(kind=wp), intent(in) :: y_min_transformed
real(kind=wp), intent(in) :: y_max_transformed
character(len=*), intent(in) :: xscale
character(len=*), intent(in) :: yscale
real(kind=wp), intent(in) :: symlog_threshold
integer, intent(in) :: width
integer, intent(in) :: height
real(kind=wp), intent(in) :: margin_left
real(kind=wp), intent(in) :: margin_right
real(kind=wp), intent(in) :: margin_bottom
real(kind=wp), intent(in) :: margin_top