fortplot_figure_data_ranges Module



Subroutines

public subroutine determine_sticky_edges(plots, plot_count, axis_filter, sticky_x_min, sticky_x_max, sticky_y_min, sticky_y_max)

Flag axis sides where the generic 5% data-range margin must not be applied, matching matplotlib's sticky edges. Bars carry their own margin (with a sticky baseline) in process_bar_plot_ranges; a pcolormesh and contour grids fill their data extent exactly. In each case the data range is authoritative and adding margin would float the artist off the axis (bars) or leave a gap around it (mesh/contour).

Arguments

Type IntentOptional Attributes Name
type(plot_data_t), intent(in) :: plots(:)
integer, intent(in) :: plot_count
integer, intent(in), optional :: axis_filter
logical, intent(out) :: sticky_x_min
logical, intent(out) :: sticky_x_max
logical, intent(out) :: sticky_y_min
logical, intent(out) :: sticky_y_max

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, symlog_base, symlog_linscale, axis_filter)

Calculate overall data ranges for the figure with robust edge case handling

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
real(kind=wp), intent(in), optional :: symlog_base
real(kind=wp), intent(in), optional :: symlog_linscale
integer, intent(in), optional :: axis_filter