fortplot_axes_date Module

Date axis handling module

This module handles date-specific tick computation, format selection, and conversion between date values and Unix seconds.



Functions

public pure function is_date_scale(scale_type) result(is_date)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: scale_type

Return Value logical

public function format_date_tick_label(value, scale_type, date_format, data_min, data_max) result(label)

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: value
character(len=*), intent(in) :: scale_type
character(len=*), intent(in), optional :: date_format
real(kind=wp), intent(in), optional :: data_min
real(kind=wp), intent(in), optional :: data_max

Return Value character(len=50)

public function default_date_format(scale_type, data_min, data_max) result(fmt)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: scale_type
real(kind=wp), intent(in), optional :: data_min
real(kind=wp), intent(in), optional :: data_max

Return Value character(len=32)

public function date_value_to_unix_seconds(value, scale_type) result(seconds)

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: value
character(len=*), intent(in) :: scale_type

Return Value integer(kind=int64)

public function date_value_from_unix_seconds(seconds, scale_type) result(value)

Arguments

Type IntentOptional Attributes Name
integer(kind=int64), intent(in) :: seconds
character(len=*), intent(in) :: scale_type

Return Value real(kind=wp)

public function pick_fixed_step_seconds(range_s) result(step_s)

Arguments

Type IntentOptional Attributes Name
integer(kind=int64), intent(in) :: range_s

Return Value integer(kind=int64)


Subroutines

public subroutine compute_date_ticks(scale_type, data_min, data_max, tick_positions, num_ticks)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: scale_type
real(kind=wp), intent(in) :: data_min
real(kind=wp), intent(in) :: data_max
real(kind=wp), intent(out) :: tick_positions(20)
integer, intent(out) :: num_ticks