Plot data using lines and or markers
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x | x-data for plot |
|
real(kind=wp), | intent(in), | dimension(:) | :: | y | y-data for plot |
|
real(kind=wp), | intent(in), | dimension(:) | :: | z | z-data for plot |
|
character(len=*), | intent(in), | optional | :: | lineColor | Color of line |
|
character(len=*), | intent(in), | optional | :: | lineStyle | Style of line; '' for no line |
|
real(kind=wp), | intent(in), | optional | :: | lineWidth | Width of line |
|
character(len=*), | intent(in), | optional | :: | markColor | Color of markers, if any |
|
character(len=*), | intent(in), | optional | :: | markStyle | Style of markers; '' or absent for none |
|
real(kind=wp), | intent(in), | optional | :: | markSize | Size of markers, if any |
subroutine plot3(x,y,z,lineColor,lineStyle,lineWidth,markColor,markStyle,markSize)
!! Plot data using lines and or markers
real(wp),dimension(:),intent(in)::x
!! x-data for plot
real(wp),dimension(:),intent(in)::y
!! y-data for plot
real(wp),dimension(:),intent(in)::z
!! z-data for plot
character(*),intent(in),optional::lineColor
!! Color of line
character(*),intent(in),optional::lineStyle
!! Style of line; '' for no line
real(wp),intent(in),optional::lineWidth
!! Width of line
character(*),intent(in),optional::markColor
!! Color of markers, if any
character(*),intent(in),optional::markStyle
!! Style of markers; '' or absent for none
real(wp),intent(in),optional::markSize
!! Size of markers, if any
real(pp),dimension(:),allocatable::xl,yl,zl
real(pp)::dx,dy,dz,sx,sy,sz
character(32)::code
integer::k
xl = localize(x)
yl = localize(y)
zl = localize(z)
if(present(lineColor)) call setColor(lineColor)
if(present(lineWidth)) call setLineWidth(lineWidth)
if(present(lineStyle)) then
call setLineStyle(lineStyle)
if(lineStyle/='') call plline(xl,yl)
else
call plline3(xl,yl,zl)
end if
call resetPen()
if(present(markColor)) call setColor(markColor)
if(present(markSize)) call plssym(0.0_pp,real(markSize,pp))
if(present(markStyle)) then
code = getSymbolCode(markStyle)
if(markStyle/='') then
dx = 1.0_pp
dy = 0.0_pp
dz = 0.0_pp
sx = 0.0_pp
sy = 0.0_pp
sz = 0.0_pp
do k=1,size(x)
call plptex3(xl(k),yl(k),zl(k),dx,dy,dz,sx,sy,sz,0.5_pp,code)
end do
end if
end if
call resetPen()
end subroutine plot3