zebra_colormap Subroutine

public pure subroutine zebra_colormap(map)

Arguments

Type IntentOptional Attributes Name
integer, intent(out), dimension(:,:), allocatable :: map

Called by

proc~~zebra_colormap~~CalledByGraph proc~zebra_colormap zebra_colormap proc~set Colormap%set proc~set->proc~zebra_colormap program~demo demo program~demo->proc~set program~demo_reverse demo_reverse program~demo_reverse->proc~set program~extract extract program~extract->proc~set program~modify modify program~modify->proc~set

Source Code

    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