fortplot_figure_properties_new Module

Figure property management module for fortplot_figure_core

This module handles property access, data ranges, and backend interface for figure objects. Extracted from fortplot_figure_core.f90 for better organization following Single Responsibility Principle.

Responsibilities: - Property getters/setters (width, height, rendered, plot counts) - Data range management (x_min, x_max, y_min, y_max) - Backend interface methods (color, line, association) - Figure state property access



Functions

public function figure_get_width(state) result(width)

Get figure width property

Arguments

Type IntentOptional Attributes Name
type(figure_state_t), intent(in) :: state

Return Value integer

public function figure_get_height(state) result(height)

Get figure height property

Arguments

Type IntentOptional Attributes Name
type(figure_state_t), intent(in) :: state

Return Value integer

public function figure_get_rendered(state) result(rendered)

Get figure rendered property

Arguments

Type IntentOptional Attributes Name
type(figure_state_t), intent(in) :: state

Return Value logical

public function figure_get_plot_count(state) result(plot_count)

Get figure plot count property

Arguments

Type IntentOptional Attributes Name
type(figure_state_t), intent(in) :: state

Return Value integer

public function figure_get_plots(plots) result(plots_ptr)

Get figure plots property

Arguments

Type IntentOptional Attributes Name
type(plot_data_t), intent(in), target :: plots(:)

Return Value type(plot_data_t), pointer, (:)

public function figure_backend_associated(state) result(is_associated)

Get backend association property

Arguments

Type IntentOptional Attributes Name
type(figure_state_t), intent(in) :: state

Return Value logical

public function figure_get_x_min(state) result(x_min)

Get x minimum property

Arguments

Type IntentOptional Attributes Name
type(figure_state_t), intent(in) :: state

Return Value real(kind=wp)

public function figure_get_x_max(state) result(x_max)

Get x maximum property

Arguments

Type IntentOptional Attributes Name
type(figure_state_t), intent(in) :: state

Return Value real(kind=wp)

public function figure_get_y_min(state) result(y_min)

Get y minimum property

Arguments

Type IntentOptional Attributes Name
type(figure_state_t), intent(in) :: state

Return Value real(kind=wp)

public function figure_get_y_max(state) result(y_max)

Get y maximum property

Arguments

Type IntentOptional Attributes Name
type(figure_state_t), intent(in) :: state

Return Value real(kind=wp)


Subroutines

public subroutine figure_set_rendered(state, rendered)

Set figure rendered property

Arguments

Type IntentOptional Attributes Name
type(figure_state_t), intent(inout) :: state
logical, intent(in) :: rendered

public subroutine figure_backend_color(state, r, g, b)

Set backend color property

Arguments

Type IntentOptional Attributes Name
type(figure_state_t), intent(inout) :: state
real(kind=wp), intent(in) :: r
real(kind=wp), intent(in) :: g
real(kind=wp), intent(in) :: b

public subroutine figure_backend_line(state, x1, y1, x2, y2)

Draw line using backend property

Arguments

Type IntentOptional Attributes Name
type(figure_state_t), intent(inout) :: state
real(kind=wp), intent(in) :: x1
real(kind=wp), intent(in) :: y1
real(kind=wp), intent(in) :: x2
real(kind=wp), intent(in) :: y2

public subroutine figure_backend_arrow(state, x, y, dx, dy, size, style)

Draw arrow using backend property

Arguments

Type IntentOptional Attributes Name
type(figure_state_t), intent(inout) :: state
real(kind=wp), intent(in) :: x
real(kind=wp), intent(in) :: y
real(kind=wp), intent(in) :: dx
real(kind=wp), intent(in) :: dy
real(kind=wp), intent(in) :: size
character(len=*), intent(in) :: style

public subroutine figure_update_data_ranges_pcolormesh(plots, plot_count, xlim_set, ylim_set, x_min, x_max, y_min, y_max)

Update data ranges after adding pcolormesh plot - delegate to ranges module

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

public subroutine figure_update_data_ranges_boxplot(data, position, x_min, x_max, y_min, y_max, xlim_set, ylim_set)

Update data ranges after adding boxplot - delegate to ranges module

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: data(:)
real(kind=wp), intent(in), optional :: position
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
logical, intent(in) :: xlim_set
logical, intent(in) :: ylim_set

public subroutine figure_update_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)

Update data ranges based on current plot

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(inout) :: x_min_transformed
real(kind=wp), intent(inout) :: x_max_transformed
real(kind=wp), intent(inout) :: y_min_transformed
real(kind=wp), intent(inout) :: y_max_transformed
character(len=*), intent(in) :: xscale
character(len=*), intent(in) :: yscale
real(kind=wp), intent(in) :: symlog_threshold