plot_context Derived Type

type, public, abstract :: plot_context


Components

Type Visibility Attributes Name Initial
integer, public :: width
integer, public :: height
real(kind=wp), public :: x_min
real(kind=wp), public :: x_max
real(kind=wp), public :: y_min
real(kind=wp), public :: y_max
logical, public :: has_rendered_arrows = .false.
logical, public :: uses_vector_arrows = .false.
logical, public :: has_triangular_arrows = .false.

Type-Bound Procedures

procedure(line_interface), public, deferred :: line

  • subroutine line_interface(this, x1, y1, x2, y2) Prototype

    Arguments

    Type IntentOptional Attributes Name
    class(plot_context), intent(inout) :: this
    real(kind=wp), intent(in) :: x1
    real(kind=wp), intent(in) :: y1
    real(kind=wp), intent(in) :: x2
    real(kind=wp), intent(in) :: y2

procedure(color_interface), public, deferred :: color

  • subroutine color_interface(this, r, g, b) Prototype

    Arguments

    Type IntentOptional Attributes Name
    class(plot_context), intent(inout) :: this
    real(kind=wp), intent(in) :: r
    real(kind=wp), intent(in) :: g
    real(kind=wp), intent(in) :: b

procedure(text_interface), public, deferred :: text

  • subroutine text_interface(this, x, y, text) Prototype

    Arguments

    Type IntentOptional Attributes Name
    class(plot_context), intent(inout) :: this
    real(kind=wp), intent(in) :: x
    real(kind=wp), intent(in) :: y
    character(len=*), intent(in) :: text

procedure(save_interface), public, deferred :: save

  • subroutine save_interface(this, filename) Prototype

    Arguments

    Type IntentOptional Attributes Name
    class(plot_context), intent(inout) :: this
    character(len=*), intent(in) :: filename

procedure(line_width_interface), public, deferred :: set_line_width

  • subroutine line_width_interface(this, width) Prototype

    Arguments

    Type IntentOptional Attributes Name
    class(plot_context), intent(inout) :: this
    real(kind=wp), intent(in) :: width

procedure(line_style_interface), public, deferred :: set_line_style

  • subroutine line_style_interface(this, style) Prototype

    Arguments

    Type IntentOptional Attributes Name
    class(plot_context), intent(inout) :: this
    character(len=*), intent(in) :: style

procedure(marker_interface), public, deferred :: draw_marker

  • subroutine marker_interface(this, x, y, style) Prototype

    Arguments

    Type IntentOptional Attributes Name
    class(plot_context), intent(inout) :: this
    real(kind=wp), intent(in) :: x
    real(kind=wp), intent(in) :: y
    character(len=*), intent(in) :: style

procedure(marker_colors_interface), public, deferred :: set_marker_colors

  • subroutine marker_colors_interface(this, edge_r, edge_g, edge_b, face_r, face_g, face_b) Prototype

    Arguments

    Type IntentOptional Attributes Name
    class(plot_context), intent(inout) :: this
    real(kind=wp), intent(in) :: edge_r
    real(kind=wp), intent(in) :: edge_g
    real(kind=wp), intent(in) :: edge_b
    real(kind=wp), intent(in) :: face_r
    real(kind=wp), intent(in) :: face_g
    real(kind=wp), intent(in) :: face_b

procedure(marker_colors_alpha_interface), public, deferred :: set_marker_colors_with_alpha

  • subroutine marker_colors_alpha_interface(this, edge_r, edge_g, edge_b, edge_alpha, face_r, face_g, face_b, face_alpha) Prototype

    Arguments

    Type IntentOptional Attributes Name
    class(plot_context), intent(inout) :: this
    real(kind=wp), intent(in) :: edge_r
    real(kind=wp), intent(in) :: edge_g
    real(kind=wp), intent(in) :: edge_b
    real(kind=wp), intent(in) :: edge_alpha
    real(kind=wp), intent(in) :: face_r
    real(kind=wp), intent(in) :: face_g
    real(kind=wp), intent(in) :: face_b
    real(kind=wp), intent(in) :: face_alpha

procedure(arrow_interface), public, deferred :: draw_arrow

  • subroutine arrow_interface(this, x, y, dx, dy, size, style) Prototype

    Arguments

    Type IntentOptional Attributes Name
    class(plot_context), intent(inout) :: this
    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

procedure(ascii_output_interface), public, deferred :: get_ascii_output

Additional polymorphic methods to eliminate SELECT TYPE violations

  • function ascii_output_interface(this) result(output) Prototype

    Arguments

    Type IntentOptional Attributes Name
    class(plot_context), intent(in) :: this

    Return Value character(len=:), allocatable

procedure(get_width_scale_interface), public, deferred :: get_width_scale

  • function get_width_scale_interface(this) result(scale) Prototype

    Arguments

    Type IntentOptional Attributes Name
    class(plot_context), intent(in) :: this

    Return Value real(kind=wp)

procedure(get_height_scale_interface), public, deferred :: get_height_scale

  • function get_height_scale_interface(this) result(scale) Prototype

    Arguments

    Type IntentOptional Attributes Name
    class(plot_context), intent(in) :: this

    Return Value real(kind=wp)

procedure(fill_quad_interface), public, deferred :: fill_quad

  • subroutine fill_quad_interface(this, x_quad, y_quad) Prototype

    Arguments

    Type IntentOptional Attributes Name
    class(plot_context), intent(inout) :: this
    real(kind=wp), intent(in) :: x_quad(4)
    real(kind=wp), intent(in) :: y_quad(4)

procedure(fill_heatmap_interface), public, deferred :: fill_heatmap

  • subroutine fill_heatmap_interface(this, x_grid, y_grid, z_grid, z_min, z_max) Prototype

    Arguments

    Type IntentOptional Attributes Name
    class(plot_context), intent(inout) :: this
    real(kind=wp), intent(in) :: x_grid(:)
    real(kind=wp), intent(in) :: y_grid(:)
    real(kind=wp), intent(in) :: z_grid(:,:)
    real(kind=wp), intent(in) :: z_min
    real(kind=wp), intent(in) :: z_max

procedure(extract_rgb_data_interface), public, deferred :: extract_rgb_data

  • subroutine extract_rgb_data_interface(this, width, height, rgb_data) Prototype

    Arguments

    Type IntentOptional Attributes Name
    class(plot_context), intent(in) :: this
    integer, intent(in) :: width
    integer, intent(in) :: height
    real(kind=wp), intent(out) :: rgb_data(width,height,3)

procedure(get_png_data_interface), public, deferred :: get_png_data_backend

  • subroutine get_png_data_interface(this, width, height, png_data, status) Prototype

    Arguments

    Type IntentOptional Attributes Name
    class(plot_context), intent(in) :: this
    integer, intent(in) :: width
    integer, intent(in) :: height
    integer(kind=1), intent(out), allocatable :: png_data(:)
    integer, intent(out) :: status

procedure(prepare_3d_data_interface), public, deferred :: prepare_3d_data

  • subroutine prepare_3d_data_interface(this, plots) Prototype

    Arguments

    Type IntentOptional Attributes Name
    class(plot_context), intent(inout) :: this
    type(plot_data_t), intent(in) :: plots(:)

procedure(render_ylabel_interface), public, deferred :: render_ylabel

  • subroutine render_ylabel_interface(this, ylabel) Prototype

    Arguments

    Type IntentOptional Attributes Name
    class(plot_context), intent(inout) :: this
    character(len=*), intent(in) :: ylabel

procedure(draw_axes_and_labels_interface), public, deferred :: draw_axes_and_labels_backend

  • subroutine draw_axes_and_labels_interface(this, xscale, yscale, symlog_threshold, x_min, x_max, y_min, y_max, title, xlabel, ylabel, z_min, z_max, has_3d_plots) Prototype

    Arguments

    Type IntentOptional Attributes Name
    class(plot_context), intent(inout) :: this
    character(len=*), intent(in) :: xscale
    character(len=*), intent(in) :: yscale
    real(kind=wp), intent(in) :: symlog_threshold
    real(kind=wp), intent(in) :: x_min
    real(kind=wp), intent(in) :: x_max
    real(kind=wp), intent(in) :: y_min
    real(kind=wp), intent(in) :: y_max
    character(len=:), intent(in), optional, allocatable :: title
    character(len=:), intent(in), optional, allocatable :: xlabel
    character(len=:), intent(in), optional, allocatable :: ylabel
    real(kind=wp), intent(in), optional :: z_min
    real(kind=wp), intent(in), optional :: z_max
    logical, intent(in) :: has_3d_plots

procedure(save_coordinates_interface), public, deferred :: save_coordinates

  • subroutine save_coordinates_interface(this, x_min, x_max, y_min, y_max) Prototype

    Arguments

    Type IntentOptional Attributes Name
    class(plot_context), intent(in) :: this
    real(kind=wp), intent(out) :: x_min
    real(kind=wp), intent(out) :: x_max
    real(kind=wp), intent(out) :: y_min
    real(kind=wp), intent(out) :: y_max

procedure(set_coordinates_interface), public, deferred :: set_coordinates

  • subroutine set_coordinates_interface(this, x_min, x_max, y_min, y_max) Prototype

    Arguments

    Type IntentOptional Attributes Name
    class(plot_context), intent(inout) :: this
    real(kind=wp), intent(in) :: x_min
    real(kind=wp), intent(in) :: x_max
    real(kind=wp), intent(in) :: y_min
    real(kind=wp), intent(in) :: y_max

procedure(render_axes_interface), public, deferred :: render_axes

  • subroutine render_axes_interface(this, title_text, xlabel_text, ylabel_text) Prototype

    Arguments

    Type IntentOptional Attributes Name
    class(plot_context), intent(inout) :: this
    character(len=*), intent(in), optional :: title_text
    character(len=*), intent(in), optional :: xlabel_text
    character(len=*), intent(in), optional :: ylabel_text