fortplot_figure_contour_colorbar Module

Discrete line-contour colorbars with Matplotlib's uniform level spacing.



Functions

public function format_contour_colorbar_tick(value, ticks) result(label)

Value-aware precision also retains fractional offsets and tiny values.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: value
real(kind=wp), intent(in) :: ticks(:)

Return Value character(len=50)


Subroutines

public subroutine render_contour_colorbar_lines(backend, vertical, levels, colormap, line_width)

Arguments

Type IntentOptional Attributes Name
class(plot_context), intent(inout) :: backend
logical, intent(in) :: vertical
real(kind=wp), intent(in) :: levels(:)
character(len=*), intent(in) :: colormap
real(kind=wp), intent(in) :: line_width

public subroutine contour_colorbar_tick_positions(levels, ticks, positions)

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: levels(:)
real(kind=wp), intent(in) :: ticks(:)
real(kind=wp), intent(out), allocatable :: positions(:)

public subroutine contour_colorbar_default_ticks(levels, ticks)

Match Matplotlib's FixedLocator(levels, nbins=10), including its phase.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: levels(:)
real(kind=wp), intent(out), allocatable :: ticks(:)

public subroutine get_contour_colorbar_levels(plot, levels)

Use a private sorted/unique view; preserve accepted native plot inputs.

Arguments

Type IntentOptional Attributes Name
type(plot_data_t), intent(in) :: plot
real(kind=wp), intent(out), allocatable :: levels(:)