Creates a zebra-like colormap, alterning white and black stripes
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(out), | dimension(:,:), allocatable | :: | map |
pure subroutine zebra_colormap(map) integer, dimension(:,:), allocatable, intent(out) :: map integer :: levels, last, i ! The user can not choose the number of levels: levels = 256 last = levels - 1 allocate(map(0:last, 1:3)) ! Black and white zebras: do i = 0, 224, 32 map(i :i+15, :) = 0 map(i+16:i+31, :) = 255 end do end subroutine zebra_colormap