fortplot_annotation_coordinates Module

Coordinate transformation functions for text annotations

Provides: - Multiple coordinate system transformations - Data, figure, and axis coordinate support - Logarithmic scale transformation support - Visibility checking in coordinate space



Interfaces

  • private subroutine transform_annotation_coordinates_4arg(annotation, area_or_size, pixel_x, pixel_y)

    4-argument coordinate transformation (figure or axis coordinates)

    Arguments

    Type IntentOptional Attributes Name
    type(text_annotation_t), intent(in) :: annotation
    real(kind=wp), intent(in) :: area_or_size(:)
    real(kind=wp), intent(out) :: pixel_x
    real(kind=wp), intent(out) :: pixel_y
  • private subroutine transform_annotation_coordinates_5arg(annotation, plot_area, data_bounds, pixel_x, pixel_y)

    5-argument coordinate transformation (data coordinates)

    Arguments

    Type IntentOptional Attributes Name
    type(text_annotation_t), intent(in) :: annotation
    real(kind=wp), intent(in) :: plot_area(:)
    real(kind=wp), intent(in) :: data_bounds(:)
    real(kind=wp), intent(out) :: pixel_x
    real(kind=wp), intent(out) :: pixel_y

Functions

public function is_annotation_visible(annotation, plot_area) result(visible)

Check if annotation is visible within plot area

Arguments

Type IntentOptional Attributes Name
type(text_annotation_t), intent(in) :: annotation
real(kind=wp), intent(in) :: plot_area(4)

Return Value logical


Subroutines

public subroutine transform_annotation_coordinates_log(annotation, plot_area, data_bounds, log_scale_x, log_scale_y, pixel_x, pixel_y)

Transform annotation coordinates with logarithmic scaling support

Arguments

Type IntentOptional Attributes Name
type(text_annotation_t), intent(in) :: annotation
real(kind=wp), intent(in) :: plot_area(4)
real(kind=wp), intent(in) :: data_bounds(4)
logical, intent(in) :: log_scale_x
logical, intent(in) :: log_scale_y
real(kind=wp), intent(out) :: pixel_x
real(kind=wp), intent(out) :: pixel_y