fortplot_raster_axes Module

Raster axes coordination module (refactored for size compliance) Orchestrates tick and label rendering through specialized modules



Functions

public function map_value_to_plot_x(value, data_min, data_max, plot_area, scale, symlog_threshold) result(px)

Map a data value to pixel X coordinate using axis scale

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: value
real(kind=wp), intent(in) :: data_min
real(kind=wp), intent(in) :: data_max
type(plot_area_t), intent(in) :: plot_area
character(len=*), intent(in) :: scale
real(kind=wp), intent(in) :: symlog_threshold

Return Value real(kind=wp)

public function map_value_to_plot_y(value, data_min, data_max, plot_area, scale, symlog_threshold) result(py)

Map a data value to pixel Y coordinate using axis scale Raster coordinates have Y increasing downward; account for that here.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: value
real(kind=wp), intent(in) :: data_min
real(kind=wp), intent(in) :: data_max
type(plot_area_t), intent(in) :: plot_area
character(len=*), intent(in) :: scale
real(kind=wp), intent(in) :: symlog_threshold

Return Value real(kind=wp)

public function compute_ylabel_x_pos(y_tick_label_edge, rotated_width, plot_area) result(x_pos)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: y_tick_label_edge
integer, intent(in) :: rotated_width
type(plot_area_t), intent(in) :: plot_area

Return Value integer

public function compute_ylabel_x_pos_old(plot_area, rotated_width, y_tick_max_width) result(x_pos)

Arguments

Type IntentOptional Attributes Name
type(plot_area_t), intent(in) :: plot_area
integer, intent(in) :: rotated_width
integer, intent(in) :: y_tick_max_width

Return Value integer

public function y_tick_label_right_edge_at_axis(plot_area, max_width_measured) result(edge)

Arguments

Type IntentOptional Attributes Name
type(plot_area_t), intent(in) :: plot_area
integer, intent(in) :: max_width_measured

Return Value integer

public function y_tick_label_right_edge_at_axis_old(plot_area) result(edge)

Arguments

Type IntentOptional Attributes Name
type(plot_area_t), intent(in) :: plot_area

Return Value integer


Subroutines

public subroutine raster_draw_axes_and_labels(raster, width, height, plot_area, xscale, yscale, symlog_threshold, x_min, x_max, y_min, y_max, title, xlabel, ylabel)

Draw axes and labels for raster backends

Arguments

Type IntentOptional Attributes Name
type(raster_image_t), intent(inout) :: raster
integer, intent(in) :: width
integer, intent(in) :: height
type(plot_area_t), intent(in) :: plot_area
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), optional, allocatable :: title
character(len=:), intent(in), optional, allocatable :: xlabel
character(len=:), intent(in), optional, allocatable :: ylabel

public subroutine raster_draw_axes_lines_and_ticks(raster, width, height, plot_area, xscale, yscale, symlog_threshold, x_min, x_max, y_min, y_max)

Draw axes lines and tick marks WITHOUT labels (for proper drawing order)

Arguments

Type IntentOptional Attributes Name
type(raster_image_t), intent(inout) :: raster
integer, intent(in) :: width
integer, intent(in) :: height
type(plot_area_t), intent(in) :: plot_area
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

public subroutine raster_draw_axis_labels_only(raster, width, height, plot_area, xscale, yscale, symlog_threshold, x_min, x_max, y_min, y_max, title, xlabel, ylabel)

Draw ONLY axis labels and tick labels (for proper drawing order)

Arguments

Type IntentOptional Attributes Name
type(raster_image_t), intent(inout) :: raster
integer, intent(in) :: width
integer, intent(in) :: height
type(plot_area_t), intent(in) :: plot_area
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), optional, allocatable :: title
character(len=:), intent(in), optional, allocatable :: xlabel
character(len=:), intent(in), optional, allocatable :: ylabel

public subroutine raster_draw_secondary_y_axis(raster, width, height, plot_area, yscale, symlog_threshold, y_min, y_max, ylabel)

Arguments

Type IntentOptional Attributes Name
type(raster_image_t), intent(inout) :: raster
integer, intent(in) :: width
integer, intent(in) :: height
type(plot_area_t), intent(in) :: plot_area
character(len=*), intent(in) :: yscale
real(kind=wp), intent(in) :: symlog_threshold
real(kind=wp), intent(in) :: y_min
real(kind=wp), intent(in) :: y_max
character(len=:), intent(in), optional, allocatable :: ylabel

public subroutine raster_draw_secondary_x_axis_top(raster, width, height, plot_area, xscale, symlog_threshold, x_min, x_max, xlabel)

Arguments

Type IntentOptional Attributes Name
type(raster_image_t), intent(inout) :: raster
integer, intent(in) :: width
integer, intent(in) :: height
type(plot_area_t), intent(in) :: plot_area
character(len=*), intent(in) :: xscale
real(kind=wp), intent(in) :: symlog_threshold
real(kind=wp), intent(in) :: x_min
real(kind=wp), intent(in) :: x_max
character(len=:), intent(in), optional, allocatable :: xlabel

public subroutine compute_non_overlapping_mask_simple(centers, widths, min_gap, keep)

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: centers(:)
integer, intent(in) :: widths(:)
real(kind=wp), intent(in) :: min_gap
logical, intent(out) :: keep(size(centers))