expand_data_range Subroutine

public subroutine expand_data_range(data_min, data_max, expanded_min, expanded_max, sticky_min, sticky_max)

Expand a data range by DATA_RANGE_MARGIN (5%) of the span on each side, matching matplotlib's default axes margin (rcParams axes.{x,y}margin = 0.05). Also keeps markers at exact boundaries clear of the plot frame stroke.

A side flagged sticky is left unexpanded, matching matplotlib's sticky edges: bar baselines pin to 0 with no margin beyond them.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: data_min
real(kind=wp), intent(in) :: data_max
real(kind=wp), intent(out) :: expanded_min
real(kind=wp), intent(out) :: expanded_max
logical, intent(in), optional :: sticky_min
logical, intent(in), optional :: sticky_max