colormap(2D) should write an output image file (exercises the 2D branch).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(inout) | :: | id | |||
| integer, | intent(inout) | :: | nfail |
subroutine test_080(id, nfail) use forcolormap, only: Colormap, wp integer, intent(inout) :: id, nfail character(len=*), parameter :: name = "colormap(2D) writes a PPM file" logical :: ok type(Colormap) :: cm character(len=*), parameter :: fname = "test_tmp_colormap_2d.ppm" real(wp) :: xmin(2), xmax(2) call cm%set("viridis", 0.0_wp, 1.0_wp) xmin = [ 0.0_wp, 0.0_wp ] xmax = [ 1.0_wp, 1.0_wp ] call cm%colormap(fname, zfun_2d, xmin=xmin, xmax=xmax, width=10, height=8) ok = exists_file(fname) .or. exists_file(trim(fname)//".ppm") .or. exists_file("test_tmp_colormap_2d") call delete_if_exists(fname) call delete_if_exists(trim(fname)//".ppm") call delete_if_exists("test_tmp_colormap_2d") call report_test(name, ok, id, nfail) end subroutine test_080