Skip to content

Commit

Permalink
Removed spaces in several *.f90 files
Browse files Browse the repository at this point in the history
  • Loading branch information
vmagnin committed Feb 25, 2024
1 parent b4c3a77 commit aa1849c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 19 deletions.
10 changes: 5 additions & 5 deletions example/colormaps_list.f90
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,20 @@
program colormaps_list
use forcolormap_info, only: Colormaps_info
implicit none

type(Colormaps_info) :: info

! Set all colormap information
call info%set_all()

!! Write colormap information to a file
call info%write(gradient='Sequential', file_name='colormaps_list/COLORMAPS_LIST_SEQ.md', verbose=4)
call info%write(gradient='Multi-Sequential', file_name='colormaps_list/COLORMAPS_LIST_MSQ.md', verbose=4)
call info%write(gradient='Diverging', file_name='colormaps_list/COLORMAPS_LIST_DIV.md', verbose=4)
call info%write(gradient='Categorical', file_name='colormaps_list/COLORMAPS_LIST_CAT.md', verbose=4)
call info%write(gradient='Cyclic', file_name='colormaps_list/COLORMAPS_LIST_CYC.md', verbose=4)
call info%write(gradient='Cyclic', file_name='colormaps_list/COLORMAPS_LIST_CYC.md', verbose=4)

! Deallocate all colormap information
call info%finalize()

end program colormaps_list
end program colormaps_list
16 changes: 5 additions & 11 deletions example/info.f90
Original file line number Diff line number Diff line change
Expand Up @@ -27,42 +27,36 @@
program write_info
use forcolormap_info, only: Colormaps_info
implicit none

type(Colormaps_info) :: info

! Set all colormap information
call info%set_all()

!! Print all colormap information using default verbosity (level 1)
! verbose: 1 (default) prints a table , 2 prints a box, 3 prints the name
call info%write()



!! Filter and write colormap information
!! Available filters: name, family, gradient, palette, author, license, levels

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

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

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



!! Write colormap information to a file
call info%write(gradient='Sequential', file_name='COLORMAPS_LIST.md', verbose=4)
call info%write(gradient='Multi-Sequential', file_name='COLORMAPS_LIST.md', verbose=4)
call info%write(gradient='Diverging', file_name='COLORMAPS_LIST.md', verbose=4)
call info%write(gradient='Categorical', file_name='COLORMAPS_LIST.md', verbose=4)
call info%write(gradient='Cyclic', file_name='COLORMAPS_LIST.md', verbose=4)


! Deallocate all colormap information
call info%finalize()

end program write_info

5 changes: 2 additions & 3 deletions test/check.f90
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,15 @@ program check
! Name is not in the list
call cmap%set('actom10', 0.0_wp, 2.0_wp)
if (cmap%get_name() /= 'grayC') error stop "ERROR: colormap%check() name"

! Maximum value is less than minimum value
call cmap%set('acton10', 2.0_wp, 0.0_wp)
if (cmap%get_zmin() /= 0.0_wp .or. cmap%get_zmax() /= 2.0_wp) error stop "ERROR: colormap%check() zmin > zmax"

! Number of levels is not equal to predefined number of levels
call cmap%set('acton10', 0.0_wp, 2.0_wp, 256)
if (cmap%get_levels() /= 10) error stop "ERROR: colormap%check() levels /= predefined levels"


!! Test check() procedure within create() procedure
! Maximum value is less than minimum value
call cmap%create("discrete", 2.0_wp, 0.0_wp, test_colormap)
Expand Down

0 comments on commit aa1849c

Please sign in to comment.