fortplot_figure_plot_renderers Module

Individual plot type rendering procedures

Single Responsibility: Render specific plot types (reflines, quivers, streamplots, polar data/axes). Called from fortplot_figure_plot_dispatch which handles orchestration.



Subroutines

public subroutine render_refline_plot(backend, plot, x_min, x_max, y_min, y_max, xscale, yscale, symlog_threshold)

Render a reference line (horizontal or vertical) Reference lines store normalized coordinates for axis-spanning lines or actual data coordinates for hlines/vlines

Arguments

Type IntentOptional Attributes Name
class(plot_context), intent(inout) :: backend
type(plot_data_t), intent(in) :: plot
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) :: xscale
character(len=*), intent(in) :: yscale
real(kind=wp), intent(in) :: symlog_threshold

public subroutine render_quiver_plot(backend, plot, x_min, x_max, y_min, y_max, xscale, yscale, symlog_threshold)

Render quiver plot (discrete vector arrows) Draws arrows at each (x,y) position with direction (u,v) Respects angles, pivot, alpha, and per-arrow c(:) color mapping.

Arguments

Type IntentOptional Attributes Name
class(plot_context), intent(inout) :: backend
type(plot_data_t), intent(in) :: plot
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) :: xscale
character(len=*), intent(in) :: yscale
real(kind=wp), intent(in) :: symlog_threshold

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(:)

public subroutine render_polar_axes(backend, x_min, x_max, y_min, y_max, state)

Render polar axes: circular boundary, radial spokes, angular circles, tick labels

Arguments

Type IntentOptional Attributes Name
class(plot_context), intent(inout) :: backend
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
type(figure_state_t), intent(in) :: state

public subroutine render_polar_plot_internal(backend, plot, x_min, x_max, y_min, y_max, state)

Render polar plot data within the coordinate system The plot stores pre-converted Cartesian coordinates in x/y arrays but we use polar_theta/polar_r for proper polar rendering

Arguments

Type IntentOptional Attributes Name
class(plot_context), intent(inout) :: backend
type(plot_data_t), intent(in) :: plot
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
type(figure_state_t), intent(in), optional :: state