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.
Determine backend type from file extension
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | filename | 
Initialize the appropriate backend based on type
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(plot_context), | intent(out), | allocatable | :: | backend | ||
| character(len=*), | intent(in) | :: | backend_type | |||
| integer, | intent(in) | :: | width | |||
| integer, | intent(in) | :: | height | 
Ensure output directory exists for a given filepath Extracts the parent directory and creates it securely using the runtime file operations with path validation.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | filepath |