contourf Subroutine

public subroutine contourf(x, y, z, N)

Arguments

Type IntentOptional AttributesName
real(kind=wp), intent(in), dimension(:):: x

x-coordinates of data

real(kind=wp), intent(in), dimension(:):: y

y-coordinates of data

real(kind=wp), intent(in), dimension(:,:):: z

Data for contouring

integer, intent(in), optional :: N

Number of levels to use in contour

Description

Plot filled contours

Calls

proc~~contourf~~CallsGraph proc~contourf contourf proc~linspace linspace proc~contourf->proc~linspace plshades plshades proc~contourf->plshades
Help

Called By

proc~~contourf~~CalledByGraph proc~contourf contourf proc~docontour doContour proc~docontour->proc~contourf program~examples_prg examples_prg program~examples_prg->proc~docontour
Help

Variables

TypeVisibility AttributesNameInitial
real(kind=pp), public, dimension(:), allocatable:: xl
real(kind=pp), public, dimension(:), allocatable:: yl
real(kind=pp), public, dimension(:,:), allocatable:: zl
real(kind=pp), public, dimension(:), allocatable:: edge
character(len=1), public :: defined
real(kind=pp), public :: fill_width
real(kind=pp), public :: cont_width
integer, public :: cont_color
integer, public :: Nl

Source Code

	subroutine contourf(x,y,z,N)
		!! Plot filled contours
		real(wp),dimension(:),intent(in)::x
			!! x-coordinates of data
		real(wp),dimension(:),intent(in)::y
			!! y-coordinates of data
		real(wp),dimension(:,:),intent(in)::z
			!! Data for contouring
		integer,intent(in),optional::N
			!! Number of levels to use in contour
		
		real(pp),dimension(:),allocatable::xl,yl
		real(pp),dimension(:,:),allocatable::zl
		
		real(pp),dimension(:),allocatable::edge
		
		character(1)::defined
		real(pp)::fill_width
		real(pp)::cont_width
		integer::cont_color
		integer::Nl
		
		xl = localize(x)
		yl = localize(y)
		zl = localize(z)
		Nl = 20
		if(present(N)) Nl = N
		
		edge = localize(linspace(minval(z),maxval(z),Nl))
		
		fill_width = -1.0_pp
		cont_width = -1.0_pp
		cont_color = -1
		
		call plshades(zl,defined,minval(xl),maxval(xl),minval(yl),maxval(yl), &
			& edge,fill_width,cont_color,cont_width)
		call resetPen()
	end subroutine contourf