Plot filled contours
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 |
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module.
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