Procedures

ProcedureLocationProcedure TypeDescription
add_3d_line_plot_data fortplot_3d_plots Subroutine

Add 3D line plot data by projecting to 2D

add_3d_plot fortplot_3d_plots Subroutine

Add 3D line plot to figure (projected to 2D)

add_3d_plot fortplot_matplotlib_plot_wrappers Interface
add_arrow_annotation fortplot_plot_annotations Subroutine

Add arrow annotation to figure

add_boxplot fortplot_figure_boxplot Subroutine

Add a box plot to the plot array

add_colored_contour_plot_data fortplot_figure_grid_plot_registration Subroutine
add_contour fortplot_matplotlib_field_wrappers Subroutine

Object-oriented contour helper.

Read more…
add_contour_filled fortplot_matplotlib_field_wrappers Subroutine

Object-oriented filled contour helper.

Read more…
add_contour_filled_impl fortplot_plot_contours Subroutine

Add filled contour plot with colors

Read more…
add_contour_impl fortplot_plot_contours Subroutine

Add basic contour plot

add_contour_plot_data fortplot_figure_grid_plot_registration Subroutine
add_contourf fortplot_matplotlib_field_wrappers Subroutine

Matplotlib-canonical alias for add_contour_filled.

Read more…
add_errorbar fortplot_matplotlib_errorbar Interface
add_fill_between_plot_data fortplot_figure_plot_management Subroutine
add_line_plot_data fortplot_2d_plots Subroutine

Add line plot data with comprehensive validation Enhanced Issue #854: Added comprehensive parameter validation

add_mark_to_state fortplot_spec_mark_handlers Subroutine
add_pcolormesh fortplot_matplotlib_mesh_wrappers Subroutine

Object-oriented pcolormesh helper.

Read more…
add_pcolormesh_impl fortplot_plot_contours Subroutine

Add pseudocolor mesh plot

Read more…
add_pie_legend_entries fortplot_figure_legend_setup Subroutine
add_plot fortplot_matplotlib_plot_wrappers Interface
add_plot fortplot_2d_plots Interface
add_plot_impl fortplot_2d_plots Subroutine

Add 2D line plot to figure

add_quiver fortplot_matplotlib_vector_wrappers Interface
add_scatter fortplot_matplotlib_scatter Interface
add_scatter_2d fortplot_scatter_plots Interface
add_scatter_2d_impl fortplot_scatter_plots Subroutine

Add 2D scatter plot to figure

add_scatter_3d fortplot_scatter_plots Interface
add_scatter_3d_impl fortplot_scatter_plots Subroutine

Add 3D scatter plot to figure

add_scatter_plot fortplot_figure_scatter Subroutine

Add a single efficient scatter plot object Properly handles thousands of points with single plot object

add_scatter_plot_data fortplot_scatter_plots Subroutine

Add scatter plot data with optional properties

add_streamline_to_figure fortplot_streamplot_core Subroutine

Add streamline trajectory to figure as line plot

add_subplot_plot fortplot_figure_subplots Subroutine

Add a plot to a specific subplot

add_surface fortplot_3d_plots Subroutine

Add surface plot to figure

add_surface fortplot_matplotlib_mesh_wrappers Subroutine

Object-oriented surface helper.

Read more…
add_surface_plot_data fortplot_figure_grid_plot_registration Subroutine
add_text_annotation fortplot_plot_annotations Subroutine

Add text annotation to figure

add_text_element fortplot_ascii_text_elements Subroutine

Create and store a text element on the ASCII canvas

advance_pattern_state fortplot_line_styles Subroutine

Advance pattern state for continuous rendering Following SRP - handles only state advancement

analyze_edge_smoothness fortplot_imagemagick Function
annotate fortplot_text_stub Subroutine

Add arrow annotation to the current figure

Read more…
append_ascii_legend_line_helper fortplot_ascii_legend Interface
append_field_bool fortplot_spec_json_field_plot Subroutine
append_field_int fortplot_spec_json_field_plot Subroutine
append_field_real fortplot_spec_json_field_plot Subroutine
append_field_real_array fortplot_spec_json_field_plot Subroutine
append_field_string fortplot_spec_json_field_plot Subroutine
append_string fortplot_test_pdf_utils Subroutine
apply_aspect_ratio_if_needed fortplot_figure_render_steps Subroutine
apply_colormap_to_array fortplot_color_conversions Subroutine

Apply colormap to array of values efficiently

apply_config_to_state fortplot_spec_config_apply Subroutine

Translate config_t into figure_state_t fields.

apply_custom_axis_ticks fortplot_pdf_axes_tick_data Subroutine

Apply custom tick positions/labels, converting data coords to plot area coords

apply_inverse_scale_transform fortplot_scales Function

Apply inverse scale transformation to recover original value

Read more…
apply_marching_squares_lookup fortplot_contour_algorithms Subroutine

Apply marching squares lookup table to get line segments

apply_padding_to_margins fortplot_spec_config_apply Subroutine

Convert Vega-Lite padding to figure_state_t margins.

Read more…
apply_scale_transform fortplot_scales Function

Apply forward scale transformation to a single value

Read more…
apply_spec_to_render_state fortplot_spec_rendering Subroutine
apply_style_defaults fortplot_spec_config_apply Subroutine

Fill spec%config from built-in style. When force=.true., overrides any JSON-provided config. When force=.false. (default), only fills when absent.

approx_equal fortplot_spec_rendering_utils Function
ascii_add_legend_entry_impl fortplot_ascii_legend Interface
ascii_calc_legend_dims_impl fortplot_ascii_legend Interface
ascii_calc_legend_pos_impl fortplot_ascii_legend Interface
ascii_clear_legend_impl fortplot_ascii_legend Interface
ascii_clear_pie_legend_impl fortplot_ascii_legend Interface
ascii_contour_glyph fortplot_ascii_drawing Function

Map a 1-based band index onto the ordered density ramp.

ascii_draw_axes_impl fortplot_ascii_backend_ops Subroutine
ascii_draw_line_primitive fortplot_ascii_primitives Subroutine
ascii_draw_secondary_x_axis_top fortplot_ascii_secondary_axes Subroutine

Draw top x-axis tick labels for ASCII backend in the reserved top band

ascii_draw_secondary_y_axis fortplot_ascii_secondary_axes Subroutine

Draw right y-axis tick labels for ASCII backend in the reserved band to the right of the primary data area.

ascii_draw_text_helper fortplot_ascii_text Subroutine

ASCII text drawing with legend processing (moved from main module)

ascii_draw_text_primitive fortplot_ascii_primitives Subroutine
ascii_extract_rgb_impl fortplot_ascii_backend_ops Subroutine
ascii_fill_quad_primitive fortplot_ascii_primitives Subroutine

Fill quadrilateral using character mapping based on current color

ascii_finalize fortplot_ascii_rendering Subroutine
ascii_get_output fortplot_ascii_rendering Function

Get the complete ASCII canvas as a string

ascii_get_png_impl fortplot_ascii_backend_ops Subroutine
ascii_marker_char fortplot_ascii_utils Function
ascii_minus_to_unicode fortplot_unicode Function

Replace a leading ASCII hyphen-minus (U+002D) marking a negative number with the typographic minus sign U+2212, matching matplotlib's default tick/colorbar labels. Only the sign position is converted; interior hyphens (none occur in numeric labels) and non-negative labels pass through unchanged.

ascii_prepare_3d_impl fortplot_ascii_backend_ops Subroutine
ascii_register_pie_legend_impl fortplot_ascii_legend Interface
ascii_render_axes_impl fortplot_ascii_backend_ops Subroutine
ascii_render_legend_impl fortplot_ascii_legend Interface
ascii_render_ylabel_impl fortplot_ascii_backend_ops Subroutine
ascii_save_coord_impl fortplot_ascii_backend_ops Subroutine
ascii_secondary_y_tick_width fortplot_ascii_secondary_axes Function

Width in character cells needed to hold the widest secondary y tick label, plus one column of padding from the data area. Used to reserve the right-hand band before data is drawn.

ascii_set_coord_impl fortplot_ascii_backend_ops Subroutine
ascii_set_legend_border_impl fortplot_ascii_legend Interface
assert_equals fortplot_testing Subroutine
assert_file_exists fortplot_testing Subroutine
assert_pdf_file_valid fortplot_test_output_helpers Subroutine
assert_true fortplot_testing Subroutine
assign_pending_autopct_helper fortplot_ascii_legend Interface
axhline fortplot_matplotlib_axes Subroutine

Draw a horizontal reference line.

Read more…
axis fortplot_matplotlib_axes Interface

Set aspect ratio: axis('equal'), axis('auto'), or axis(2.0)

axvline fortplot_matplotlib_axes Subroutine

Draw a vertical reference line.

Read more…
backend_associated_figure fortplot_figure_core_io_figure Function

Check if backend is allocated

backend_color_figure fortplot_figure_core_io_figure Subroutine

Set backend color

backend_is_ascii fortplot_legend_drawing Function

Detect whether backend is operating in ASCII mode based on canvas size

backend_line_figure fortplot_figure_core_io_figure Subroutine

Draw line using backend

bar fortplot_matplotlib_plot_wrappers Interface
bar_impl fortplot_plot_bars Subroutine

Add vertical bar plot

bar_plot_state fortplot_plot_bars Subroutine
bar_rgb_array fortplot_matplotlib_plot_wrappers Subroutine

Plot a vertical bar chart with per-bar RGB color arrays.

Read more…
barh fortplot_matplotlib_plot_wrappers Interface
barh_impl fortplot_plot_bars Subroutine

Add horizontal bar plot

barh_plot_state fortplot_plot_bars Subroutine
barh_rgb_array fortplot_matplotlib_plot_wrappers Subroutine

Plot a horizontal bar chart with per-bar RGB color arrays.

Read more…
basic_legend_example legend_demo Subroutine

Basic legend usage with labeled plots

bit_reverse fortplot_zlib_compress Function

Reverses the bits of a given value up to num_bits.

bitmap_to_png_buffer fortplot_png_encoder Subroutine

Convert 3D RGB bitmap to PNG buffer format with filter bytes

blend_pixel fortplot_raster_primitives Subroutine

Alpha blend a pixel with existing pixel data

Read more…
boxplot fortplot_matplotlib_plot_wrappers Interface
boxplot_cap_half_width fortplot_boxplot_rendering Function

matplotlib default: whisker cap total width is half the box width, so the cap half-width is a quarter of the box width.

boxplot_impl fortplot_plot_statistics Subroutine

Add boxplot

braille_char fortplot_braille Function

UTF-8 encoding of the braille codepoint for a mask. Invalid masks are clamped before encoding (braille_mask_valid reports the raw value).

braille_codepoint fortplot_braille Function

Codepoint for a braille mask, clamped into the valid block so an invalid mask can never encode outside U+2800..U+28FF.

braille_dot_bit fortplot_braille Function

Bit value for one dot within a cell. local_x in {0,1} (left/right), local_y in {0,1,2,3} (top to bottom). Out-of-range positions have no dot and return 0 so an invalid position never sets a spurious bit.

braille_draw_line fortplot_braille Subroutine

Rasterize a line between two subpixel coordinates with Bresenham's algorithm, setting every visited dot.

braille_finalize fortplot_ascii_rendering Subroutine

Braille counterpart of ascii_finalize: writes the composited braille canvas to a file, falling back to terminal output on error.

braille_mask_valid fortplot_braille Function

A mask is a valid braille bitmask only within [0, 255]; any other value carries dot bits that do not exist in the U+2800 block.

braille_output_to_file fortplot_ascii_rendering Subroutine

Compose the ASCII text canvas and the braille subpixel mask into UTF-8 rows: cells with a set braille mask emit the braille glyph, all other cells keep their ASCII character (frame, axes, ticks, labels).

build_file_path fortplot_doc_utils Subroutine
build_fortran_url fortplot_doc_utils Subroutine
build_fortran_url fortplot_documentation Subroutine
build_local_fortran_path fortplot_doc_utils Subroutine
build_local_fortran_path fortplot_documentation Subroutine
build_output_path fortplot_doc_utils Subroutine
build_output_path fortplot_documentation Subroutine
build_readme_path fortplot_doc_utils Subroutine
build_readme_path fortplot_documentation Subroutine
build_scatter_size_array fortplot_matplotlib_scatter_utils Subroutine

Build a uniform or per-point size array for scatter markers.

Read more…
bytes_to_string fortplot_test_pdf_utils Subroutine
calculate_adler32 fortplot_zlib_checksums Function

Calculate Adler-32 checksum for zlib

calculate_aligned_position fortplot_annotation_layout Subroutine

Calculate aligned text position based on alignment settings

calculate_ascii_legend_dimensions fortplot_ascii_legend Interface
calculate_ascii_legend_position fortplot_ascii_legend Interface
calculate_figure_data_ranges fortplot_figure_data_ranges Subroutine

Calculate overall data ranges for the figure with robust edge case handling

calculate_histogram_bins fortplot_figure_histogram Subroutine

Calculate histogram bin edges and counts from data.

Read more…
calculate_legend_box fortplot_legend_layout Function

Calculate optimal legend box dimensions and position DRY: Centralized legend box calculation logic

calculate_legend_position fortplot_legend_drawing Subroutine

Calculate legend position based on backend and position setting

calculate_log_minor_tick_positions fortplot_tick_calculation Subroutine

Calculate minor tick positions for log scale at 2,3,4,5,6,7,8,9 within decades

calculate_marching_squares_config fortplot_contour_algorithms Subroutine

Calculate marching squares configuration for a cell

calculate_mathtext_height_internal fortplot_text_layout Function

Calculate total height of mathematical text elements

calculate_mathtext_width_internal fortplot_text_layout Function

Calculate total width of mathematical text elements

calculate_minor_tick_positions fortplot_tick_calculation Subroutine

Calculate minor tick positions between major ticks Places minor_count minor ticks between each pair of major ticks

calculate_nice_axis_limits fortplot_tick_calculation Subroutine

Calculate nice axis limits that encompass the data like matplotlib The axis limits are set to nice round numbers based on tick locations

calculate_optimal_legend_dimensions fortplot_legend_layout Subroutine

Calculate optimal legend dimensions using actual text system measurements KISS: Based on measured text content, not estimates

calculate_pdf_plot_area fortplot_pdf_coordinate Subroutine

Calculate plot area for PDF backend (mathematical coordinates: Y=0 at bottom)

calculate_plot_area fortplot_layout Subroutine

Calculate plot area based on canvas size and margins (matplotlib-compatible) Note: left/bottom are margins, right/top are edge positions

Read more…
calculate_rotated_bounds fortplot_annotation_layout Subroutine

Calculate bounding box for rotated text

calculate_rotated_text_bounds fortplot_annotation_layout Subroutine

Calculate bounding box for rotated text

calculate_text_anchor fortplot_annotation_layout Subroutine

Calculate anchor position based on alignment settings

calculate_text_descent fortplot_text_layout Function

Calculate the descent (below baseline) portion of text in pixels

calculate_text_height fortplot_text_layout Function

Calculate the pixel height of text using STB TrueType Supports mathematical notation with superscripts and subscripts

calculate_text_height_with_size fortplot_text_layout Function

Calculate text height for a given font pixel size

calculate_text_height_with_size_internal fortplot_text_layout Function

Internal text height calculation based on font metrics

calculate_text_metrics fortplot_annotation_layout Subroutine

Calculate text dimensions for given annotation

calculate_text_metrics_safe fortplot_annotation_layout Subroutine

Safe text metrics calculation with error handling

calculate_text_width fortplot_text_layout Function

Calculate the pixel width of text using STB TrueType with UTF-8 support Supports mathematical notation with superscripts and subscripts

calculate_text_width_with_size fortplot_text_layout Function

Calculate text width using a specific font size Supports mathematical notation with superscripts and subscripts

calculate_text_width_with_size_internal fortplot_text_layout Function

Internal text width calculation to avoid circular dependencies Note: Uses len(text) not len_trim to preserve trailing spaces in mathtext

calculate_tick_labels fortplot_tick_calculation Subroutine

Calculate appropriate tick labels at nice locations like matplotlib Ensures all labels have consistent formatting and nice round numbers

calculate_tick_labels_log fortplot_tick_scales Subroutine

Calculate logarithmic tick labels at powers of 10 with sub-ticks

calculate_tick_labels_symlog fortplot_tick_scales Subroutine

Calculate symlog tick labels with improved linear and log regions

calculate_x_axis_label_position fortplot_label_positioning Subroutine

Calculate X-axis label position (40px below plot)

calculate_x_label_position fortplot_label_positioning Subroutine

Calculate X-axis label position with matplotlib-style centering and spacing

calculate_x_tick_label_position fortplot_label_positioning Subroutine

Calculate X-axis tick label position using proper font metrics and matplotlib spacing

calculate_x_tick_label_position_pdf fortplot_label_positioning Subroutine

Calculate X-axis tick label position for PDF (Y=0 at bottom, increases upward)

calculate_y_axis_label_position fortplot_label_positioning Subroutine

Calculate Y-axis label position with proper spacing from tick labels

calculate_y_label_position fortplot_label_positioning Subroutine

Calculate Y-axis label position with right alignment and proper spacing

calculate_y_tick_label_position fortplot_label_positioning Subroutine

Calculate Y-axis tick label position using proper font metrics

calculate_y_tick_label_position_pdf fortplot_label_positioning Subroutine

Calculate Y-axis tick label position for PDF (Y=0 at bottom, increases upward)

can_place_data fortplot_polar_text_layout Function

True when a data glyph may occupy the cell (in bounds and not reserved for a label).

cartesian_to_polar fortplot_polar Subroutine

Convert Cartesian to polar coordinates Returns theta in [0, 2*pi) range

catmull_rom_interpolate fortplot_contour_algorithms Subroutine

Catmull-Rom spline interpolation between P1 and P2 t in [0,1], P0/P3 are control points

charset_is_unicode fortplot_ascii_drawing Function
check_command_available_runtime fortplot_system_commands Subroutine
check_directory_exists fortplot_file_operations Subroutine
check_ffmpeg_available fortplot_pipe Function
check_file_exists fortplot_doc_utils Function
check_imagemagick_available fortplot_imagemagick Function
check_utf8_sequence fortplot_unicode Subroutine

Check if UTF-8 sequence is valid and return its length

choose_best_legend_position fortplot_legend_layout Function

Resolve matplotlib 'best' placement to a concrete corner. Computes the legend box for each candidate corner and scores it by the number of plotted artist sample points its bbox covers; the lowest overlap wins, ties broken in matplotlib's order (upper right first).

clamp_extreme_log_range fortplot_scales Subroutine

Clamp extreme logarithmic ranges to ensure usable plots

Read more…
clamp_to_unit fortplot_color_definitions Function

Clamp value to [0,1] range

cleanup_temp_file fortplot_system_viewer Subroutine

Remove temporary file (best effort, no error on failure)

cleanup_text_system fortplot_text_fonts Subroutine

Clean up text system resources

clear_color_cache fortplot_color_parsing Subroutine

Clear the color cache

clear_pie_legend_entries fortplot_ascii_legend Interface
clear_streamline_data fortplot_figure_streamlines Subroutine

Clear streamline data

clip_to_data_bounds fortplot_annotation_rendering Subroutine
close_ffmpeg_pipe fortplot_pipe Function
codepoint_to_default_placeholder fortplot_unicode Subroutine

Convert unknown codepoint to default placeholder format

codepoint_to_lowercase_greek fortplot_unicode Function

Convert lowercase Greek codepoint to ASCII name

codepoint_to_uppercase_greek fortplot_unicode Function

Convert uppercase Greek codepoint to ASCII name

color_to_ansi16 fortplot_text_color Function

Map an RGB triple to a standard (30-37) or bright (90-97) SGR foreground code by nearest 3-bit color plus a luminance-based bright bit.

color_to_ansi256 fortplot_text_color Function

Map an RGB triple to a 6x6x6 color-cube index (16..231).

color_to_byte fortplot_raster_primitives Function

Convert floating-point color value [0,1] to byte [0,255]

colorbar fortplot_matplotlib_colorbar Subroutine

Add a colorbar for the active figure.

Read more…
colormap_value_to_color fortplot_colormap Subroutine

Convert data value to RGB color using colormap

compare_images_psnr fortplot_imagemagick Function
compare_images_rmse fortplot_imagemagick Function
compare_with_baseline fortplot_validation Function
composite_bitmap_to_raster fortplot_bitmap Subroutine

Composite 3D RGB bitmap directly onto raster image buffer

composite_bitmap_to_raster_0 fortplot_bitmap Subroutine

Composite 3D RGB bitmap onto raster buffer using 0-based destination coords

composite_image fortplot_bitmap Subroutine
compute_angular_ticks fortplot_polar Subroutine

Compute angular tick positions and labels for polar plot Returns angles in radians and labels in degrees

compute_date_ticks fortplot_axes_date Subroutine
compute_default_contour_levels fortplot_contour_level_calculation Subroutine
compute_non_overlapping_mask fortplot_raster_ticks Subroutine
compute_non_overlapping_mask_simple fortplot_raster_axes_secondary Subroutine
compute_radial_ticks fortplot_polar Subroutine

Compute radial tick positions for polar plot

compute_scale_ticks fortplot_axes Subroutine

Compute tick positions for different scale types

Read more…
compute_streamplot_arrows fortplot_streamplot_arrow_utils Subroutine

Compute arrow metadata for streamlines based on trajectory geometry

compute_tight_subplot_margins fortplot_subplot_layout Subroutine

Compute per-cell subplot margins in fractional figure coordinates. Margins, inter-column gaps, and inter-row gaps are driven by each panel's decoration sizes (tick labels, axis labels, titles) so every panel's y-axis label sits to the left of its plot box and the top row's x-axis label clears the title of the row below. Short figures additionally reclaim excess margin so the panels fill at least MIN_AXES_FILL_FRAC of the figure height, matching matplotlib's default vertical fill.

compute_title_position fortplot_raster_labels Subroutine

Compute the position for centered title above plot area

compute_ylabel_x_pos fortplot_raster_labels Function

Compute x-position for ylabel to avoid overlapping with y-tick labels. The gap between the ylabel's right edge and the outer edge of the y-tick labels is matplotlib's axes.labelpad (AXIS_LABEL_PAD_PT), scaled to device pixels by DPI, so the label sits snug against the tick labels rather than floating far to the left.

compute_ylabel_x_pos fortplot_raster_axes_secondary Function
compute_ylabel_x_pos_old fortplot_raster_axes_secondary Function
configure_figure_dimensions fortplot_figure_configuration Subroutine

Configure figure dimensions

configure_grid fortplot_figure_grid Subroutine

Configure grid settings

contains_format_chars fortplot_format_parser Function

Check if a style string contains matplotlib format characters Returns false for named linestyles (solid, dashed, etc)

contains_pie_plot fortplot_figure_aspect Function

Detect whether a collection of plots contains at least one pie chart

contains_unicode fortplot_unicode Function

Check if text contains Unicode characters

contour fortplot_matplotlib_field_wrappers Subroutine

Draw contour lines.

Read more…
contour_filled fortplot_matplotlib_field_wrappers Subroutine

Draw filled contour regions.

Read more…
contourf fortplot_matplotlib_field_wrappers Subroutine

Matplotlib-canonical alias for contour_filled.

Read more…
coordinates_from_centers fortplot_pcolormesh Subroutine

Infer vertex edges from center coordinates for uniform grids

copy_file_content fortplot_documentation Subroutine
core_add_contour fortplot_figure_core_operations Subroutine
core_add_contour_filled fortplot_figure_core_operations Subroutine

Add a filled contour plot to the figure

Read more…
core_add_fill_between fortplot_figure_core_operations Subroutine
core_add_pcolormesh fortplot_figure_core_operations Subroutine

Add a pcolormesh plot to the figure

Read more…
core_add_pie fortplot_figure_core_operations Subroutine
core_add_plot fortplot_figure_core_operations Subroutine
core_add_surface fortplot_figure_core_operations Subroutine

Add a 3D surface plot to the figure

Read more…
core_axhline fortplot_figure_reflines Subroutine

Draw a horizontal line spanning the axes at y position

core_axvline fortplot_figure_reflines Subroutine

Draw a vertical line spanning the axes at x position

core_backend_arrow fortplot_figure_core_accessors Subroutine
core_backend_associated fortplot_figure_core_accessors Function
core_backend_color fortplot_figure_core_accessors Subroutine
core_backend_line fortplot_figure_core_accessors Subroutine
core_boxplot fortplot_figure_core_advanced Subroutine

Create a box plot

core_clear fortplot_figure_management Subroutine

Clear the figure for reuse, preserving backend settings

core_clear_streamlines fortplot_figure_management Subroutine
core_colorbar fortplot_figure_core_advanced Subroutine

Enable a stateful colorbar for the current figure.

Read more…
core_destroy fortplot_figure_management Subroutine
core_extract_png_data_for_animation fortplot_figure_core_accessors Subroutine
core_extract_rgb_data_for_animation fortplot_figure_core_accessors Subroutine
core_figure_legend fortplot_figure_core_utils Subroutine
core_get_height fortplot_figure_core_accessors Function
core_get_plot_count fortplot_figure_core_accessors Function
core_get_plots fortplot_figure_core_accessors Function
core_get_rendered fortplot_figure_core_accessors Function
core_get_width fortplot_figure_core_accessors Function
core_get_x_max fortplot_figure_core_accessors Function
core_get_x_min fortplot_figure_core_accessors Function
core_get_y_max fortplot_figure_core_accessors Function
core_get_y_min fortplot_figure_core_accessors Function
core_grid fortplot_figure_core_config Subroutine
core_hist fortplot_figure_core_advanced Subroutine

Create a histogram plot (matplotlib-compatible).

core_hlines fortplot_figure_reflines Subroutine

Draw horizontal lines at each y position from xmin to xmax

core_initialize fortplot_figure_core_operations Subroutine
core_quiver fortplot_figure_core_operations Subroutine

Add quiver plot (discrete vector arrows) to figure

core_savefig fortplot_figure_core_operations Subroutine
core_savefig_with_status fortplot_figure_core_operations Subroutine
core_scatter fortplot_figure_core_advanced Subroutine

Add an efficient scatter plot using a single plot object Properly handles thousands of points without O(n) overhead

core_set_line_width fortplot_figure_core_config Subroutine
core_set_rendered fortplot_figure_core_accessors Subroutine
core_set_text_charset fortplot_figure_core_config Subroutine

Store the text-backend charset: 'ascii' (default), 'unicode', 'auto' (resolved from the environment at save time), or 'braille'. Unknown names warn and fall back to 'ascii' (#2060, #2061).

core_set_text_color_mode fortplot_figure_core_config Subroutine

Store the text-backend ANSI color mode: 'never' (default), 'ansi16', 'ansi256', 'truecolor', or 'auto' (resolved at output time). Unknown names warn and fall back to 'never' so escapes never leak (#2062).

core_set_title fortplot_figure_core_config Subroutine
core_set_view fortplot_figure_core_config Subroutine
core_set_xaxis_date_format fortplot_figure_core_config Subroutine
core_set_xlabel fortplot_figure_core_config Subroutine
core_set_xlim fortplot_figure_core_config Subroutine
core_set_xscale fortplot_figure_core_config Subroutine
core_set_yaxis_date_format fortplot_figure_core_config Subroutine
core_set_ydata fortplot_figure_core_utils Subroutine
core_set_ylabel fortplot_figure_core_config Subroutine
core_set_ylim fortplot_figure_core_config Subroutine
core_set_yscale fortplot_figure_core_config Subroutine
core_setup_png_backend_for_animation fortplot_figure_core_accessors Subroutine
core_show fortplot_figure_core_operations Subroutine
core_streamplot fortplot_figure_core_operations Subroutine
core_vlines fortplot_figure_reflines Subroutine

Draw vertical lines at each x position from ymin to ymax

count_animation_frames fortplot_ascii_player Subroutine

Count frames in a .txt animation without playing them.

crc32_calculate fortplot_zlib_checksums Function

Calculate CRC32 checksum using standard polynomial

create_ascii_canvas fortplot_ascii Function
create_braille_canvas fortplot_braille Function

Build a blank braille canvas sized to a text grid of n_cols by n_rows character cells. Subpixel resolution is 2n_cols by 4n_rows dots.

create_directory_recursive fortplot_file_operations Subroutine
create_directory_runtime fortplot_file_operations Subroutine
create_histogram_line_data fortplot_figure_histogram Subroutine

Create line data for histogram visualization as connected rectangles.

Read more…
create_legend fortplot_legend Function

Factory function following Dependency Inversion

create_legend fortplot_legend_state Function

Factory function following Dependency Inversion

create_output_directory save_animation_demo Subroutine
create_pdf_canvas fortplot_pdf Interface
create_pdf_canvas_core fortplot_pdf_core Function
create_png_canvas fortplot_png Function
create_raster_canvas fortplot_raster Function
create_raster_image fortplot_raster_core Function
create_regular_mesh_grid fortplot_pcolormesh Subroutine

Create 2D meshgrid from 1D coordinate arrays Used internally for regular grid setup

create_single_directory fortplot_file_operations Subroutine
create_subplots fortplot_figure_subplots Subroutine

Create a grid of subplots

create_svg_canvas fortplot_svg Function
create_text_annotation fortplot_annotation_types Function

Create a text annotation with specified properties

data_to_screen_coords fortplot_animation_rendering Subroutine
date_value_from_unix_seconds fortplot_axes_date Function
date_value_to_unix_seconds fortplot_axes_date Function
datetime_to_unix_seconds fortplot_datetime Function
decode_ascii_legend_line fortplot_ascii_legend Interface
default_date_format fortplot_axes_date Function
default_validation_context fortplot_validation_context Function
deflate_compress fortplot_zlib_compress Subroutine

Full deflate compression implementation with LZ77 and Huffman coding

delete_file_runtime fortplot_file_operations Subroutine
demo_3d_line_plots comprehensive_3d_demo Subroutine

Demonstrate 3D line plots with helices and parametric curves

demo_3d_scatter_plots comprehensive_3d_demo Subroutine

Demonstrate various 3D scatter plot patterns and combinations

demo_3d_surface_plots comprehensive_3d_demo Subroutine

Demonstrate 3D surface plots with different mathematical functions

demo_all_marker_types styling_demo Subroutine

Demonstrates all available marker types

demo_basic_contour contour_demo Subroutine

Basic contour line plot with Gaussian function

demo_basic_gradient pcolormesh_demo Subroutine

Basic pcolormesh with simple gradient - enhanced 51x51 grid

demo_basic_plots fpm_demo Subroutine
demo_basic_plots cmake_demo Subroutine
demo_categorical_labels bar_chart_demo Subroutine

Demonstrates categorical axis labels for bar charts Uses set_xticks() with string labels to create categorical x-axis

demo_colormap_comparison contour_demo Subroutine

Compare different colormaps with ripple function

demo_different_colormaps pcolormesh_demo Subroutine

Demo different colormaps - enhanced 51x51 grid

demo_filled_contour contour_demo Subroutine

Filled contour plots with colorbar

demo_format_strings styling_demo Subroutine

Demonstrates matplotlib-style format strings

demo_line_styles styling_demo Subroutine

Demonstrates all available line styles

demo_mixed_contour_line contour_demo Subroutine

Contour plot combined with a line plot overlay

demo_mixed_plots comprehensive_3d_demo Subroutine

Demonstrate mixing 2D and 3D plots, and combining different 3D types

demo_multiple_formats fpm_demo Subroutine
demo_multiple_formats cmake_demo Subroutine
demo_negative_coordinates pcolormesh_demo Subroutine

Pcolormesh with negative coordinates and values to exercise edge cases

demo_object fill_between_demo Subroutine
demo_object_energy pie_chart_demo Subroutine
demo_object_grouped bar_chart_demo Subroutine
demo_scatter_markers styling_demo Subroutine

Creates a scatter plot demonstrating markers in practical use

demo_scientific_visualization fpm_demo Subroutine
demo_scientific_visualization cmake_demo Subroutine
demo_show_viewer display_demo Subroutine

Demonstrates show_viewer() - opens in system PDF viewer

demo_sinusoidal_pattern pcolormesh_demo Subroutine

Pcolormesh with sinusoidal pattern - enhanced 51x51 grid

demo_smart_show display_demo Subroutine

Demonstrates show() - intelligent display selection

demo_stacked_bars bar_chart_demo Subroutine

Demonstrates stacked bar charts (Issue #1460) Uses bottom parameter to stack bars on top of each other

demo_stateful fill_between_demo Subroutine
demo_stateful_grouped bar_chart_demo Subroutine
demo_stateful_horizontal bar_chart_demo Subroutine
demo_stateful_sales pie_chart_demo Subroutine
dequeue_pie_autopct fortplot_ascii_legend Interface
destroy_raster_image fortplot_raster_core Subroutine
destroy_text_annotation fortplot_annotation_types Subroutine

Clean up text annotation resources

determine_decimal_places_from_step fortplot_tick_calculation Function

Decimal places needed to render the step exactly, matching matplotlib's ScalarFormatter. A step of 2.5 needs 1 decimal ("2.5"), 0.25 needs 2 ("0.25"); rounding to fewer would mislabel a tick (e.g. 2.5 -> "3"). The count is the fractional-digit depth of the step, not a function of its magnitude.

determine_decimals_from_ticks fortplot_tick_calculation Function

Determine decimal places from an array of tick positions. Uses the smallest non-zero spacing as representative step.

determine_sticky_edges fortplot_figure_data_ranges Subroutine

Flag axis sides where the generic 5% data-range margin must not be applied, matching matplotlib's sticky edges. Bars carry their own margin (with a sticky baseline) in process_bar_plot_ranges; a pcolormesh and contour grids fill their data extent exactly. In each case the data range is authoritative and adding margin would float the artist off the axis (bars) or leave a gap around it (mesh/contour).

distance_point_to_line_segment fortplot_raster_primitives Function

Calculate minimum distance from point to line segment

Read more…
dopri5_integrate fortplot_streamline_integrator Subroutine

Integrate streamline using DOPRI5 method with adaptive step size

draw fortplot_matplotlib_session Subroutine

Redraw the current figure to terminal (ASCII output)

Read more…
draw_3d_axes fortplot_3d_axes Subroutine

Draw complete 3D axes frame with ticks and labels

Read more…
draw_3d_front_frame fortplot_3d_axes Subroutine

Draw the box spines that lie in front of the data. Called after the data is rendered so near spines occlude curves and surfaces, while the far spines drawn by draw_3d_axes stay behind the data.

draw_ascii_arrow fortplot_ascii_drawing Subroutine

Draw arrow using Unicode directional characters for ASCII backend

draw_ascii_axes_and_labels fortplot_ascii_text Subroutine

Draw axes and labels for ASCII backend

draw_ascii_marker fortplot_ascii_drawing Subroutine
draw_ascii_stream_segment fortplot_ascii_drawing Subroutine

Rasterize a streamplot trajectory segment thinned to terminal-cell resolution (issue #2070). Flow cells are placed through the layer policy so they never overwrite axes, ticks, or labels, and a minimum horizontal gap keeps any single row from being flooded with flow glyphs. The result is a sparse dotted flow field instead of a dense run of hyphen fragments.

draw_ascii_vector_arrow fortplot_ascii_drawing Subroutine

Project a quiver vector to a text cell, clip it to the interior plot area, and stamp an eight-direction ASCII glyph at data-layer priority so it never overwrites axis spines, ticks, or label text (issue #2071). u/v are the already scaled vector components in data units, so the caller's scale factor still governs which arrows survive the minimum-shaft cut. The interior clip drops vectors that would land on the frame or in the tick/axis label margin.

draw_back_panes fortplot_3d_box Subroutine

Fill the three back-facing panes with light gray, behind the data.

draw_back_spines fortplot_3d_box Subroutine

Draw the box edges that lie behind the data (mean edge depth below the cube center). These render before the data so the data paints over them.

draw_backend_arrow fortplot_figure_accessors Subroutine

Draw arrow using backend

draw_backend_line fortplot_figure_accessors Subroutine

Draw line using backend

draw_basic_axes_frame fortplot_margins Subroutine

Draw basic rectangular axes frame Uses a procedure pointer to be backend-agnostic

draw_circle_antialiased fortplot_raster_markers Subroutine

Draw filled circle with antialiasing

Read more…
draw_circle_outline_antialiased fortplot_raster_markers Subroutine

Draw circle outline with antialiasing

Read more…
draw_circle_with_edge_face fortplot_raster_markers Subroutine

Draw circle with separate edge and face colors

Read more…
draw_diamond_with_edge_face fortplot_raster_markers Subroutine

Draw diamond marker with separate edge and face colors

draw_filled_quad fortplot_mesh_rendering Subroutine

Draw a filled quadrilateral

draw_filled_quad_raster fortplot_raster_primitives Subroutine

Draw filled quadrilateral using scanline algorithm.

Read more…
draw_filled_quad_raster_alpha fortplot_raster_primitives Subroutine

Draw filled quadrilateral with anti-aliased, supersampled coverage and alpha blending. Supersampling in both axes gives the correct filled area for rotated quads such as diamond markers: a per-scanline nint span (the previous approach) collapsed the narrow rows near a diamond's tips, leaving the concave four-petal artifact. Each pixel's coverage is the fraction of sub-samples inside the polygon, then blended once at coverage*opacity so overlapping fills do not double-darken.

draw_front_spines fortplot_3d_box Subroutine

Draw the box edges in front of the data (mean edge depth above the cube center). These render after the data so they occlude it, matching the global painter ordering of matplotlib mplot3d.

draw_initial_frame probability_animation_demo Subroutine
draw_line_distance_aa fortplot_raster_primitives Subroutine

Draw antialiased line using distance-based approach

Read more…
draw_line_on_canvas fortplot_ascii_drawing Subroutine
draw_mixed_font_text fortplot_pdf_text_render Subroutine
draw_pane_gridlines fortplot_3d_box Subroutine

Draw gridlines across each back pane at the per-axis tick fractions, one line per tick, in light gray (matplotlib mplot3d).

draw_pdf_arrow fortplot_pdf_drawing Subroutine

Draw arrow marker in PDF

draw_pdf_arrow_at_coords fortplot_pdf_markers Subroutine
draw_pdf_arrowhead fortplot_pdf_drawing Subroutine

Streamplot arrowhead only: head triangle at (x, y) tip, no shaft.

draw_pdf_arrowhead_at_coords fortplot_pdf_markers Subroutine

Streamplot arrowhead: head glyph at (x, y), no shaft. (dx, dy) is a unit direction in data coords; only its angle matters.

draw_pdf_axes_and_labels fortplot_pdf_axes Subroutine

Draw complete axes system with labels using actual plot area coordinates

draw_pdf_circle_with_outline fortplot_pdf_drawing Subroutine

Draw filled circle with outline in PDF

draw_pdf_diamond_with_outline fortplot_pdf_drawing Subroutine

Draw filled diamond with outline in PDF

draw_pdf_frame_with_area fortplot_pdf_axes_drawing Subroutine

Draw the plot frame using actual plot area coordinates (FIXED version)

draw_pdf_marker_at_coords fortplot_pdf_markers Subroutine
draw_pdf_mathtext fortplot_pdf_mathtext_render Subroutine

Draw text with mathematical notation

draw_pdf_minor_tick_marks fortplot_pdf_axes_drawing Subroutine

Draw minor tick marks (shorter than major ticks)

draw_pdf_secondary_x_axis_top fortplot_pdf_secondary_axes Subroutine

Draw secondary X axis at the top of the plot

draw_pdf_secondary_y_axis fortplot_pdf_secondary_axes Subroutine

Draw secondary Y axis on the right side of the plot

draw_pdf_square_with_outline fortplot_pdf_drawing Subroutine

Draw filled square with outline in PDF

draw_pdf_text fortplot_pdf_text_render Subroutine
draw_pdf_text_bold fortplot_pdf_text_render Subroutine
draw_pdf_text_direct fortplot_pdf_text_render Subroutine
draw_pdf_tick_labels_with_area fortplot_pdf_axes_drawing Subroutine

Draw tick labels using actual plot area coordinates (FIXED version)

draw_pdf_tick_marks_with_area fortplot_pdf_axes_drawing Subroutine

Draw tick marks using actual plot area coordinates (FIXED version)

draw_pdf_title_and_labels fortplot_pdf_axes_text Subroutine

Draw plot title and axis labels

draw_pdf_x_marker fortplot_pdf_drawing Subroutine

Draw X-shaped marker in PDF

draw_quad_edges fortplot_mesh_rendering Subroutine

Draw quadrilateral edges

draw_rotated_mixed_font_text fortplot_pdf_text_render Subroutine
draw_single_point_marker fortplot_marker_rendering Subroutine

Draw a visible marker for a single point This ensures single points are visible even without explicit markers

draw_square_with_edge_face fortplot_raster_markers Subroutine

Draw square marker with separate edge and face colors

draw_styled_line fortplot_raster_line_styles Subroutine

Draw line with pattern support (dashed, dotted, etc.)

draw_text_axis_frame fortplot_ascii_drawing Subroutine

Draw the solid left and bottom axis spines plus the corner tick. Spines are filled cell-by-cell in screen space so they stay continuous regardless of the data range (issue #2069).

draw_text_axis_tick fortplot_ascii_drawing Subroutine

Draw a single tick mark on a spine at a labeled tick position.

draw_text_grid_lines fortplot_ascii_drawing Subroutine

Fill interior grid glyphs aligned to major-tick columns and rows. Grid cells are drawn at LAYER_GRID, the lowest drawable layer, so put_cell leaves data, axis spines, tick marks, and labels intact and only paints otherwise-blank interior cells (issue #2074).

draw_x_marker fortplot_raster_markers Subroutine

Draw X-shaped marker

edgecolors_are_none fortplot_matplotlib_scatter_utils Function
effective_linewidth fortplot_matplotlib_scatter_utils Function
emit_pdf_escape_or_fallback fortplot_pdf_text_segments Subroutine
ends_with fortplot_spec_rendering_utils Function
enforce_aspect_ratio fortplot_figure_aspect Subroutine

Adjust axis limits to enforce the specified aspect ratio. For equal aspect, x and y have the same scale per pixel. For numeric ratio, y-scale = ratio * x-scale.

enforce_pie_axis_equal fortplot_figure_aspect Subroutine

Adjust the figure axis limits so pie charts render with equal scaling

enqueue_pie_autopct fortplot_ascii_legend Interface
ensure_directory_exists fortplot_utils Subroutine

Ensure output directory exists for a given filepath Extracts the parent directory and creates it securely using the runtime file operations with path validation.

ensure_fig_init fortplot_matplotlib_session Subroutine

Ensure the global figure exists and is initialized

ensure_figure_storage fortplot_figure_initialization Subroutine

Lazily allocate plot storage and the active backend so that operations invoked on a default-initialized figure_t do not dereference unallocated arrays (#1638).

ensure_global_figure_initialized fortplot_matplotlib_session Subroutine

Public wrapper to guarantee the singleton is ready for use

ensure_leading_zero fortplot_tick_formatting Subroutine

Ensure numbers like .5 become 0.5 for readability

ensure_test_output_dir fortplot_test_output_helpers Subroutine

Ensure a test output directory exists and return its normalized path

errorbar fortplot_errorbar_plots Interface
errorbar fortplot_matplotlib_errorbar Interface
errorbar_impl fortplot_errorbar_plots Subroutine

Add error bar plot to figure

escape_json_string fortplot_spec_json Function

Escape a string for safe JSON embedding. Handles: " -> \", \ -> \, and control characters.

escape_pdf_string fortplot_pdf_text_escape Subroutine

Escape special characters in PDF strings

escape_unicode_for_ascii fortplot_unicode Subroutine

Convert Unicode text to ASCII-compatible text for ASCII backend Processes UTF-8 input and converts Unicode characters to readable ASCII equivalents

escape_unicode_for_raster fortplot_unicode Subroutine

Pass through Unicode for raster rendering (STB TrueType supports Unicode)

estimate_pdf_text_width fortplot_pdf_text_metrics Function

Estimate rendered width (in PDF points) of a text string

expand_data_range fortplot_figure_rendering_pipeline Subroutine

Expand a data range by DATA_RANGE_MARGIN (5%) of the span on each side, matching matplotlib's default axes margin (rcParams axes.{x,y}margin = 0.05). Also keeps markers at exact boundaries clear of the plot frame stroke.

Read more…
expect_char fortplot_spec_json_reader Function

Expect and consume a specific character

extract_ascii_rgb_data fortplot_ascii_backend_support Subroutine

Extract RGB data from ASCII backend (not supported - dummy data)

extract_contour_regions fortplot_contour_regions Function

Extract polygonal regions between contour levels using marching squares

Read more…
extract_figure_png_data_for_animation fortplot_figure_animation Subroutine

Extract PNG data for animation

extract_figure_rgb_data_for_animation fortplot_figure_animation Subroutine

Extract RGB data for animation

extract_frame_rgb_data fortplot_animation_rendering Subroutine
extract_latex_command fortplot_latex_parser Subroutine
extract_pdf_stream_text fortplot_test_pdf_utils Subroutine
extract_png_data_for_animation_figure fortplot_figure_core_io_figure Subroutine

Extract PNG data for animation

extract_png_for_animation fortplot_figure_accessors Subroutine

Extract PNG data for animation

extract_rgb_data_for_animation_figure fortplot_figure_core_io_figure Subroutine

Extract RGB data for animation

extract_rgb_for_animation fortplot_figure_accessors Subroutine

Extract RGB data for animation

figure fortplot_matplotlib_session Subroutine

Create or reset the shared figure.

Read more…
figure_add_contour fortplot_figure_plots Subroutine

Add a contour plot to the figure

figure_add_contour_filled fortplot_figure_plots Subroutine

Add a filled contour plot with color mapping

Read more…
figure_add_contour_filled_operation fortplot_figure_operations Subroutine

Add a filled contour plot with color mapping

Read more…
figure_add_contour_operation fortplot_figure_operations Subroutine

Add a contour plot to the figure

figure_add_fill_between fortplot_figure_plots Subroutine

Add an area fill between two curves

figure_add_fill_between_operation fortplot_figure_operations Subroutine

Add an area fill between two curves

figure_add_pcolormesh fortplot_figure_plots Subroutine

Add a pcolormesh plot

Read more…
figure_add_pcolormesh_operation fortplot_figure_operations Subroutine

Add a pcolormesh plot

Read more…
figure_add_pie fortplot_figure_pie Subroutine

Store pie chart slices using polar wedges with optional explode & colors

figure_add_pie_operation fortplot_figure_operations Subroutine

Add a pie chart to the figure

figure_add_plot fortplot_figure_plots Subroutine

Add a line plot to the figure

figure_add_plot_operation fortplot_figure_operations Subroutine

Add a line plot to the figure

figure_add_surface fortplot_figure_plots Subroutine

Add a 3D surface plot to the figure

Read more…
figure_add_surface_operation fortplot_figure_operations Subroutine

Add a 3D surface plot to the figure

Read more…
figure_backend_arrow fortplot_figure_properties Subroutine

Draw arrow using backend property

figure_backend_associated fortplot_figure_properties Function

Get backend association property

figure_backend_color fortplot_figure_properties Subroutine

Set backend color property

figure_backend_line fortplot_figure_properties Subroutine

Draw line using backend property

figure_boxplot_operation fortplot_figure_operations Subroutine

Create a box plot

figure_clear fortplot_figure_management Subroutine

Clear the figure to prepare for reuse (preserving backend settings)

figure_clear_streamlines fortplot_figure_management Subroutine

Clear streamline data

figure_destroy fortplot_figure_management Subroutine

Finalize and clean up figure

figure_extract_png_data_for_animation fortplot_figure_management Subroutine

Extract PNG data for animation

figure_extract_rgb_data_for_animation fortplot_figure_management Subroutine

Extract RGB data for animation

figure_get_height fortplot_figure_properties Function

Get figure height property

figure_get_plot_count fortplot_figure_properties Function

Get figure plot count property

figure_get_plots fortplot_figure_properties Function

Get figure plots property

figure_get_rendered fortplot_figure_properties Function

Get figure rendered property

figure_get_width fortplot_figure_properties Function

Get figure width property

figure_get_x_max fortplot_figure_properties Function

Get x maximum property

figure_get_x_min fortplot_figure_properties Function

Get x minimum property

figure_get_y_max fortplot_figure_properties Function

Get y maximum property

figure_get_y_min fortplot_figure_properties Function

Get y minimum property

figure_grid_operation fortplot_figure_operations Subroutine

Enable/disable and configure grid lines

figure_hist_operation fortplot_figure_operations Subroutine

Create a histogram plot (matplotlib-compatible).

figure_initialize fortplot_figure_management Subroutine

Initialize the figure with specified dimensions and backend Added DPI support for OO interface consistency with matplotlib interface

figure_legend_operation fortplot_figure_operations Subroutine

Add legend to figure

figure_render fortplot_figure_render_engine Subroutine
figure_savefig fortplot_figure_management Subroutine

Save figure to file (backward compatibility version)

figure_savefig_with_status fortplot_figure_management Subroutine

Save figure to file with error status reporting

figure_scatter_operation fortplot_figure_operations Subroutine

Add an efficient scatter plot using a single plot object

figure_set_line_width_operation fortplot_figure_operations Subroutine

Set line width for subsequent plots

figure_set_rendered fortplot_figure_properties Subroutine

Set figure rendered property

figure_set_title_operation fortplot_figure_operations Subroutine

Set figure title

figure_set_xlabel_operation fortplot_figure_operations Subroutine

Set x-axis label

figure_set_xlim_operation fortplot_figure_operations Subroutine

Set x-axis limits

figure_set_xscale_operation fortplot_figure_operations Subroutine

Set x-axis scale type

figure_set_ydata_operation fortplot_figure_operations Subroutine

Update y data for an existing plot

figure_set_ylabel_operation fortplot_figure_operations Subroutine

Set y-axis label

figure_set_ylim_operation fortplot_figure_operations Subroutine

Set y-axis limits

figure_set_yscale_operation fortplot_figure_operations Subroutine

Set y-axis scale type

figure_setup_png_backend_for_animation fortplot_figure_management Subroutine

Setup PNG backend for animation

figure_show fortplot_figure_management Subroutine

Display the figure

figure_streamplot_operation fortplot_figure_operations Subroutine

Add streamline plot to figure using basic algorithm

figure_subplot_plot fortplot_figure_management Subroutine

Add a plot to a specific subplot

figure_subplot_plot_count fortplot_figure_management Function

Get the number of plots in a specific subplot

figure_subplot_set_title fortplot_figure_management Subroutine

Set the title for a specific subplot

figure_subplot_set_xlabel fortplot_figure_management Subroutine

Set the x-axis label for a specific subplot

figure_subplot_set_ylabel fortplot_figure_management Subroutine

Set the y-axis label for a specific subplot

figure_subplot_title fortplot_figure_management Function

Get the title for a specific subplot

figure_subplots fortplot_figure_management Subroutine

Create a grid of subplots

figure_to_spec fortplot_spec_frontend_adapters Subroutine
figure_update_data_ranges fortplot_figure_properties Subroutine

Update data ranges based on current plot

figure_update_data_ranges_boxplot fortplot_figure_properties Subroutine

Update data ranges after adding boxplot - delegate to ranges module

figure_update_data_ranges_pcolormesh fortplot_figure_properties Subroutine

Update data ranges after adding pcolormesh plot - delegate to ranges module

file_exists fortplot_doc_utils Function
fill fortplot_matplotlib_plots Interface
fill_active_edges fortplot_tt_scanline_fill Subroutine

Fill scanline coverage from active edges. Port of stbtt__fill_active_edges_new. scanline is 0-based [0..w-1], scanline2 is 0-based [0..w]. In STB, fill function receives scanline_fill = scanline2+1. Here scanline2(k+1) = STB's scanline_fill[k].

fill_ascii_contour fortplot_ascii_drawing Subroutine

Paint filled-contour bands into the ASCII canvas with an ordered glyph ramp (issue #2077). Each interior character cell is mapped back to a data coordinate (same screen mapping as ascii_fill_quad_primitive), its scalar value is looked up on the grid, and the band index selects a ramp glyph. Cells are written through put_cell at LAYER_DATA so axis spines, ticks, and labels stay reserved.

fill_ascii_heatmap fortplot_ascii_drawing Subroutine

Fill ASCII canvas with heatmap representation of 2D data

fill_between fortplot_matplotlib_plots Interface
fill_horizontal_line fortplot_raster_rendering Subroutine

Fill horizontal line segment

fill_tick_positions_and_labels fortplot_pdf_axes_tick_data Subroutine

Fill tick positions and labels arrays

fill_triangle fortplot_raster_rendering Subroutine

Fill triangle using barycentric coordinates

finalize_pdf_stream fortplot_pdf_core Subroutine
find_all_latex_commands fortplot_latex_parser Subroutine
find_any_available_font fortplot_text_fonts Function

Find any available font using same priority order as system initialization

find_column fortplot_spec_json_data Function

Find column index by field name

find_font_by_name fortplot_text_fonts Function

Find font by name in typical system locations

find_group_index fortplot_doc_output Function
find_latex_command fortplot_latex_parser Subroutine
find_nice_tick_locations fortplot_tick_calculation Subroutine

Find nice tick locations following matplotlib's MaxNLocator algorithm exactly

find_subsequence fortplot_test_pdf_tokenizer Function
format_angle_label fortplot_polar Function

Format angle in degrees with a trailing degree sign, matching matplotlib's polar theta tick labels (e.g. "45" + U+00B0). The degree sign is emitted as its two-byte UTF-8 encoding (0xC2 0xB0) so the text backend renders the glyph directly.

format_date_tick_label fortplot_axes_date Function
format_log_mantissa_label fortplot_tick_formatting Function

Build a mathtext label for a sub-decade log tick: m x 10^{p}. Mirrors matplotlib's minor log labels, e.g. 2 x 10^0 or 4.2 x 10^1. Exact powers of ten are delegated to format_power_of_ten_label.

format_log_tick_value fortplot_tick_formatting Function

Format logarithmic tick values using scientific notation like matplotlib

format_number annotation_demo Function

Simple number formatting for annotations

format_power_of_ten_label fortplot_tick_formatting Function

Build a mathtext-friendly power-of-ten label: 10^{n} or -10^{n}

format_tick_label fortplot_axes Function

Format a tick value as a string label

Read more…
format_tick_value fortplot_tick_formatting Function

Format tick value based on data range like matplotlib

format_tick_value_consistent fortplot_tick_calculation Function

Format tick value with consistent decimal places for uniform appearance

format_tick_value_smart fortplot_tick_formatting Function

Smart tick value formatting with automatic exponential notation for long labels Limits output to max_chars and uses exponential notation when needed

format_unix_seconds fortplot_datetime Function
fpart fortplot_raster_primitives Function

Fractional part of floating-point number

Read more…
FuncAnimation fortplot_animation Function

Facade constructor: builds the animation_t and registers the save implementation so anim%save(...) works directly (per README).

FuncAnimation fortplot_animation_core Function
gaussian_profile probability_animation_demo Function
generate_axis_ticks_internal fortplot_pdf_axes_tick_data Subroutine

Internal helper to generate axis tick positions and labels

generate_default_contour_levels fortplot_figure_grid_plot_registration Subroutine
generate_reference_image fortplot_imagemagick Subroutine
generate_scale_aware_tick_labels fortplot_tick_scales Subroutine

Generate tick labels based on scale type - common function for all backends

generate_spiral_seeds fortplot_streamline_placement Subroutine

Generate seed points in spiral pattern starting from boundary Implements matplotlib's _gen_starting_points algorithm

generate_streamlines fortplot_streamplot_core Subroutine

Generate streamlines using matplotlib-compatible algorithm

generate_tick_data fortplot_pdf_axes Subroutine

Generate tick positions and labels for axes

generate_x_axis_ticks fortplot_pdf_axes_tick_data Subroutine

Generate X axis tick positions and labels

generate_y_axis_ticks fortplot_pdf_axes_tick_data Subroutine

Generate Y axis tick positions and labels

get_active_axis fortplot_matplotlib_axes Function

Return the name of the currently active axes.

Read more…
get_actual_text_dimensions fortplot_legend_layout Function

Get actual text dimensions using text system measurements
Returns [width, height] in data coordinates

get_ascii_png_data fortplot_ascii_backend_support Subroutine

Get PNG data from ASCII backend (not supported)

get_axis_tick_positions fortplot_margins Subroutine

Generate tick mark positions for basic axes

get_backend_from_filename fortplot_utils Function

Determine backend type from file extension

Read more…
get_blend_char fortplot_ascii_utils Function
get_cache_hit_rate fortplot_color_parsing Function

Get cache hit rate for performance monitoring

get_char_density fortplot_ascii_utils Function
get_colormap_color fortplot_colormap Subroutine

Get RGB color from colormap for a normalized value [0,1]

get_contour_lines fortplot_contour_algorithms Subroutine

Extract contour lines from a cell using marching squares

get_default_marker fortplot_markers Function

Get default marker style

get_default_view_angles fortplot_projection Subroutine

Get default viewing angles matching matplotlib

get_error_message fortplot_errors Function

Get descriptive error message for status code

get_example_count fortplot_doc_processing Function
get_example_dir fortplot_doc_processing Subroutine
get_example_name fortplot_doc_processing Subroutine
get_example_run_target fortplot_doc_utils Subroutine
get_example_run_target fortplot_documentation Subroutine
get_figure_height fortplot_figure_accessors Function

Get figure height from state

get_figure_plot_count fortplot_figure_accessors Function

Get number of plots from state

get_figure_plots fortplot_figure_accessors Function

Get pointer to plots array

get_figure_rendered fortplot_figure_accessors Function

Get rendered state

get_figure_width fortplot_figure_accessors Function

Get figure width from state

get_figure_x_max fortplot_figure_accessors Function

Get x maximum value from state

get_figure_x_min fortplot_figure_accessors Function

Get x minimum value from state

get_figure_y_max fortplot_figure_accessors Function

Get y maximum value from state

get_figure_y_min fortplot_figure_accessors Function

Get y minimum value from state

get_file_extension fortplot_animation_validation Function
get_file_extension fortplot_doc_utils Function
get_font_ascent_ratio fortplot_text_fonts Function

Get font ascent ratio for baseline positioning

get_font_metrics fortplot_text_fonts Subroutine

Get font metrics in pixels for current font and scale

get_font_scale fortplot_text_fonts Function
get_font_scale_for_size fortplot_text_fonts Function

Get font scale for a specific pixel height

get_fortran_filename fortplot_doc_utils Subroutine
get_fortran_filename fortplot_documentation Subroutine
get_global_figure fortplot_matplotlib_session Function

Return the global figure pointer, initializing on demand

get_global_font fortplot_text_fonts Function
get_height_figure fortplot_figure_core_io_figure Function

Get figure height

get_label_from_encoding fortplot_spec_rendering_utils Function
get_legend_margins fortplot_legend_layout Function

Inset between the legend box and the axes frame. Matches matplotlib's borderaxespad default (0.5 * 10pt font = 5pt), which at the standard ~100 dpi is ~7 px, independent of the data range. A fixed pixel inset keeps the legend flush in the corner the way matplotlib draws it, instead of a large data-proportional gap.

get_line_pattern fortplot_line_styles Subroutine

Get line pattern array for a given style, in points. Single source of truth: the matplotlib default dash sequences. On/off lengths are in points; callers scale by line width (points) and convert to device units (see scale_pattern_to_pixels).

get_log_level fortplot_logging Function

Get the current global logging level Returns one of: LOG_LEVEL_SILENT, LOG_LEVEL_ERROR, LOG_LEVEL_WARNING, LOG_LEVEL_INFO, LOG_LEVEL_DEBUG

get_marker_size fortplot_markers Function

Get standardized marker size for given style Eliminates magic number duplication across backends

get_output_title fortplot_doc_utils Function
get_output_title fortplot_documentation Function
get_parent_directory fortplot_path_operations Function

Extract parent directory from a path

get_pattern_length fortplot_line_styles Function

Calculate total length of pattern cycle Following KISS principle - simple sum calculation

get_pie_autopct fortplot_ascii_legend Interface
get_pie_slice_marker_for_index fortplot_figure_legend_setup Function
get_plot_count_figure fortplot_figure_core_io_figure Function

Get number of plots

get_png_data fortplot_png Subroutine
get_rendered_figure fortplot_figure_core_io_figure Function

Get rendered state

get_subplot_plot_count fortplot_figure_subplots Function

Get the number of plots in a specific subplot

get_subplot_title fortplot_figure_subplots Function

Get the title for a specific subplot

get_temp_filename fortplot_system_viewer Subroutine

Generate unique temporary filename with proper platform handling

get_test_temp_dir fortplot_windows_test_helper Function

Get appropriate temporary directory for tests

get_text_bitmap_metrics fortplot_bitmap Subroutine

Get ascent/descent/height for a given pixel_height.

get_warning_count fortplot_validation_context Function
get_width_figure fortplot_figure_core_io_figure Function

Get figure width

get_windows_safe_tolerance fortplot_windows_test_helper Function

Get Windows-safe numerical tolerance

get_x_max_figure fortplot_figure_core_io_figure Function

Get x maximum value

get_x_min_figure fortplot_figure_core_io_figure Function

Get x minimum value

get_y_max_figure fortplot_figure_core_io_figure Function

Get y maximum value

get_y_min_figure fortplot_figure_core_io_figure Function

Get y minimum value

glyph_layer fortplot_ascii_axis_policy Function

Classify a character already present on the canvas into a layer so put_cell can resolve collisions without a parallel layer buffer.

grid fortplot_matplotlib_axes Subroutine

Toggle or style grid lines.

Read more…
grid_figure fortplot_figure_core_config Subroutine

Enable/disable and configure grid lines

group_media_files fortplot_doc_output Subroutine
handle_zero_range_ticks fortplot_pdf_axes_tick_data Subroutine

Handle ticks for zero or near-zero range data

has_graphical_session fortplot_system_viewer Function

Check if a graphical session is available Returns .true. if X11, Wayland, macOS GUI, or Windows GUI available

has_machine_precision_issues fortplot_coordinate_validation Function

Check if coordinates span too small a range to be reliably rendered. A collapsed axis (whole extent at machine-precision scale relative to the coordinate magnitude) cannot be distinguished after normalization. Individual coincident adjacent points, common near extrema of smooth curves, are normal and must not be flagged.

has_mathtext fortplot_text_layout Function

Check if text needs math layout. A matched '$...$' segment always enables math. Braced script markup ('^{...}' or '{...}') also enables math even without dollars so grouped exponents and subscripts render as scripts instead of leaking literal grouping braces. Bare unbraced '^'/'' outside dollars still render literally and are not math.

helv_width_units fortplot_pdf_text_metrics Function

Return Helvetica advance width in 1000-unit em for given codepoint

hist fortplot_matplotlib_hist_wrappers Interface
hist_figure fortplot_figure_histogram Subroutine

Add histogram to figure plots array (matplotlib-compatible).

Read more…
hist_impl fortplot_plot_statistics Subroutine

Add histogram (matplotlib-compatible).

histogram fortplot_matplotlib_hist_wrappers Interface
hlines fortplot_matplotlib_axes Subroutine

Draw one or more horizontal lines.

Read more…
imshow fortplot_matplotlib_plots Subroutine

Parameters z - image data. cmap - colormap name. alpha - opacity. vmin - lower color limit. vmax - upper color limit. origin - array origin keyword. extent - image extent. interpolation - interpolation mode. aspect - aspect keyword.

init_fixed_huffman_tables fortplot_zlib_compress Subroutine

Initialize fixed Huffman tables as per RFC 1951

init_line_plot_data fortplot_2d_plots Subroutine

Initialize basic line plot data

init_text_system fortplot_text_fonts Function

Initialize STB TrueType font system with robust font discovery

initialize_backend fortplot_utils Subroutine

Initialize the appropriate backend based on type

initialize_figure_state fortplot_figure_initialization Subroutine

Initialize figure state with specified parameters Added Issue #854: Parameter validation for user input safety Added DPI support for OO interface consistency with matplotlib interface

initialize_pdf_stream fortplot_pdf_core Subroutine
initialize_tick_arrays fortplot_pdf_axes_tick_data Subroutine

Initialize tick count and allocate arrays

initialize_warning_suppression fortplot_logging Subroutine

Initialize warning suppression based on environment variables Supports manual control and automatic CI detection

initialize_white_background fortplot_bitmap Subroutine
initialize_zlib_debug fortplot_zlib_checksums Subroutine

Initialize debug logging based on FORTPLOT_ZLIB_DEBUG environment variable

inside_polar_frame fortplot_polar_text_layout Function

True when the cell lies within the circular frame (elliptical in cell space because of the character aspect ratio).

interpolate_edge_crossings fortplot_contour_algorithms Subroutine

Interpolate the positions where contour crosses cell edges

interpolate_z_bilinear fortplot_interpolation Subroutine

Bilinear interpolation of Z value at world coordinates Refactored to be under 100 lines (QADS compliance)

ioff fortplot_matplotlib_session Subroutine

Disable interactive mode

ion fortplot_matplotlib_session Subroutine

Enable interactive mode for live terminal visualization

Read more…
ipart fortplot_raster_primitives Function

Integer part of floating-point number

Read more…
is_annotation_visible fortplot_annotation_coordinates Function

Check if annotation is visible within plot area

is_autopct_text fortplot_ascii_utils Function
is_backend_associated fortplot_figure_accessors Function

Check if backend is allocated

is_date_scale fortplot_axes_date Function
is_debug_enabled fortplot_os_detection Function
is_empty_array fortplot_coordinate_validation Function

Check if arrays are empty

is_error fortplot_errors Function

Check if status code indicates an error

is_finite_safe fortplot_parameter_validation Function
is_font_initialized fortplot_text_fonts Function
is_greek_letter_codepoint fortplot_unicode Function

Check if codepoint is a Greek letter

is_interactive_environment fortplot_figure_utilities Function

Determine if we're running in an interactive environment Returns false for CI, batch, or piped environments

is_legend_entry_text fortplot_ascii_utils Function
is_media_file fortplot_doc_output Function
is_nan_safe fortplot_parameter_validation Function
is_registered_legend_label fortplot_ascii_utils Function
is_safe_filename fortplot_animation_validation Function
is_supported_video_format fortplot_animation_validation Function
is_unicode_char fortplot_unicode Function

Check if a character is Unicode (multi-byte)

is_valid_color fortplot_color_parsing Function

Check if color string is valid without full parsing

is_valid_greek_command fortplot_latex_parser Function
is_valid_single_point fortplot_coordinate_validation Function

Check if arrays represent a valid single point

is_valid_text_color_mode fortplot_text_color Function

True when mode names one of the five canonical color modes.

is_warning_tracking_active fortplot_validation_context Function
is_warnings_suppressed fortplot_logging Function

Check if warnings are currently suppressed

is_windows fortplot_os_detection Function
json_to_spec fortplot_spec_json_parse Subroutine

Parse a Vega-Lite JSON string into spec_t

julian_day_from_unix_seconds fortplot_datetime Function
latex_to_unicode fortplot_latex_parser Subroutine
launch_system_viewer fortplot_system_viewer Subroutine

Launch system viewer for file Uses xdg-open on Linux, open on macOS, start on Windows

legend fortplot_matplotlib_axes Subroutine

Display the figure legend.

Read more…
legend_box_styling_example legend_demo Subroutine

Demonstrate legend box styling and multiple entries

legend_render fortplot_legend Subroutine

Render legend - delegates to drawing module

list_directory_entries fortplot_directory_listing Subroutine
load_font_system fortplot_annotation_layout Subroutine

Load font system from specified path

load_helvetica_font_file fortplot_pdf_objects Subroutine
log_debug fortplot_logging Subroutine

Log a debug message

log_error fortplot_errors Subroutine

Log error message to error unit

log_error fortplot_logging Subroutine

Log an error message

log_info fortplot_logging Subroutine

Log an informational message

log_scale_demo scale_examples Subroutine
log_warning fortplot_logging Subroutine

Log a warning message with suppression support Respects FORTPLOT_SUPPRESS_WARNINGS and CI environment detection

lowercase_string fortplot_doc_utils Function
map_grid_index_to_coord fortplot_streamplot_arrow_utils Function

Convert matplotlib-style grid index to data coordinate

map_projected_to_axes fortplot_projection Subroutine

Apply an aspect-preserving projection map to one projected point.

map_ticks_to_cells fortplot_ascii_axis_policy Subroutine

Map axis tick data values to integer screen cells along one axis. in_range flags the ticks that fall inside [cell_lo, cell_hi] and are therefore drawable; callers decide which are labeled.

map_unix_to_windows_path fortplot_path_operations Function

Map Unix-style /tmp paths to Windows-compatible paths

map_value_to_plot_x fortplot_raster_axes Function
map_value_to_plot_y fortplot_raster_axes Function
marker_size_scale fortplot_markers Function

Linear radius scale factor for a matplotlib scatter area s. s is an area (points^2); radius scales with sqrt(s). Normalized so that area == DEFAULT_SCATTER_AREA returns 1 (today's default size).

max_player_line_length fortplot_ascii_player Function
minorticks_on fortplot_matplotlib_axes Subroutine

Enable minor ticks on both axes.

mpl_default_config fortplot_spec_config_defaults Function

Return config_t matching matplotlib visual defaults.

multi_function_legend_example legend_demo Subroutine

Complex legend with multiple mathematical functions

multi_line_plot basic_plots Subroutine
new_active_edge fortplot_tt_scanline_fill Function
next_patch_color fortplot_figure_plot_management Function

Next colour from the patch cycle (scatter/fill/bar/histogram). matplotlib cycles patches independently of lines, so the first scatter or filled area is tab:blue even when a line was drawn before it, and a following line plot still starts at tab:blue. Counts existing patch artists rather than the global plot index.

next_plot_color fortplot_figure_plot_management Function

Next colour from the line cycle (plot/axhline/axvline). matplotlib advances the line property cycle only for line artists; scatter and contour draw from the patch/colormap path and never touch it. When the plots array is supplied, count existing line artists so an intervening scatter or contour does not skip a colour. Without it, fall back to the global plot index for callers that have no array in scope.

normalize_angle fortplot_polar Function

Normalize angle to [0, 2*pi) range

normalize_backend_name fortplot_utils Function

Normalize a user-facing backend name to its canonical identifier.

Read more…
normalize_path_separators fortplot_path_operations Function

Normalize path separators for the target platform

normalize_test_path fortplot_windows_test_helper Function

Normalize path for cross-platform compatibility

normalize_text_charset fortplot_ascii_drawing Function

Canonicalize a user charset selection to 'ascii' or 'unicode'. 'auto' resolves through the environment; anything unrecognized falls back to the ASCII compatibility charset.

normalize_text_color_mode fortplot_text_color Function

Canonicalize a user color-mode selection; unknown names fall back to 'never' so unexpected input can never leak escapes into output.

normalize_to_pdf_coords fortplot_pdf_coordinate Subroutine
only_pie_plots fortplot_figure_aspect Function

Check if every plot in the collection is a pie chart

open_ffmpeg_pipe fortplot_pipe Function
open_with_default_app_runtime fortplot_system_commands Subroutine
optional_logical fortplot_matplotlib_scatter_utils Function
output_to_file fortplot_ascii_rendering Subroutine
output_to_terminal fortplot_ascii_rendering Subroutine
pack_rgb fortplot_text_color Function

Pack an RGB triple (0..1) into a single 24-bit integer for the per-cell color buffer.

parse_autosize fortplot_spec_config_parse Subroutine

Parse autosize as a string or object (extracting type).

parse_axis fortplot_spec_json_channels Subroutine

Parse axis object

parse_boolean_env fortplot_string_utils Function

Case-insensitive parse for common boolean-ish strings.

parse_channel fortplot_spec_json_channels Subroutine

Parse a single encoding channel object

parse_color fortplot_color_parsing Subroutine

Parse matplotlib-compatible color string to RGB values [0,1]

parse_color_rgba fortplot_color_parsing Subroutine

Parse color string to RGBA values [0,1] including alpha channel

parse_colors_bulk fortplot_color_parsing Subroutine

Parse multiple colors efficiently

parse_config fortplot_spec_config_parse Subroutine
parse_config_axis fortplot_spec_config_axes Subroutine
parse_config_bar fortplot_spec_config_axes Subroutine
parse_config_legend fortplot_spec_config_styling Subroutine
parse_config_line fortplot_spec_config_axes Subroutine
parse_config_point fortplot_spec_config_axes Subroutine
parse_config_range fortplot_spec_config_styling Subroutine

Parse config.range object, extracting category colors.

parse_config_title fortplot_spec_config_styling Subroutine
parse_config_view fortplot_spec_config_axes Subroutine
parse_data fortplot_spec_json_data Subroutine

Parse data object: {"values": [{...}, ...]}

parse_domain fortplot_spec_json_channels Subroutine

Parse domain array [min, max]

parse_encoding fortplot_spec_json_channels Subroutine

Parse encoding object with named channels

parse_field_plot fortplot_spec_json_data Subroutine
parse_format_string fortplot_format_parser Subroutine
parse_frame_header fortplot_ascii_player Function

Recognize lines of the form "=== Frame ===" and return N.

parse_layers fortplot_spec_json_data Subroutine

Parse layer array

parse_mark fortplot_spec_json_channels Subroutine

Parse mark: either a string or an object

parse_mathtext fortplot_mathtext Function

Parse mathematical text into renderable elements

parse_one_layer fortplot_spec_json_data Subroutine

Parse a single layer object

parse_padding fortplot_spec_config_parse Subroutine

Parse padding as integer object or single integer.

parse_path_segments fortplot_path_operations Subroutine

Parse a path into directory segments

parse_real_array fortplot_spec_json_channels Subroutine
parse_row fortplot_spec_json_data Subroutine

Parse one row object and store values into data columns

parse_scale fortplot_spec_json_channels Subroutine

Parse scale object

parse_supported_domain fortplot_spec_json_channels Subroutine

Parse only numeric domains and skip categorical domains.

parse_values_array fortplot_spec_json_data Subroutine

Parse row-oriented data: [{"x":1,"y":2}, ...] Two-pass: first count rows and discover columns, then parse values.

pause fortplot_matplotlib_session Subroutine

Draw the current figure and pause for specified duration

Read more…
pcolormesh fortplot_matplotlib_mesh_wrappers Subroutine

Draw a pseudocolor mesh (matplotlib-compatible)

Read more…
pdf_extract_rgb_data fortplot_pdf_coordinate Subroutine
pdf_get_height_scale fortplot_pdf_coordinate Function

Get height scale in drawing units per data unit.

pdf_get_png_data fortplot_pdf_coordinate Subroutine
pdf_get_width_scale fortplot_pdf_coordinate Function

Get width scale in drawing units per data unit.

pdf_next_token fortplot_test_pdf_tokenizer Subroutine
pdf_prepare_3d_data fortplot_pdf_coordinate Subroutine
pdf_render_ylabel fortplot_pdf_coordinate Subroutine
pdf_set_marker_colors fortplot_pdf_markers Subroutine
pdf_set_marker_colors_with_alpha fortplot_pdf_markers Subroutine
pdf_stream_count_operator fortplot_test_pdf_tokenizer Function
pdf_stream_has_stroke_rgb fortplot_test_pdf_tokenizer Function
pick_fixed_step_seconds fortplot_axes_date Function
pie fortplot_matplotlib_plots Subroutine

Parameters values - wedge sizes. labels - wedge labels. colors - wedge colors. explode - wedge offsets. autopct - percentage label format. startangle - rotation angle in degrees.

play_ascii_animation fortplot_ascii_player Subroutine

Open a .txt animation and play frames at options%fps.

plot fortplot_matplotlib_plot_wrappers Subroutine

Plot x and y data with the active figure or subplot.

Read more…
png_validation_available fortplot_png_validation Function

Internal validation is always available.

polar fortplot_matplotlib_plots Interface
polar_to_cartesian fortplot_polar Subroutine

Convert single polar coordinate to Cartesian theta: angle in radians r: radius theta_offset: angular offset (default: 0, 0 at east) clockwise: if true, angles increase clockwise

polar_to_cartesian_arrays fortplot_polar Subroutine

Convert arrays of polar coordinates to Cartesian

polar_to_text_cell fortplot_polar_text_layout Subroutine

Map a polar sample to a canvas cell. r_max is the shared radial axis maximum so r == r_max lands on the circular boundary.

positioned_legend_example legend_demo Subroutine

Demonstrate different legend positions

prepare_ascii_3d_data fortplot_ascii_backend_support Subroutine

Prepare 3D data for ASCII backend (no-op - ASCII doesn't use 3D data)

prepare_colorbar_layout fortplot_figure_colorbar Subroutine
prepare_mathtext_if_needed fortplot_text_helpers Subroutine

Return trimmed text and leave math parsing decisions to explicit $...$ delimiters.

prepare_text_for_raster fortplot_text_helpers Subroutine

Run the full latex -> mathtext -> unicode pipeline for raster output.

preprocess_math_text fortplot_text_layout Subroutine

Escape '^'/'' outside math so they render literally, and pass the '$' delimiters through so the parser can toggle math mode (and tag math runs italic). Only content between '$...$' is treated as math, matching matplotlib: bare '^'/'' outside dollars stay literal. UTF-8 aware: multi-byte characters are copied as intact sequences

print_centered_title fortplot_ascii_utils Subroutine

Print centered title to terminal.

process_bar_plot_ranges fortplot_figure_data_ranges_specialized Subroutine

Process bar plot data to calculate axis ranges

process_boxplot_ranges fortplot_figure_data_ranges_specialized Subroutine

Process box plot data to calculate ranges

process_contour_plot_ranges fortplot_figure_data_ranges_specialized Subroutine

Process contour plot data to calculate ranges

process_errorbar_ranges fortplot_figure_data_ranges_specialized Subroutine

Process errorbar plot data to calculate ranges including error extents

process_example fortplot_doc_processing Subroutine
process_fill_between_ranges fortplot_figure_data_ranges_specialized Subroutine

Process fill_between data to calculate ranges

process_latex_in_text fortplot_latex_parser Subroutine

Convert LaTeX-style commands to Unicode while preserving math scopes UTF-8 aware: multi-byte characters are copied as intact sequences

process_line_plot_ranges fortplot_figure_data_ranges_specialized Subroutine

Process line plot data to calculate ranges

process_pcolormesh_ranges fortplot_figure_data_ranges_specialized Subroutine

Process pcolormesh plot data to calculate ranges

process_pie_ranges fortplot_figure_data_ranges_specialized Subroutine

Process pie chart slices to compute axis ranges

process_rotated_text_segments fortplot_pdf_text_segments Subroutine

Process text segments for rotated mixed font rendering

process_text_segments fortplot_pdf_text_segments Subroutine

Process text segments for mixed font rendering Groups consecutive glyphs for the same font into a single Tj to avoid odd intra-word spacing in some PDF viewers.

project_3d_samples_to_axes fortplot_3d_data_rendering Subroutine

Project 3D samples into the data window using a single shared scale that preserves the projected box aspect ratio (no independent x/y stretch). width_scale/height_scale are the backend pixel scales (pixels per data unit) used to keep the box aspect correct on screen.

project_3d_to_2d fortplot_projection Subroutine

Project 3D coordinates to 2D using orthographic projection.

Read more…
projected_box_metrics fortplot_projection Subroutine

Build the aspect-preserving projection map for one 3D axes box.

Read more…
pt2px fortplot_raster_core Function

Convert points (1/72 inch) to pixels at given DPI.

put_cell fortplot_ascii_axis_policy Subroutine

Write glyph into the canvas only when its layer is at least the layer of the glyph already occupying the cell (higher or equal layer wins).

quiver fortplot_matplotlib_vector_wrappers Interface
quiver_basic_validation fortplot_figure_quiver Function

Validate quiver input arrays have matching dimensions

quiver_figure fortplot_figure_quiver Subroutine

Add quiver plot to figure Creates discrete vector arrows at (x,y) positions with (u,v) directions

raster_calculate_legend_dimensions fortplot_raster_rendering Subroutine

Calculate legend dimensions for PNG using real text metrics (pixels)

raster_calculate_legend_position fortplot_raster_rendering Subroutine

Calculate standard legend position for PNG using plot coordinates

raster_draw_axes_and_labels fortplot_raster_axes Subroutine
raster_draw_axes_lines_and_ticks fortplot_raster_axes Subroutine
raster_draw_axis_labels fortplot_raster_labels Subroutine

Draw all axis labels (title, xlabel, ylabel)

raster_draw_axis_labels_only fortplot_raster_axes Subroutine
raster_draw_axis_labels_wrapper fortplot_raster_axes_custom Subroutine
raster_draw_secondary_x_axis_top fortplot_raster_axes_secondary Subroutine
raster_draw_secondary_y_axis fortplot_raster_axes_secondary Subroutine
raster_draw_top_xlabel fortplot_raster_labels Subroutine

Render an xlabel centered above the plot area

raster_draw_x_axis_tick_labels_only fortplot_raster_ticks Subroutine
raster_draw_x_axis_tick_labels_only_custom fortplot_raster_axes_custom Subroutine
raster_draw_x_axis_tick_labels_only_top fortplot_raster_ticks_secondary Subroutine
raster_draw_x_axis_tick_labels_only_wrapper fortplot_raster_axes_custom Subroutine
raster_draw_x_axis_tick_marks_only fortplot_raster_ticks Subroutine
raster_draw_x_axis_tick_marks_only_top fortplot_raster_ticks_secondary Subroutine
raster_draw_x_axis_tick_marks_only_wrapper fortplot_raster_axes_custom Subroutine
raster_draw_x_axis_ticks fortplot_raster_ticks Subroutine
raster_draw_x_axis_ticks_top fortplot_raster_ticks_secondary Subroutine
raster_draw_x_axis_ticks_wrapper fortplot_raster_axes_custom Subroutine
raster_draw_x_minor_ticks fortplot_raster_ticks_secondary Subroutine
raster_draw_y_axis_tick_labels_only fortplot_raster_ticks Subroutine
raster_draw_y_axis_tick_labels_only_custom fortplot_raster_axes_custom Subroutine
raster_draw_y_axis_tick_labels_only_right fortplot_raster_ticks_secondary Subroutine
raster_draw_y_axis_tick_labels_only_wrapper fortplot_raster_axes_custom Subroutine
raster_draw_y_axis_tick_marks_only fortplot_raster_ticks Subroutine
raster_draw_y_axis_tick_marks_only_right fortplot_raster_ticks_secondary Subroutine
raster_draw_y_axis_tick_marks_only_wrapper fortplot_raster_axes_custom Subroutine
raster_draw_y_axis_ticks fortplot_raster_ticks Subroutine
raster_draw_y_axis_ticks_right fortplot_raster_ticks_secondary Subroutine
raster_draw_y_axis_ticks_wrapper fortplot_raster_axes_custom Subroutine
raster_draw_y_minor_ticks fortplot_raster_ticks_secondary Subroutine
raster_extract_rgb_data fortplot_raster_rendering Subroutine

Extract RGB data from PNG backend

raster_fill_heatmap fortplot_raster_rendering Subroutine

Fill contour plot using scanline method for pixel-by-pixel rendering

raster_fill_quad fortplot_raster_rendering Subroutine

Fill quadrilateral with current color

raster_get_png_data fortplot_raster_rendering Subroutine

Raster context doesn't generate PNG data - only PNG context does

raster_render_legend_specialized fortplot_raster_rendering Subroutine

Render legend using standard algorithm for PNG

raster_render_ylabel fortplot_raster_labels Subroutine

Render rotated ylabel to the left of y-axis

raster_render_ylabel_right fortplot_raster_labels Subroutine

Render rotated ylabel along the right side of the axis

raster_set_legend_border_width fortplot_raster_rendering Subroutine

Set thin border width for PNG legend

read_bool fortplot_spec_json_reader Subroutine

Read a JSON boolean (true/false)

read_file fortplot_spec_json_reader Subroutine

Read entire file into a single string

read_int fortplot_spec_json_reader Subroutine

Read a JSON integer

read_literal fortplot_spec_json_reader Subroutine

Read an arbitrary JSON value as a literal string. For strings returns the quoted content; for numbers, booleans, null returns the raw text.

read_real fortplot_spec_json_reader Subroutine

Read a JSON number as real(wp). Recognises JSON null and maps it to IEEE NaN.

read_stdin fortplot_spec_json_reader Subroutine

Read entire stdin into a single string

read_string fortplot_spec_json_reader Subroutine

Read a JSON quoted string, advancing pos past closing quote. Unescapes standard JSON escape sequences.

redraw_current_frame probability_animation_demo Subroutine
regenerate_pie_legend_for_backend fortplot_figure_render_steps Subroutine
register_legend_entry_helper fortplot_ascii_legend Interface
register_line_plot_data fortplot_figure_plot_management Subroutine
register_pcolormesh_plot_data fortplot_figure_grid_plot_registration Subroutine
remove_trailing_zeros fortplot_tick_formatting Subroutine

Remove trailing zeros from decimal representation

render_3d_front_frame fortplot_figure_rendering_pipeline Subroutine

Draw the front box spines after the data for the 3D case so they occlude curves and surfaces (global painter ordering, refs #1956). Raster, PDF, and ASCII backends all carry the projected 3D box so the near spines occlude the data on every backend (refs #2054).

render_3d_line_plot fortplot_3d_data_rendering Subroutine
render_3d_markers fortplot_3d_data_rendering Subroutine
render_all_plots fortplot_figure_plot_dispatch Subroutine

Render all plots in the figure

render_ascii_axes fortplot_ascii_backend_support Subroutine

Render axes for ASCII context (stub implementation)

render_ascii_grid fortplot_figure_rendering_pipeline Subroutine

Paint text-backend grid glyphs aligned to major ticks after the data series so the layer policy keeps data on top of the grid (issue

Read more…
render_ascii_legend fortplot_legend_drawing Subroutine

Render compact ASCII legend with style-specific handles

render_ascii_legend_specialized fortplot_ascii_legend Interface
render_ascii_ylabel fortplot_ascii_backend_support Subroutine

Render Y-axis label for ASCII backend (no-op - handled elsewhere)

render_axes_and_plots fortplot_figure_render_steps Subroutine
render_background_and_grid fortplot_figure_render_steps Subroutine
render_bar_plot fortplot_bar_rendering Subroutine

Render bar plots (vertical or horizontal) for the active backend

render_boxplot_plot fortplot_boxplot_rendering Subroutine

Render a single box plot (vertical or horizontal)

render_colorbar fortplot_figure_colorbar Subroutine
render_colorbar_with_state fortplot_figure_render_steps Subroutine
render_contour_plot fortplot_contour_rendering Subroutine

Render a contour plot

render_decorations fortplot_figure_render_steps Subroutine
render_errorbar_plot fortplot_errorbar_rendering Subroutine

Render error bars for a plot

render_field_plot_to_state fortplot_spec_field_rendering Subroutine
render_figure_annotations fortplot_annotation_rendering Subroutine

Render all annotations for the current figure

Read more…
render_figure_axes fortplot_figure_rendering_pipeline Subroutine

Render figure axes and labels For raster backends, split rendering to prevent label overlap issues

render_figure_axes_labels_only fortplot_figure_rendering_pipeline Subroutine

Render ONLY axis labels (for raster and PDF backends after plots are drawn)

render_figure_background fortplot_figure_rendering_pipeline Subroutine

Render figure background

render_figure_components fortplot_animation_rendering Subroutine
render_figure_impl fortplot_figure_core_io Subroutine

Main rendering pipeline implementation Fixed Issue #432: Always render axes/labels even with no plot data Fixed Issue #844: ASCII annotation functionality

render_fill_between_plot fortplot_mesh_rendering Subroutine

Render fill_between polygons as trapezoids

render_frame_to_png fortplot_animation_rendering Subroutine
render_grid_lines fortplot_figure_grid Subroutine

Render grid lines on the figure

render_histogram_plot fortplot_bar_rendering Subroutine

Render histogram bins as solid quads without outline seams between bins

render_labels_overlay fortplot_figure_render_steps Subroutine
render_line_plot fortplot_line_rendering Subroutine

Render a line plot with proper scaling and clipping

render_markers fortplot_marker_rendering Subroutine

Render markers for a plot

render_mathtext_element_pdf fortplot_pdf_mathtext_render Subroutine

Render a single mathematical text element in PDF

render_mixed_font_at_position fortplot_pdf_text_segments Subroutine

Render text with mixed fonts at specific position and size

render_mixed_text fortplot_pdf_axes_text Subroutine

Process LaTeX and render mixed-font text with mathtext support.

render_pcolormesh_plot fortplot_mesh_rendering Subroutine

Render a pcolormesh plot

render_pie_plot fortplot_pie_rendering Subroutine

Render pie slices using triangle fans per wedge

render_polar_angular_gridlines fortplot_polar_rendering Subroutine

Render angular gridlines (concentric circles)

render_polar_angular_ticks fortplot_polar_rendering Subroutine

Render angular tick labels around the polar plot boundary

render_polar_axes fortplot_figure_plot_renderers Subroutine

Render polar axes: circular boundary, radial spokes, angular circles, tick labels

render_polar_axes fortplot_polar_rendering_helpers Subroutine

Render polar axes: circular boundary, radial spokes, angular circles, tick labels

render_polar_boundary fortplot_polar_rendering Subroutine

Render circular boundary for polar plot

render_polar_data fortplot_polar_rendering Subroutine

Render polar data as connected line segments

render_polar_data_text fortplot_ascii_polar Subroutine

Composite one polar series onto the text canvas.

render_polar_examples polar_demo Subroutine
render_polar_plot_internal fortplot_figure_plot_renderers Subroutine

Render polar plot data within the coordinate system The plot stores pre-converted Cartesian coordinates in x/y arrays but we use polar_theta/polar_r for proper polar rendering

render_polar_plot_internal fortplot_polar_rendering_helpers Subroutine

Render polar plot data within the coordinate system The plot stores pre-converted Cartesian coordinates in x/y arrays but we use polar_theta/polar_r for proper polar rendering

render_polar_radial_gridlines fortplot_polar_rendering Subroutine

Render radial gridlines (spokes) from center to boundary

render_polar_radial_ticks fortplot_polar_rendering Subroutine

Render radial tick labels along a spoke, matching matplotlib's polar r-axis labels (e.g. 0.2, 0.4, ... at 22.5 degrees by default).

render_quiver_plot fortplot_figure_plot_renderers Subroutine

Render quiver plot (discrete vector arrows) Draws arrows at each (x,y) position with direction (u,v) Respects angles, pivot, alpha, and per-arrow c(:) color mapping.

render_refline_plot fortplot_vector_plot_helpers Subroutine

Render a reference line (horizontal or vertical) Reference lines store normalized coordinates for axis-spanning lines or actual data coordinates for hlines/vlines

render_refline_plot fortplot_figure_plot_renderers Subroutine

Render a reference line (horizontal or vertical) Reference lines store normalized coordinates for axis-spanning lines or actual data coordinates for hlines/vlines

render_rotated_mixed_text fortplot_pdf_axes_text Subroutine

Process LaTeX and render rotated mixed-font ylabel with mathtext support.

render_rotated_text_to_image fortplot_raster_text_rendering Subroutine

Render rotated text to PNG image using STB TrueType with UTF-8 support

render_solid_line fortplot_line_rendering Subroutine

Render a solid line connecting all points

render_spec_to_file fortplot_spec_rendering Subroutine
render_standard_legend fortplot_legend_drawing Subroutine

Render standard legend for PNG/PDF backends with improved sizing

render_streamplot_arrows fortplot_vector_plot_helpers Subroutine

Render queued streamplot arrows after plot lines are drawn. See fortplot_figure_plot_renderers for the canonical version; kept in sync so this helpers module stays a drop-in.

Read more…
render_streamplot_arrows fortplot_figure_plot_renderers Subroutine

Render queued streamplot arrows after plot lines are drawn. Uses draw_arrowhead (head-only glyph) so a normalized direction vector does not get scaled into a data-coord shaft like draw_arrow does for quiver.

Read more…
render_subplots fortplot_subplot_rendering Subroutine
render_surface_plot fortplot_surface_rendering Subroutine

Render a 3D surface plot using wireframe or filled representation

render_text_elements_to_canvas fortplot_ascii_utils Subroutine

Render stored text elements onto the ASCII canvas with Unicode-to-ASCII conversion

render_text_to_bitmap fortplot_bitmap Subroutine

Render text to RGB bitmap by using existing PNG rendering then converting

render_text_to_bitmap_with_size fortplot_bitmap Subroutine

Render text to an RGB bitmap using a given font size (pixel_height).

render_text_to_image fortplot_raster_text_rendering Subroutine

Render text to image using STB TrueType with UTF-8 support Supports mathematical notation with superscripts and subscripts

render_text_with_size fortplot_raster_text_rendering Subroutine

Render text with specific font size Supports mathematical notation with superscripts and subscripts

render_title_centered fortplot_raster_labels Subroutine

Render title centered above the plot area

render_title_centered_with_size fortplot_raster_labels Subroutine

Render title centered at specified position with custom font scale Used for suptitle rendering above subplots

render_title_only fortplot_figure_rendering_pipeline Subroutine

Render only the figure title without drawing axes

render_twin_labels fortplot_twin_axes_rendering Subroutine

Render labels for all backend types (raster, PDF, ASCII)

replace_extension fortplot_doc_utils Function
replace_stream_arrows fortplot_streamplot_arrow_utils Subroutine

Replace figure state stream arrows and manage rendered flag

report_status three_d_animation_demo Subroutine
reserve_label_cells fortplot_polar_text_layout Subroutine

Reserve a label footprint of span cells starting at (row, col) plus a halo border, so plotted data is kept clear of the label.

reset_ascii_legend_lines_helper fortplot_ascii_legend Interface
reset_figure_state fortplot_figure_initialization Subroutine

Reset figure state to initial values

reset_pattern_distance fortplot_raster_line_styles Subroutine

Reset pattern distance to start of pattern

reset_warning_tracking fortplot_validation_context Subroutine
resolve_best_legend_position fortplot_legend_best Subroutine

If the legend is in 'best' mode, pick the lowest-overlap corner and pin the legend to it. Coordinates passed to the scorer are relative to the data window origin (x_min, y_min), matching the layout module.

resolve_cmap_alias fortplot_matplotlib_mesh_wrappers Subroutine

Resolve matplotlib-canonical cmap against legacy colormap alias

resolve_color_string_or_rgb fortplot_matplotlib_color_utils Subroutine

Merge string/RGB color inputs into a single RGB triple.

Read more…
resolve_colorbar_mappable fortplot_figure_colorbar Subroutine
resolve_plot_colorbar_request fortplot_figure_render_steps Subroutine
resolve_sequence_to_rgb fortplot_matplotlib_color_utils Subroutine

Parse an array of color strings into a 3xN RGB matrix.

Read more…
resolve_text_charset_from_environment fortplot_ascii_drawing Function

Resolve 'auto' deterministically from FORTPLOT_TEXT_CHARSET. Absent or unset, the file default stays ASCII so saved .txt bytes are stable and never depend on the host locale (issue #2060 non-goal).

resolve_text_color_mode_file fortplot_text_color Function

Resolve the color mode for file output. Saved files must stay reproducible, so 'auto' always resolves to 'never'; explicit modes are honored because the caller asked for them.

resolve_text_color_mode_terminal fortplot_text_color Function

Resolve the color mode for interactive terminal output. Explicit modes are honored; 'auto' is resolved from the environment and a stdout TTY probe.

resolve_tick_font_px fortplot_raster_ticks Function
rfpart fortplot_raster_primitives Function

Reverse fractional part (1 - fractional part)

Read more…
rgb_to_hsv fortplot_color_conversions Subroutine

Convert RGB to HSV color space

rgb_to_lab fortplot_color_conversions Subroutine

Convert RGB to LAB color space (simplified implementation)

rotate_bitmap_90_ccw fortplot_bitmap Subroutine

Rotate bitmap 90 degrees counter-clockwise For arrays: (i,j) maps to (height-j+1, i) with swapped dimensions

rotate_bitmap_90_cw fortplot_bitmap Subroutine

Rotate bitmap 90 degrees clockwise For arrays: (i,j) maps to (j, width-i+1) with swapped dimensions

rotate_bitmap_about_anchor fortplot_bitmap Subroutine

Rotate an RGB bitmap around an anchor point, returning the rotated bitmap and the anchor location in the destination bitmap.

Read more…
rotate_view three_d_animation_demo Subroutine
run_text_player_cli fortplot_text_player_cli Subroutine

Parse arguments and play a .txt text-backend animation.

Read more…
safe_coordinate_transform fortplot_pdf_coordinate Subroutine

Safe coordinate transformation using independent x/y scales

sanitize_ascii_text fortplot_ascii_mathtext Subroutine

Produce an ASCII-safe version of input suitable for placement onto the canvas: LaTeX commands become Unicode (or ASCII words), math delimiters and mathtext braces are stripped, and any remaining Unicode symbols are transliterated.

save_animation fortplot_animation Subroutine
save_animation_full fortplot_animation_pipeline Subroutine
save_animation_with_error_handling save_animation_demo Subroutine
save_animation_with_pipeline fortplot_animation_pipeline Subroutine
save_ascii_with_status fortplot_figure_io Subroutine

Save ASCII file with status reporting

save_backend_with_status fortplot_figure_io Subroutine

Save the figure with appropriate backend based on file extension

save_pdf_with_status fortplot_figure_io Subroutine

Save PDF file with status reporting

save_png_with_status fortplot_figure_io Subroutine

Save PNG file with status reporting

save_svg_with_status fortplot_figure_io Subroutine

Save SVG file with status reporting

savefig fortplot_matplotlib_session Subroutine

Save the current figure.

Read more…
savefig_figure fortplot_figure_core_io Subroutine

Save figure to file (backward compatibility version)

savefig_with_status fortplot_matplotlib_session Subroutine

Save the figure and return a status code.

Read more…
savefig_with_status_figure fortplot_figure_core_io Subroutine

Save figure to file with error status reporting Added Issue #854: File path validation for user input safety

scale_pattern_to_pixels fortplot_line_styles Subroutine

Scale a point-based pattern in place to device pixels, matching matplotlib: multiply each on/off length (points) by the line width (points), then convert points to pixels via px = pt * dpi / 72. The solid sentinel is left untouched.

scale_px fortplot_raster_core Function

Scale a pixel value from reference DPI (100) to target DPI. At REFERENCE_DPI the value is unchanged.

scan_directory_for_media fortplot_doc_output Subroutine
scan_row_fields fortplot_spec_json_data Subroutine

Scan one row object to discover field names and types. Advances pos past the entire row object.

scatter fortplot_matplotlib_scatter Interface
scatter_2d_dispatch fortplot_matplotlib_scatter_dispatch Subroutine
scatter_3d_dispatch fortplot_matplotlib_scatter_dispatch Subroutine
scatter_3d_string_dispatch fortplot_matplotlib_scatter_dispatch Subroutine
select_font_family fortplot_annotation_layout Subroutine

Select font family with fallback mechanism

serialize_config fortplot_spec_config_json Function
serialize_field_plot fortplot_spec_json_field_plot Function
serialize_padding fortplot_spec_config_json Function
set_ascii_legend_border_width fortplot_ascii_legend Interface
set_backend_color fortplot_figure_accessors Subroutine

Set backend color

set_braille_pixel fortplot_braille Subroutine

Turn on the subpixel dot at absolute subpixel coordinates (x_sub in [0, sub_w), y_sub in [0, sub_h)). Coordinates outside the canvas are ignored, so callers never corrupt an out-of-range cell.

set_figure_labels fortplot_figure_configuration Subroutine

Set figure labels

set_figure_limits fortplot_figure_configuration Subroutine

Set axis limits

set_figure_rendered fortplot_figure_accessors Subroutine

Set rendered state

set_figure_scales fortplot_figure_configuration Subroutine

Set axis scale types

set_fixed_limits three_d_animation_demo Subroutine

Pin the axis box so autoscale does not refit between frames.

set_legend_position_from_orient fortplot_spec_config_apply Subroutine

Single source of truth for orient string -> position int.

set_line_plot_properties fortplot_2d_plots Subroutine

Set line plot properties (style, color, etc.) Extracted from add_line_plot_data for QADS compliance

set_line_width fortplot_matplotlib_axes Subroutine

Set the default line width for subsequent plots.

Read more…
set_line_width_figure fortplot_figure_core_config Subroutine

Set line width for subsequent plots

set_log_level fortplot_logging Subroutine

Set the global logging level with input validation

Read more…
set_preferred_font fortplot_text_fonts Subroutine

Set preferred font and reinitialize if needed. Call before rendering to switch fonts for a style mode.

set_raster_line_style fortplot_raster_line_styles Subroutine

Set line style pattern for raster

set_rendered_figure fortplot_figure_core_io_figure Subroutine

Set rendered state

set_subplot_title fortplot_figure_subplots Subroutine

Set the title for a specific subplot

set_subplot_xlabel fortplot_figure_subplots Subroutine

Set the x-axis label for a specific subplot

set_subplot_ylabel fortplot_figure_subplots Subroutine

Set the y-axis label for a specific subplot

set_text_charset fortplot_matplotlib_axes Subroutine
set_text_color_mode fortplot_matplotlib_axes Subroutine
set_title_figure fortplot_figure_core_config Subroutine

Set figure title

set_view_figure fortplot_figure_core_config Subroutine

Set the 3D view angles (degrees) and optional camera distance. Mirrors matplotlib's Axes3D.view_init(elev, azim).

set_xaxis_date_format_figure fortplot_figure_core_config Subroutine
set_xlabel_figure fortplot_figure_core_config Subroutine

Set x-axis label

set_xlim_figure fortplot_figure_core_config Subroutine

Set x-axis limits

set_xscale fortplot_matplotlib_axes Subroutine

Set the x-axis scale.

Read more…
set_xscale_figure fortplot_figure_core_config Subroutine

Set x-axis scale type

set_xticks fortplot_matplotlib_axes Subroutine

Set custom x-axis tick positions and optional labels.

Read more…
set_yaxis_date_format_figure fortplot_figure_core_config Subroutine
set_ydata fortplot_matplotlib_axes Subroutine

Replace the y-data of the first plot line.

Read more…
set_ylabel_figure fortplot_figure_core_config Subroutine

Set y-axis label

set_ylim_figure fortplot_figure_core_config Subroutine

Set y-axis limits

set_yscale fortplot_matplotlib_axes Subroutine

Set the y-axis scale.

Read more…
set_yscale_figure fortplot_figure_core_config Subroutine

Set y-axis scale type

set_yticks fortplot_matplotlib_axes Subroutine

Set custom y-axis tick positions and optional labels.

Read more…
setup_axes_data_ranges fortplot_pdf_axes Subroutine

Set up data ranges for axes with optional log scaling

setup_canvas fortplot_context Subroutine
setup_coordinate_system fortplot_figure_rendering_pipeline Subroutine

Setup the coordinate system for rendering The transformed bounds passed here already include any autoscale margin from calculate_figure_data_ranges, so this routine just hands them to the backend.

setup_figure_backend fortplot_figure_configuration Subroutine

Setup or change the figure backend

setup_figure_legend fortplot_figure_legend_setup Subroutine
setup_figure_png_backend_for_animation fortplot_figure_animation Subroutine

Setup PNG backend for animation (temporary method)

setup_png_backend_for_animation_figure fortplot_figure_core_io_figure Subroutine

Setup PNG backend for animation (temporary method)

setup_png_for_animation fortplot_figure_accessors Subroutine

Setup PNG backend for animation

setup_streamplot_parameters fortplot_streamplot_core Subroutine

Setup and validate streamplot parameters (validation logic only)

setup_twin_axes_state fortplot_twin_axes_rendering Subroutine

Setup local state for twin axes configuration

sgr_foreground fortplot_text_color Function

SGR foreground escape for the given color mode and RGB (0..1). Returns an empty string for 'never'/unknown modes.

sgr_reset fortplot_text_color Function

The SGR reset escape emitted after a colored span and before every newline or frame boundary.

should_draw_at_distance fortplot_line_styles Function

Determine if line should be drawn at given distance in pattern Following SRP - handles only pattern position logic

show fortplot_matplotlib_advanced Interface
show_data fortplot_matplotlib_session Subroutine

Show a line plot and optionally apply labels before displaying it.

Read more…
show_figure fortplot_matplotlib_session Subroutine

Display the current figure.

Read more…
show_figure fortplot_figure_core_io Subroutine

Display the figure

show_spec fortplot_spec_rendering Subroutine
show_viewer fortplot_matplotlib_session Subroutine

Launch the system image viewer for the current figure.

Read more…
simple_plots basic_plots Subroutine
skip_test_on_windows_ci fortplot_windows_test_helper Function

Check if test should be skipped on Windows CI

skip_value fortplot_spec_json_reader Subroutine

Skip an arbitrary JSON value (string, number, bool, null, object, or array) without storing it.

skip_ws fortplot_spec_json_reader Subroutine

Skip whitespace characters

smooth_contour_chain fortplot_contour_algorithms Subroutine

Smooth a polyline using Catmull-Rom spline interpolation

sort_array fortplot_utils_sort Subroutine

Simple bubble sort for small arrays (sufficient for boxplot quartiles)

sort_edges fortplot_tt_edge_sort Subroutine

Sort edges by y0 ascending. Quicksort + insertion sort.

sort_edges_ins_sort fortplot_tt_edge_sort Subroutine
sort_edges_quicksort fortplot_tt_edge_sort Subroutine
sort_media_groups fortplot_doc_output Subroutine
sort_string_array fortplot_doc_output Subroutine
spec_savefig fortplot_spec_builder Subroutine
spec_target_is_json fortplot_spec_rendering Function
spec_to_json fortplot_spec_json Function

Serialize spec_t to a Vega-Lite JSON string

spec_to_json_file fortplot_spec_json Subroutine

Write spec_t as Vega-Lite JSON to a file

stem fortplot_matplotlib_plots Subroutine

Parameters x - stem positions. y - stem heights. linefmt - line format. markerfmt - marker format. basefmt - base format. label - legend label. bottom - baseline value.

step fortplot_matplotlib_plots Interface
store_scatter_style_arrays fortplot_matplotlib_scatter_utils Subroutine
store_text_element fortplot_ascii_text_elements Subroutine

Store a pre-processed text element for later ASCII rendering

stream_pos0 fortplot_pdf_stream Function

Get current 0-based byte offset in a stream file.

streamplot fortplot_matplotlib_vector_wrappers Subroutine

Draw streamlines for a vector field.

Read more…
streamplot_basic_validation fortplot_figure_streamlines Function

Basic validation for streamplot inputs

streamplot_figure fortplot_figure_streamlines Subroutine

Add streamline plot to figure - direct streamline generation Streamplot draws arrowheads along streamlines (not full trajectory lines). Arrow rendering happens in render_axes_and_plots after all plots.

streamplot_impl fortplot_plotting_advanced Subroutine

Add streamlines for vector field

streamplot_matplotlib fortplot_streamplot_matplotlib Subroutine

Matplotlib-compatible streamplot implementation Based on matplotlib streamplot.py (not a line-for-line port)

strip_ansi_escapes fortplot_ascii_player Function

Remove ANSI CSI escape sequences (ESC [ ... final-byte) from a line.

subplot fortplot_matplotlib_session Subroutine

Select a subplot in an nrows by ncols grid.

Read more…
subplots fortplot_matplotlib_session Subroutine

Initialize a subplot grid.

Read more…
subplots_grid fortplot_matplotlib_session Function

Create a subplot grid and return axis indices in row-major order.

Read more…
subsample_ticks fortplot_pdf_axes_tick_data Subroutine

Subsample ticks in transformed coordinate space for proportional visual spacing.

suggest_marker_for_single_point fortplot_coordinate_validation Function

Suggest appropriate marker type for single point based on backend

suptitle fortplot_matplotlib_axes Subroutine

Set a centered figure-level title above all subplots.

Read more…
svg_add_to_stream fortplot_svg_draw Subroutine
svg_calc_legend_dims_impl fortplot_svg_legend Subroutine
svg_calc_legend_pos_impl fortplot_svg_legend Subroutine
svg_draw_arrow_impl fortplot_svg_draw Subroutine
svg_draw_arrowhead_impl fortplot_svg_draw Subroutine

Streamplot arrowhead glyph at (x, y); no shaft. (dx, dy) is a unit direction in data coords; only its angle matters for the head.

svg_draw_axes_labels_impl fortplot_svg_axes Subroutine
svg_draw_line_impl fortplot_svg_draw Subroutine
svg_draw_marker_impl fortplot_svg_markers Subroutine
svg_fill_heatmap_impl fortplot_svg_draw Subroutine
svg_fill_quad_impl fortplot_svg_draw Subroutine
svg_render_legend_impl fortplot_svg_legend Subroutine
svg_render_ylabel_impl fortplot_svg_axes Subroutine
svg_set_legend_border_impl fortplot_svg_legend Subroutine
svg_write_file_impl fortplot_svg_draw Subroutine
switch_to_helvetica_font fortplot_pdf_text_segments Subroutine
switch_to_symbol_font fortplot_pdf_text_segments Subroutine
symlog_scale_demo scale_examples Subroutine
test_cleanup_all fortplot_test_helpers Subroutine

Clean up all registered files and the test directory.

test_cleanup_file fortplot_test_helpers Subroutine

Clean up a specific test file

test_get_temp_path fortplot_test_helpers Function

Get a temporary file path for a test artifact.

test_get_unique_suffix fortplot_test_helpers Function

Generate reliable unique suffix combining multiple entropy sources

test_initialize_environment fortplot_test_helpers Subroutine

Initialize test environment with specific name

test_initialize_figure fortplot_test_helpers Subroutine

Initialize figure for testing (ensures temp directory exists)

test_register_file fortplot_test_helpers Subroutine

Register a file for automatic cleanup

test_savefig fortplot_test_helpers Subroutine

Save figure to temporary directory with automatic registration

text fortplot_text_stub Subroutine

Add text annotation to the current figure

Read more…
text_frame_line fortplot_ascii_drawing Function

Build the top or bottom frame border for the given charset. In ASCII mode this reproduces the historical '+' // '-'*width // '+' border.

tight_layout fortplot_matplotlib_axes Subroutine

Automatically adjust subplot parameters to give specified padding.

Read more…
title fortplot_matplotlib_axes Subroutine

Set the title for the current axes.

Read more…
title_case fortplot_doc_utils Function
to_lowercase fortplot_string_utils Function

Convert string to lowercase (ASCII A-Z)

to_lowercase fortplot_color_definitions Subroutine

Convert string to lowercase in-place

to_lowercase_char fortplot_color_definitions Subroutine

Convert single character to lowercase

trace_contour_level fortplot_contour_tracing Subroutine

Trace a single contour level with smoothing

transform_annotation_coordinates fortplot_annotation_coordinates Interface
transform_annotation_coordinates_log fortplot_annotation_coordinates Subroutine

Transform annotation coordinates with logarithmic scaling support

transform_x_coordinate fortplot_scales Function

Transform data x-coordinate to screen coordinate

Read more…
transform_y_coordinate fortplot_scales Function

Transform data y-coordinate to screen coordinate

Read more…
translate_text_cell fortplot_ascii_drawing Function

Map a single canvas byte to its charset glyph. Only structural, marker, and arrow symbols are remapped; digits, letters, '.', '-', and '+' pass through so numeric tick labels and text annotations survive Unicode output unchanged.

try_system_mkdir fortplot_system_commands Subroutine
tt_byte fortplot_tt_binary Function

Read one unsigned byte (0..255) at a 0-based offset.

tt_find_glyph_index fortplot_tt_cmap Function

Look up the glyph index for a Unicode codepoint in a cmap subtable. Returns 0 when the codepoint is not covered by the subtable.

tt_find_table fortplot_tt_tables Function

Find a table by its 4-byte tag in the table directory. Returns the table byte offset, or 0 if not found.

tt_flatten_curves fortplot_tt_curves Subroutine

Convert glyph vertex array to flattened point arrays with contour info. Uses a two-pass algorithm: pass 1 counts points, pass 2 fills them. Port of stbtt_FlattenCurves (stb_truetype.h lines 3618-3693).

tt_get_font_offset_for_index fortplot_tt_tables Function

Get font byte offset for a given index in a TTC collection. For a standalone font, index 0 returns 0. Returns -1 if the index is out of range or data is invalid.

tt_get_font_vmetrics fortplot_tt_metrics Subroutine

Read vertical font metrics (unscaled) from the hhea table.

tt_get_glyf_offset fortplot_tt_metrics Function

Get byte offset to a glyph in the glyf table. Returns -1 for empty glyphs or invalid indices.

tt_get_glyph_bitmap_box fortplot_tt_metrics Subroutine

Get bitmap bounding box in pixel coordinates (y-flipped).

tt_get_glyph_box fortplot_tt_metrics Subroutine

Get bounding box of a glyph in unscaled font coordinates.

tt_get_glyph_hmetrics fortplot_tt_metrics Subroutine

Read horizontal metrics for a glyph (unscaled) from the hmtx table. Glyphs beyond numOfLongHorMetrics share the last advance width.

tt_get_glyph_shape fortplot_tt_outlines Subroutine

Extract glyph outline as an array of move/line/curve vertices. Handles simple glyphs (numberOfContours > 0) and composite glyphs (numberOfContours < 0) with recursive component resolution.

tt_init_font_tables fortplot_tt_tables Subroutine

Initialize a TrueType font by locating all required tables and the cmap encoding subtable. Sets success=.false. if required tables are missing, no glyf table is present (CFF not supported), or no usable cmap encoding is found.

tt_is_font fortplot_tt_tables Function

Check if data at offset contains a valid TrueType/OpenType signature. Recognizes: 00-01-00-00 (standard), "true", "typ1", "OTTO".

tt_load_file fortplot_tt_binary Function

Load entire file into a byte array via stream I/O.

tt_rasterize fortplot_tt_rasterizer Subroutine

Rasterize tessellated glyph outlines into an 8-bit bitmap.

tt_scale_for_pixel_height fortplot_tt_metrics Function

Compute scale factor to achieve a desired pixel height. Uses ascent - descent from the hhea table.

tt_set_vertex fortplot_tt_outlines Function

Construct a vertex with the given type and coordinates.

tt_short fortplot_tt_binary Function

Read big-endian signed 16-bit integer (-32768..32767).

tt_tag_match fortplot_tt_binary Function

Compare 4 bytes at offset to a character tag (e.g. "cmap", "head").

tt_ulong fortplot_tt_binary Function

Read big-endian unsigned 32-bit integer via bit operations.

tt_ushort fortplot_tt_binary Function

Read big-endian unsigned 16-bit integer (0..65535).

twinx fortplot_matplotlib_plots Subroutine

Parameters None.

twiny fortplot_matplotlib_plots Subroutine

Parameters None.

twiny_top_offset_px fortplot_layout Function

Extra image pixels to push the plot-area top edge down for a twiny (top x-axis), beyond the default top margin.

Read more…
unicode_codepoint_to_ascii fortplot_unicode Subroutine

Convert Unicode codepoint to ASCII equivalent

unicode_codepoint_to_pdf_escape fortplot_pdf_text_escape Subroutine

Convert Unicode codepoint to PDF escape sequence

unicode_glyphs fortplot_ascii_drawing Function

Unicode charset table: box-drawing frame glyphs plus Unicode markers and arrows. Only bytes that never occur in numeric tick labels or letters are remapped, so labels and annotations stay intact.

unicode_to_symbol_char fortplot_pdf_text_escape Subroutine

Convert Unicode codepoint to Symbol font character

uniform_edgecolor fortplot_matplotlib_scatter_utils Subroutine
unix_seconds_from_julian_day fortplot_datetime Function
unix_seconds_to_datetime fortplot_datetime Function
unpack_rgb fortplot_text_color Subroutine

Inverse of pack_rgb; returns channels in 0..1.

update_boxplot_ranges fortplot_figure_boxplot Subroutine

Update data ranges based on boxplot statistics

update_data_ranges_boxplot_figure fortplot_figure_core_ranges Subroutine

Update data ranges after adding boxplot

update_data_ranges_figure fortplot_figure_core_ranges Subroutine

Update data ranges based on current plot Routes to primary, twinx, or twiny ranges depending on the axis tag of the plot at plot_count.

update_data_ranges_pcolormesh_figure fortplot_figure_core_ranges Subroutine

Update data ranges after adding pcolormesh plot

update_figure_data_ranges_boxplot fortplot_figure_ranges Subroutine

Update data ranges after adding boxplot - delegate to specialized module

update_figure_data_ranges_pcolormesh fortplot_figure_ranges Subroutine

Update data ranges after adding pcolormesh plot

update_gaussian probability_animation_demo Subroutine
update_plot_ydata fortplot_figure_plot_management Subroutine
update_wave save_animation_demo Subroutine
use_axis fortplot_matplotlib_axes Subroutine

Switch the active axes by name.

Read more…
use_system_mkdir_ci fortplot_system_commands Subroutine
utf8_char_length fortplot_unicode Function

Determine the number of bytes in a UTF-8 character

utf8_to_codepoint fortplot_unicode Function

Convert UTF-8 sequence to Unicode codepoint

validate_annotation fortplot_annotation_types Subroutine

Comprehensive annotation validation combining coordinate and parameter checks

validate_annotation_coordinates fortplot_annotation_types Subroutine

Validate annotation coordinate values

validate_annotation_parameters fortplot_annotation_types Subroutine

Validate annotation parameter values

validate_array_bounds fortplot_parameter_validation Function
validate_ascii_format fortplot_validation Function
validate_color_for_backend fortplot_color_parsing Function

Validate color for specific backend constraints

validate_color_values fortplot_validation_core Function
validate_colormap_name fortplot_colormap Function

Validate if colormap name is supported

validate_coordinate_arrays fortplot_coordinate_validation Function

Comprehensive validation of coordinate arrays for plotting Returns validation result with detailed information about the data

validate_coordinate_ranges fortplot_coordinate_validation Function

Validate that coordinate values are finite and reasonable

validate_file_exists fortplot_validation Function
validate_file_path fortplot_validation_core Function
validate_file_size fortplot_validation Function
validate_generated_video fortplot_animation_validation Function
validate_generated_video_enhanced fortplot_animation_validation Function
validate_marker_style fortplot_markers Function

Validate if marker style is supported

validate_numeric_parameters fortplot_parameter_validation Function
validate_pcolormesh_grid fortplot_pcolormesh Subroutine

Validate grid dimensions for pcolormesh with flexible dimension support

Read more…
validate_pdf_format fortplot_validation Function
validate_plot_data fortplot_figure_plot_management Subroutine
validate_plot_dimensions fortplot_validation_core Function
validate_plot_dimensions_with_context fortplot_validation_core Function
validate_png_file fortplot_png_validation Subroutine

Validate PNG file using internal signature checks (secure)

validate_png_format fortplot_validation Function
validate_streamplot_arrow_parameters fortplot_streamplot_arrow_utils Subroutine

Validate arrow size and style inputs (matplotlib compatible)

validate_text_parameters fortplot_annotation_layout Subroutine

Alias for validate_annotation_parameters for API compatibility

validate_typography_parameters fortplot_annotation_layout Subroutine

Validate typography-specific parameters with normalization support

validation_error fortplot_validation_context Subroutine
validation_error_with_context fortplot_validation_context Subroutine
validation_warning fortplot_validation_context Subroutine
validation_warning_with_context fortplot_validation_context Subroutine
vegalite_default_config fortplot_spec_config_defaults Function

Return config_t matching Vega-Lite visual defaults.

view_init fortplot_matplotlib_axes Subroutine

Set the 3D view angles in degrees.

Read more…
vl_area fortplot_spec_builder Function
vl_bar fortplot_spec_builder Function
vl_channel fortplot_spec_builder Function
vl_layer_add fortplot_spec_builder Subroutine
vl_line fortplot_spec_builder Function
vl_point fortplot_spec_builder Function
vlines fortplot_matplotlib_axes Subroutine

Draw one or more vertical lines.

Read more…
wait_for_user_input fortplot_figure_utilities Subroutine

Wait for user input when blocking=true Reads a single character or line from stdin to pause execution This prevents the program from continuing until user interaction

write_binary_to_unit fortplot_pdf_stream Subroutine

Write binary string to unit using exact length (no trimming)

write_catalog_object fortplot_pdf_objects Subroutine

Write PDF catalog object

write_centered_title fortplot_ascii_utils Subroutine

Write centered title to file.

write_content_object fortplot_pdf_objects Subroutine

Write PDF content stream object

write_extgstate_object fortplot_pdf_objects Subroutine
write_generated_outputs fortplot_doc_output Subroutine
write_helvetica_font_descriptor_object fortplot_pdf_objects Subroutine
write_helvetica_font_file_object fortplot_pdf_objects Subroutine
write_helvetica_font_object fortplot_pdf_objects Subroutine

Write Helvetica font object

write_image_object fortplot_pdf_objects Subroutine
write_info_object fortplot_pdf_objects Subroutine
write_media_group fortplot_doc_output Subroutine
write_null_object fortplot_pdf_objects Subroutine
write_output_section fortplot_doc_output Subroutine
write_page_object fortplot_pdf_objects Subroutine

Write PDF page object

write_pages_object fortplot_pdf_objects Subroutine

Write PDF pages object

write_pdf_file fortplot_pdf_io Subroutine

Write PDF context to file

write_pdf_line fortplot_pdf_stream Subroutine

Write a single PDF line terminated by CRLF.

write_png_file fortplot_png Subroutine
write_png_to_pipe fortplot_pipe Function
write_string_to_unit fortplot_pdf_stream Subroutine

Write string to unit, handling long strings properly

write_symbol_font_object fortplot_pdf_objects Subroutine

Write Symbol font object

xlabel fortplot_matplotlib_axes Subroutine

Set the x-axis label text.

Read more…
xlim fortplot_matplotlib_axes Subroutine

Set the x-axis display limits.

Read more…
xscale fortplot_matplotlib_axes Subroutine

Alias for set_xscale.

Read more…
y_tick_label_right_edge_at_axis fortplot_raster_labels Function

Compute the rightmost edge of y-tick labels relative to the y-axis

y_tick_label_right_edge_at_axis fortplot_raster_axes_secondary Function
y_tick_label_right_edge_at_axis_old fortplot_raster_axes_secondary Function
ylabel fortplot_matplotlib_axes Subroutine

Set the y-axis label text.

Read more…
ylim fortplot_matplotlib_axes Subroutine

Set the y-axis display limits.

Read more…
yscale fortplot_matplotlib_axes Subroutine

Alias for set_yscale.

Read more…
zlib_compress fortplot_zlib_compress Function

Backwards-compatible wrapper returning an allocatable result

zlib_compress_into fortplot_zlib_compress Subroutine

Compress data into a newly allocated buffer with zlib wrapper

zlib_decompress fortplot_zlib_decompress Function

Decompress zlib (deflate) data using fixed Huffman tables