ASCII terminal plotting backend - Drawing Elements
This module contains specialized drawing functions for ASCII plotting including markers, arrows, heatmaps, legends, and axes.
Author: fortplot contributors
Type | Intent | Optional | 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 |
Fill ASCII canvas with heatmap representation of 2D data
Type | Intent | Optional | 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 |
Draw arrow using Unicode directional characters for ASCII backend
Type | Intent | Optional | 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 |
Render legend using ASCII-specific compact layout
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(legend_t), | intent(in) | :: | legend | |||
class(plot_context), | intent(inout) | :: | canvas_context | |||
real(kind=wp), | intent(in) | :: | legend_x | |||
real(kind=wp), | intent(in) | :: | legend_y |
Calculate ASCII-specific legend dimensions
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(legend_t), | intent(in) | :: | legend | |||
integer, | intent(in) | :: | width | |||
real(kind=wp), | intent(out) | :: | legend_width | |||
real(kind=wp), | intent(out) | :: | legend_height |
ASCII doesn't use line widths - no-op
Calculate ASCII-specific legend position using character coordinates
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(legend_t), | intent(in) | :: | legend | |||
integer, | intent(in) | :: | width | |||
integer, | intent(in) | :: | height | |||
real(kind=wp), | intent(out) | :: | x | |||
real(kind=wp), | intent(out) | :: | y |
Extract RGB data from ASCII backend (not supported - dummy data)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | width | |||
integer, | intent(in) | :: | height | |||
real(kind=real64), | intent(out) | :: | rgb_data(width,height,3) |
Get PNG data from ASCII backend (not supported)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | width | |||
integer, | intent(in) | :: | height | |||
integer(kind=1), | intent(out), | allocatable | :: | png_data(:) | ||
integer, | intent(out) | :: | status |
Prepare 3D data for ASCII backend (no-op - ASCII doesn't use 3D data)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(plot_data_t), | intent(in) | :: | plots(:) |
Render Y-axis label for ASCII backend (no-op - handled elsewhere)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | ylabel |
Draw axes and labels for ASCII backend
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=1), | intent(inout) | :: | canvas(:,:) | |||
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 | |||
real(kind=wp), | intent(in) | :: | current_r | |||
real(kind=wp), | intent(in) | :: | current_g | |||
real(kind=wp), | intent(in) | :: | current_b | |||
integer, | intent(in) | :: | plot_width | |||
integer, | intent(in) | :: | plot_height | |||
character(len=:), | intent(inout), | allocatable | :: | title_text | ||
character(len=:), | intent(inout), | allocatable | :: | xlabel_text | ||
character(len=:), | intent(inout), | allocatable | :: | ylabel_text | ||
type(text_element_t), | intent(inout) | :: | text_elements(:) | |||
integer, | intent(inout) | :: | num_text_elements |
Render axes for ASCII context (stub implementation)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in), | optional | :: | title_text | ||
character(len=*), | intent(in), | optional | :: | xlabel_text | ||
character(len=*), | intent(in), | optional | :: | ylabel_text |