write_info Program

Uses

  • program~~write_info~~UsesGraph program~write_info write_info module~forcolormap forcolormap program~write_info->module~forcolormap module~forcolormap_cm_matplotlib forcolormap_cm_matplotlib module~forcolormap->module~forcolormap_cm_matplotlib module~forcolormap_cm_miscellaneous forcolormap_cm_miscellaneous module~forcolormap->module~forcolormap_cm_miscellaneous module~forcolormap_cm_scientific forcolormap_cm_scientific module~forcolormap->module~forcolormap_cm_scientific module~forcolormap_info forcolormap_info module~forcolormap->module~forcolormap_info module~forcolormap_parameters forcolormap_parameters module~forcolormap->module~forcolormap_parameters module~forcolormap_utils forcolormap_utils module~forcolormap->module~forcolormap_utils module~forcolormap_cm_matplotlib->module~forcolormap_parameters module~forcolormap_cm_miscellaneous->module~forcolormap_parameters module~forcolormap_cm_scientific->module~forcolormap_parameters module~forcolormap_info->module~forcolormap_cm_matplotlib module~forcolormap_info->module~forcolormap_cm_miscellaneous module~forcolormap_info->module~forcolormap_cm_scientific module~forcolormap_info->module~forcolormap_parameters iso_fortran_env iso_fortran_env module~forcolormap_parameters->iso_fortran_env module~forcolormap_utils->module~forcolormap_parameters

Demonstrates how to obtain information about a colormap using the Colormaps_info class. You can print all colormap information using default verbosity (level 1).

You can filter and write colormap information with the available filters: name, family, gradient, palette, author, license, levels

You can write colormap information to a file with the file_name argument.


Source Code

program write_info
    use forcolormap, only: cmap_info
    implicit none

    ! type(Colormaps_info) :: info

    !! You can print all colormap information using default verbosity (level 1).
    ! verbose: 1 (default) prints a table , 2 prints a box, 3 prints the name
    call cmap_info%write()

    !! You can filter and write colormap information with the
    !! available filters: name, family, gradient, palette, author, license, levels

    ! Filter by gradient using default verbosity (level 1)
    call cmap_info%write(gradient='Sequential', palette='Continuous')

    ! Filter by gradient and palette using default verbosity (level 1)
    call cmap_info%write(gradient='Sequential', palette='Continuous')

    ! Filter by family and palette using verbosity level 2
    call cmap_info%write(family='vik', gradient='Diverging', palette='Continuous', verbose=2)

    !! You can write colormap information to a file with the `file_name` argument.
    call cmap_info%write(gradient='Sequential', file_name='COLORMAPS_LIST.md', verbose=4)
    call cmap_info%write(gradient='Multi-Sequential', file_name='COLORMAPS_LIST.md', verbose=4, append=.true.)
    call cmap_info%write(gradient='Diverging', file_name='COLORMAPS_LIST.md', verbose=4, append=.true.)
    call cmap_info%write(gradient='Categorical', file_name='COLORMAPS_LIST.md', verbose=4, append=.true.)
    call cmap_info%write(gradient='Cyclic', file_name='COLORMAPS_LIST.md', verbose=4, append=.true.)

 end program write_info