plot3 Subroutine

public subroutine plot3(x, y, z, lineColor, lineStyle, lineWidth, markColor, markStyle, markSize)

Arguments

Type IntentOptional AttributesName
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

Description

Plot data using lines and or markers

Calls

proc~~plot3~~CallsGraph proc~plot3 plot3 plline plline proc~plot3->plline plptex3 plptex3 proc~plot3->plptex3 plline3 plline3 proc~plot3->plline3 plssym plssym proc~plot3->plssym
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 :: dx
real(kind=pp), public :: dy
real(kind=pp), public :: dz
real(kind=pp), public :: sx
real(kind=pp), public :: sy
real(kind=pp), public :: sz
character(len=32), public :: code
integer, public :: k

Source Code

	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