fortplot_ascii_drawing Module

ASCII terminal plotting backend - Basic Drawing Elements

This module contains core drawing functions for ASCII plotting including markers, arrows, heatmaps, and line drawing.

Author: fortplot contributors



Subroutines

public subroutine draw_ascii_marker(canvas, x, y, style, x_min, x_max, y_min, y_max, plot_width, plot_height)

Arguments

Type IntentOptional Attributes Name
character(len=1), intent(inout) :: canvas(:,:)
real(kind=wp), intent(in) :: x
real(kind=wp), intent(in) :: y
character(len=*), intent(in) :: style
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
integer, intent(in) :: plot_width
integer, intent(in) :: plot_height

public subroutine fill_ascii_heatmap(canvas, x_grid, y_grid, z_grid, z_min, z_max, x_min, x_max, y_min, y_max, plot_width, plot_height)

Fill ASCII canvas with heatmap representation of 2D data

Arguments

Type IntentOptional Attributes Name
character(len=1), intent(inout) :: canvas(:,:)
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
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
integer, intent(in) :: plot_width
integer, intent(in) :: plot_height

public subroutine draw_ascii_arrow(canvas, x, y, dx, dy, size, style, x_min, x_max, y_min, y_max, width, height, has_rendered_arrows, uses_vector_arrows, has_triangular_arrows)

Draw arrow using Unicode directional characters for ASCII backend

Arguments

Type IntentOptional Attributes Name
character(len=1), intent(inout) :: canvas(:,:)
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
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
integer, intent(in) :: width
integer, intent(in) :: height
logical, intent(out) :: has_rendered_arrows
logical, intent(out) :: uses_vector_arrows
logical, intent(out) :: has_triangular_arrows

public subroutine draw_line_on_canvas(canvas, x1, y1, x2, y2, x_min, x_max, y_min, y_max, plot_width, plot_height, line_char)

Arguments

Type IntentOptional Attributes Name
character(len=1), intent(inout) :: canvas(:,:)
real(kind=wp), intent(in) :: x1
real(kind=wp), intent(in) :: y1
real(kind=wp), intent(in) :: x2
real(kind=wp), intent(in) :: y2
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
integer, intent(in) :: plot_width
integer, intent(in) :: plot_height
character(len=1), intent(in) :: line_char