fortplot_ascii_rendering Module

ASCII terminal plotting backend - Core Rendering Logic

This module contains the core rendering functionality for ASCII plotting, including canvas output, file writing, and terminal display.

Author: fortplot contributors



Functions

public function ascii_get_output(canvas, width, height) result(output)

Get the complete ASCII canvas as a string

Arguments

Type IntentOptional Attributes Name
character(len=1), intent(in) :: canvas(:,:)
integer, intent(in) :: width
integer, intent(in) :: height

Return Value character(len=:), allocatable


Subroutines

public subroutine ascii_finalize(canvas, text_elements, num_text_elements, plot_width, plot_height, title_text, xlabel_text, ylabel_text, legend_lines, num_legend_lines, filename)

Arguments

Type IntentOptional Attributes Name
character(len=1), intent(inout) :: canvas(:,:)
type(text_element_t), intent(inout) :: text_elements(:)
integer, intent(in) :: num_text_elements
integer, intent(in) :: plot_width
integer, intent(in) :: plot_height
character(len=:), intent(in), allocatable :: title_text
character(len=:), intent(in), allocatable :: xlabel_text
character(len=:), intent(in), allocatable :: ylabel_text
character(len=*), intent(in) :: legend_lines(:)
integer, intent(in) :: num_legend_lines
character(len=*), intent(in) :: filename

public subroutine output_to_terminal(canvas, text_elements, num_text_elements, plot_width, plot_height, title_text, xlabel_text, ylabel_text, legend_lines, num_legend_lines)

Arguments

Type IntentOptional 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
character(len=:), intent(in), allocatable :: title_text
character(len=:), intent(in), allocatable :: xlabel_text
character(len=:), intent(in), allocatable :: ylabel_text
character(len=*), intent(in) :: legend_lines(:)
integer, intent(in) :: num_legend_lines

public subroutine output_to_file(canvas, text_elements, num_text_elements, plot_width, plot_height, title_text, xlabel_text, ylabel_text, legend_lines, num_legend_lines, unit)

Arguments

Type IntentOptional 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
character(len=:), intent(in), allocatable :: title_text
character(len=:), intent(in), allocatable :: xlabel_text
character(len=:), intent(in), allocatable :: ylabel_text
character(len=*), intent(in) :: legend_lines(:)
integer, intent(in) :: num_legend_lines
integer, intent(in) :: unit