fortplot_rendering Module

Figure rendering pipeline module

This module handles the rendering pipeline for all plot types, including coordinate transformations and drawing operations.



Subroutines

public subroutine render_line_plot(backend, plot_data, plot_idx, x_min_t, x_max_t, y_min_t, y_max_t, xscale, yscale, symlog_threshold)

Render a line plot with proper scaling and clipping

Arguments

Type IntentOptional Attributes Name
class(plot_context), intent(inout) :: backend
type(plot_data_t), intent(in) :: plot_data
integer, intent(in) :: plot_idx
real(kind=wp), intent(in) :: x_min_t
real(kind=wp), intent(in) :: x_max_t
real(kind=wp), intent(in) :: y_min_t
real(kind=wp), intent(in) :: y_max_t
character(len=*), intent(in) :: xscale
character(len=*), intent(in) :: yscale
real(kind=wp), intent(in) :: symlog_threshold

public subroutine render_markers(backend, plot_data, x_min_t, x_max_t, y_min_t, y_max_t, xscale, yscale, symlog_threshold)

Render markers for a plot

Arguments

Type IntentOptional Attributes Name
class(plot_context), intent(inout) :: backend
type(plot_data_t), intent(in) :: plot_data
real(kind=wp), intent(in) :: x_min_t
real(kind=wp), intent(in) :: x_max_t
real(kind=wp), intent(in) :: y_min_t
real(kind=wp), intent(in) :: y_max_t
character(len=*), intent(in) :: xscale
character(len=*), intent(in) :: yscale
real(kind=wp), intent(in) :: symlog_threshold

public subroutine render_contour_plot(backend, plot_data, x_min_t, x_max_t, y_min_t, y_max_t, xscale, yscale, symlog_threshold, width, height, margin_left, margin_right, margin_bottom, margin_top)

Render a contour plot

Arguments

Type IntentOptional Attributes Name
class(plot_context), intent(inout) :: backend
type(plot_data_t), intent(in) :: plot_data
real(kind=wp), intent(in) :: x_min_t
real(kind=wp), intent(in) :: x_max_t
real(kind=wp), intent(in) :: y_min_t
real(kind=wp), intent(in) :: y_max_t
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

public subroutine render_pcolormesh_plot(backend, plot_data, x_min_t, x_max_t, y_min_t, y_max_t, xscale, yscale, symlog_threshold, width, height, margin_right)

Render a pcolormesh plot

Arguments

Type IntentOptional Attributes Name
class(plot_context), intent(inout) :: backend
type(plot_data_t), intent(in) :: plot_data
real(kind=wp), intent(in) :: x_min_t
real(kind=wp), intent(in) :: x_max_t
real(kind=wp), intent(in) :: y_min_t
real(kind=wp), intent(in) :: y_max_t
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_right

public subroutine draw_line_with_style(backend, x, y, linestyle, color)

Draw a line with the specified style

Arguments

Type IntentOptional Attributes Name
class(plot_context), intent(inout) :: backend
real(kind=wp), intent(in) :: x(:)
real(kind=wp), intent(in) :: y(:)
character(len=*), intent(in), optional :: linestyle
real(kind=wp), intent(in), optional :: color(3)

public subroutine render_solid_line(backend, x, y)

Render a solid line

Arguments

Type IntentOptional Attributes Name
class(plot_context), intent(inout) :: backend
real(kind=wp), intent(in) :: x(:)
real(kind=wp), intent(in) :: y(:)

public subroutine render_patterned_line(backend, x, y, pattern)

Render a line with dash patterns

Arguments

Type IntentOptional Attributes Name
class(plot_context), intent(inout) :: backend
real(kind=wp), intent(in) :: x(:)
real(kind=wp), intent(in) :: y(:)
character(len=*), intent(in) :: pattern

public subroutine transform_quad_to_screen(x_quad, y_quad, x_screen, y_screen, xscale, yscale, symlog_threshold)

Transform quad coordinates to screen space

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: x_quad(4)
real(kind=wp), intent(in) :: y_quad(4)
real(kind=wp), intent(out) :: x_screen(4)
real(kind=wp), intent(out) :: y_screen(4)
character(len=*), intent(in) :: xscale
character(len=*), intent(in) :: yscale
real(kind=wp), intent(in) :: symlog_threshold

public subroutine draw_filled_quad(backend, x_screen, y_screen)

Draw a filled quadrilateral

Arguments

Type IntentOptional Attributes Name
class(plot_context), intent(inout) :: backend
real(kind=wp), intent(in) :: x_screen(4)
real(kind=wp), intent(in) :: y_screen(4)

public subroutine draw_quad_edges(backend, x_screen, y_screen, line_width)

Draw quadrilateral edges

Arguments

Type IntentOptional Attributes Name
class(plot_context), intent(inout) :: backend
real(kind=wp), intent(in) :: x_screen(4)
real(kind=wp), intent(in) :: y_screen(4)
real(kind=wp), intent(in) :: line_width

public subroutine draw_single_point_marker(backend, x, y)

Draw a visible marker for a single point This ensures single points are visible even without explicit markers

Arguments

Type IntentOptional Attributes Name
class(plot_context), intent(inout) :: backend
real(kind=wp), intent(in) :: x
real(kind=wp), intent(in) :: y