Plot a 3d wireframe
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 |
|
character(len=*), | intent(in), | optional | :: | lineColor | Color of contour lines |
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 wireframe(x,y,z,lineColor)
!! Plot a 3d wireframe
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
character(*),intent(in),optional::lineColor
!! Color of contour lines
real(pp),dimension(:),allocatable::xl,yl
real(pp),dimension(:,:),allocatable::zl
xl = localize(x)
yl = localize(y)
zl = localize(z)
if(present(lineColor)) then
call setColor(lineColor)
call plot3d(xl,yl,zl,DRAW_LINEXY,.false.)
else
call plot3d(xl,yl,zl,ior(DRAW_LINEXY,MAG_COLOR),.false.)
end if
call resetPen()
end subroutine wireframe