Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
Plot filled contours
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
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 |
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