ASCII terminal plotting backend - Utility Functions
This module contains utility functions used by the ASCII plotting backend,
including character manipulation, text rendering, and output formatting.
Author: fortplot contributors
Variables
Type |
Visibility | Attributes |
|
Name |
| Initial | |
character(len=*),
|
public, |
parameter
|
:: |
ASCII_CHARS |
= |
' .:-=+*#%@' |
|
Derived Types
Components
Type |
Visibility | Attributes |
|
Name |
| Initial | |
character(len=:),
|
public, |
allocatable
|
:: |
text |
|
|
|
integer,
|
public |
|
:: |
x |
|
|
|
integer,
|
public |
|
:: |
y |
|
|
|
real(kind=wp),
|
public |
|
:: |
color_r |
|
|
|
real(kind=wp),
|
public |
|
:: |
color_g |
|
|
|
real(kind=wp),
|
public |
|
:: |
color_b |
|
|
|
Functions
Arguments
Type |
Intent | Optional | Attributes |
|
Name |
|
character(len=1),
|
intent(in) |
|
|
:: |
char |
|
Return Value
integer
Arguments
Type |
Intent | Optional | Attributes |
|
Name |
|
character(len=1),
|
intent(in) |
|
|
:: |
char1 |
|
character(len=1),
|
intent(in) |
|
|
:: |
char2 |
|
Return Value
character(len=1)
Subroutines
Render stored text elements onto the ASCII canvas
Arguments
Type |
Intent | Optional | Attributes |
|
Name |
|
character(len=1),
|
intent(inout) |
|
|
:: |
canvas(:,:) |
|
type(text_element_t),
|
intent(in) |
|
|
:: |
text_elements(:) |
|
integer,
|
intent(in) |
|
|
:: |
num_text_elements |
|
integer,
|
intent(in) |
|
|
:: |
plot_width |
|
integer,
|
intent(in) |
|
|
:: |
plot_height |
|
Print centered title to terminal
Arguments
Type |
Intent | Optional | Attributes |
|
Name |
|
character(len=*),
|
intent(in) |
|
|
:: |
title |
|
integer,
|
intent(in) |
|
|
:: |
width |
|
Write centered title to file
Arguments
Type |
Intent | Optional | Attributes |
|
Name |
|
integer,
|
intent(in) |
|
|
:: |
unit |
|
character(len=*),
|
intent(in) |
|
|
:: |
title |
|
integer,
|
intent(in) |
|
|
:: |
width |
|