determine_decimals_from_ticks Function

public function determine_decimals_from_ticks(tick_positions, n) result(decimal_places)

Determine decimal places from an array of tick positions. Uses the smallest non-zero spacing as representative step. Axes whose ticks are too large or too small for plain decimals (matplotlib's ScalarFormatter limits) get scientific labels, encoded as decimal_places = -(1 + mantissa decimals) for format_tick_value_consistent.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), contiguous :: tick_positions(:)
integer, intent(in) :: n

Return Value integer