Skip to content

Commit 185e8a7

Browse files
committed
fix ifx warning on windows
1 parent 52811d8 commit 185e8a7

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

example/demo.f90

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ program demo
3333

3434
integer :: i
3535
type(Colormap) :: cmap, custom_cmap
36+
real(wp), dimension(2), parameter :: xmin = [0.0_wp, 0.0_wp]
37+
real(wp), dimension(2), parameter :: xmax = [599.0_wp, 599.0_wp]
3638

3739
!> A discrete colormap with 8 levels, by @alozada, resembling the color
3840
!> changes in red cabbage (containing Anthocyanins) with pH:
@@ -51,28 +53,28 @@ program demo
5153
! Use the create() method instead of the set() method.
5254
call custom_cmap%create('red_cabbage', 0.0_wp, 2.0_wp, my_colormap)
5355
call custom_cmap%colorbar('red_cabbage_colorbar')
54-
call custom_cmap%colormap('red_cabbage_test', zfun, [0.0_wp, 0.0_wp], [599.0_wp, 599.0_wp] )
56+
call custom_cmap%colormap('red_cabbage_test', zfun, xmin, xmax)
5557

5658
! We create PPM files (binary encoded by default) for each built-in colormap.
5759
! The built-in z=f(x,y) test function is in the [0, 2] range:
5860
do i = 1, cmap_info%get_ncolormaps()
5961
call cmap%set(trim(cmap_info%get_name(i)), 0.0_wp, 2.0_wp)
6062
call cmap%colorbar(trim(cmap_info%get_name(i))//'_colorbar')
61-
call cmap%colormap(trim(cmap_info%get_name(i))//'_test', zfun, [0.0_wp, 0.0_wp], [599.0_wp, 599.0_wp])
63+
call cmap%colormap(trim(cmap_info%get_name(i))//'_test', zfun, xmin, xmax)
6264
print '("Colormap ", A30, " has ", I0, " levels")', trim(cmap%get_name()), cmap%get_levels()
6365
end do
6466

6567
! Cubehelix can also accept other parameters (varargs array):
6668
call cmap%set("cubehelix", 0.0_wp, 2.0_wp, 1024, [0.5_wp, -1.0_wp, 1.0_wp, 1.0_wp])
6769
! We change the name for the output test files:
6870
call cmap%colorbar('cubehelix_customized_colorbar')
69-
call cmap%colormap('cubehelix_customized_test', zfun, [0.0_wp, 0.0_wp], [599.0_wp, 599.0_wp])
71+
call cmap%colormap('cubehelix_customized_test', zfun, xmin, xmax)
7072

7173
!> You can also download your colormap from a .txt file by
7274
!> using the load() method instead of the set() method.
7375
call custom_cmap%load("test_map_to_load.txt", 0.0_wp, 2.0_wp)
7476
call custom_cmap%colorbar('a_loaded_colorbar')
75-
call custom_cmap%colormap('a_loaded_colormap_test', zfun, [0.0_wp, 0.0_wp], [599.0_wp, 599.0_wp])
77+
call custom_cmap%colormap('a_loaded_colormap_test', zfun, xmin, xmax)
7678
call custom_cmap%print()
7779

7880
contains

example/demo_reverse.f90

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ program demo_reverse
3232

3333
integer :: i
3434
type(Colormap) :: cmap, custom_cmap
35+
real(wp), dimension(2), parameter :: xmin = [0.0_wp, 0.0_wp]
36+
real(wp), dimension(2), parameter :: xmax = [599.0_wp, 599.0_wp]
3537

3638
!> A discrete colormap with 8 levels, by @alozada, resembling the color
3739
!> changes in red cabbage (containing Anthocyanins) with pH:
@@ -50,28 +52,28 @@ program demo_reverse
5052
! Use the create() method instead of the set() method.
5153
call custom_cmap%create('red_cabbage_reverse', 0.0_wp, 2.0_wp, my_colormap, reverse=.true.)
5254
call custom_cmap%colorbar('red_cabbage_reverse_colorbar')
53-
call custom_cmap%colormap('red_cabbage_reverse_test', zfun, [0.0_wp, 0.0_wp], [599.0_wp, 599.0_wp] )
55+
call custom_cmap%colormap('red_cabbage_reverse_test', zfun, xmin, xmax)
5456

5557
! We create PPM files (binary encoded by default) for each built-in colormap.
5658
! The built-in z=f(x,y) test function is in the [0, 2] range:
5759
do i = 1, cmap_info%get_ncolormaps()
5860
call cmap%set(trim(cmap_info%get_name(i)), 0.0_wp, 2.0_wp, reverse=.true.)
5961
call cmap%colorbar(trim(cmap_info%get_name(i))//'_reverse_colorbar')
60-
call cmap%colormap(trim(cmap_info%get_name(i))//'_reverse_test', zfun, [0.0_wp, 0.0_wp], [599.0_wp, 599.0_wp])
62+
call cmap%colormap(trim(cmap_info%get_name(i))//'_reverse_test', zfun, xmin, xmax)
6163
print '("Colormap ", A30, " has ", I0, " levels")', trim(cmap%get_name()), cmap%get_levels()
6264
end do
6365

6466
! Cubehelix can also accept other parameters (varargs array):
6567
call cmap%set("cubehelix", 0.0_wp, 2.0_wp, 1024, [0.5_wp, -1.0_wp, 1.0_wp, 1.0_wp], reverse=.true.)
6668
! We change the name for the output test files:
6769
call cmap%colorbar('cubehelix_customized_reverse_colorbar')
68-
call cmap%colormap('cubehelix_customized_reverse_test', zfun, [0.0_wp, 0.0_wp], [599.0_wp, 599.0_wp])
70+
call cmap%colormap('cubehelix_customized_reverse_test', zfun, xmin, xmax)
6971

7072
!> You can also download your colormap from a .txt file by
7173
!> using the load() method instead of the set() method.
7274
call custom_cmap%load("test_map_to_load.txt", 0.0_wp, 2.0_wp, reverse=.true.)
7375
call custom_cmap%colorbar('a_loaded_reverse_colorbar')
74-
call custom_cmap%colormap('a_loaded_reverse_colormap_test', zfun, [0.0_wp, 0.0_wp], [599.0_wp, 599.0_wp])
76+
call custom_cmap%colormap('a_loaded_reverse_colormap_test', zfun, xmin, xmax)
7577
call custom_cmap%print()
7678

7779
contains

example/example1.f90

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,13 @@ program example1
3232

3333
type(Colormap) :: custom_cmap
3434
type(format_pnm) :: ex1_colormap, ex1_colorbar
35+
real(wp), dimension(2), parameter :: xmin = [0.0_wp, 0.0_wp]
36+
real(wp), dimension(2), parameter :: xmax = [599.0_wp, 599.0_wp]
3537

3638
! Create ppm files
3739
call custom_cmap%load('test_map_to_load.txt', 0.0_wp, 2.0_wp)
3840
call custom_cmap%colorbar('a_loaded_colormap_ascii_test', encoding='ascii')
39-
call custom_cmap%colormap('a_loaded_colormap_ascii_colorbar', zfun, [0.0_wp, 0.0_wp], [599.0_wp, 599.0_wp], encoding='ascii')
41+
call custom_cmap%colormap('a_loaded_colormap_ascii_colorbar', zfun, xmin, xmax, encoding='ascii')
4042
call custom_cmap%print()
4143

4244
! Import ascii ppm files

0 commit comments

Comments
 (0)