fortplot_colormap Module

Colormap functionality for contour plots Provides color interpolation for different colormaps like matplotlib



Functions

public pure function validate_colormap_name(colormap) result(is_valid)

Validate if colormap name is supported

Arguments

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

Return Value logical


Subroutines

public subroutine get_colormap_color(value, colormap, color)

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

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: value
character(len=*), intent(in) :: colormap
real(kind=wp), intent(out), dimension(3) :: color

public subroutine colormap_value_to_color(z_value, z_min, z_max, colormap, color)

Convert data value to RGB color using colormap

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: z_value
real(kind=wp), intent(in) :: z_min
real(kind=wp), intent(in) :: z_max
character(len=*), intent(in) :: colormap
real(kind=wp), intent(out), dimension(3) :: color