fortplot_utils Module

Utility functions module for common operations

This module provides utility functions that are used across multiple plotting modules. Follows Interface Segregation Principle by grouping related utility functions together.



Functions

public function get_backend_from_filename(filename) result(backend_type)

Determine backend type from file extension

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: filename

Return Value character(len=20)


Subroutines

public subroutine initialize_backend(backend, backend_type, width, height)

Initialize the appropriate backend based on type

Read more…

Arguments

Type IntentOptional Attributes Name
class(plot_context), intent(out), allocatable :: backend
character(len=*), intent(in) :: backend_type
integer, intent(in) :: width
integer, intent(in) :: height

public subroutine ensure_directory_exists(filepath)

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

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: filepath