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 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, plots, plot_count, has_twinx, twinx_y_min, twinx_y_max, twinx_ylabel, twinx_yscale, has_twiny, twiny_x_min, twiny_x_max, twiny_xlabel, twiny_xscale)

Render figure axes and labels For raster backends, split rendering to prevent label overlap issues

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
type(plot_data_t), intent(in) :: plots(:)
integer, intent(in) :: plot_count
logical, intent(in), optional :: has_twinx
real(kind=wp), intent(in), optional :: twinx_y_min
real(kind=wp), intent(in), optional :: twinx_y_max
character(len=:), intent(in), optional, allocatable :: twinx_ylabel
character(len=*), intent(in), optional :: twinx_yscale
logical, intent(in), optional :: has_twiny
real(kind=wp), intent(in), optional :: twiny_x_min
real(kind=wp), intent(in), optional :: twiny_x_max
character(len=:), intent(in), optional, allocatable :: twiny_xlabel
character(len=*), intent(in), optional :: twiny_xscale

public subroutine render_figure_axes_labels_only(backend, xscale, yscale, symlog_threshold, x_min, x_max, y_min, y_max, title, xlabel, ylabel, plots, plot_count, has_twinx, twinx_y_min, twinx_y_max, twinx_ylabel, twinx_yscale, has_twiny, twiny_x_min, twiny_x_max, twiny_xlabel, twiny_xscale)

Render ONLY axis labels (for raster backends after plots are drawn)

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
type(plot_data_t), intent(in) :: plots(:)
integer, intent(in) :: plot_count
logical, intent(in), optional :: has_twinx
real(kind=wp), intent(in), optional :: twinx_y_min
real(kind=wp), intent(in), optional :: twinx_y_max
character(len=:), intent(in), optional, allocatable :: twinx_ylabel
character(len=*), intent(in), optional :: twinx_yscale
logical, intent(in), optional :: has_twiny
real(kind=wp), intent(in), optional :: twiny_x_min
real(kind=wp), intent(in), optional :: twiny_x_max
character(len=:), intent(in), optional, allocatable :: twiny_xlabel
character(len=*), intent(in), optional :: twiny_xscale

public subroutine render_title_only(backend, title, x_min, x_max, y_min, y_max)

Render only the figure title without drawing axes

Arguments

Type IntentOptional Attributes Name
class(plot_context), intent(inout) :: backend
character(len=:), intent(in), allocatable :: title
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

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, state)

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
type(figure_state_t), intent(in), optional :: state

public subroutine render_streamplot_arrows(backend, arrows)

Render queued streamplot arrows after plot lines are drawn

Arguments

Type IntentOptional Attributes Name
class(plot_context), intent(inout) :: backend
type(arrow_data_t), intent(in) :: arrows(:)