plot Subroutine

public subroutine plot(x, y, 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

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~~plot~~CallsGraph proc~plot plot plline plline proc~plot->plline plssym plssym proc~plot->plssym plptex plptex proc~plot->plptex
Help

Called By

proc~~plot~~CalledByGraph proc~plot plot proc~doplot doPlot proc~doplot->proc~plot proc~dolegend doLegend proc~dolegend->proc~plot proc~makelogo makeLogo proc~makelogo->proc~plot program~animate_prg animate_prg program~animate_prg->proc~plot proc~doerror doError proc~doerror->proc~plot proc~dologplot doLogPlot proc~dologplot->proc~plot proc~dofillbetween doFillBetween proc~dofillbetween->proc~plot program~basic_prg basic_prg program~basic_prg->proc~plot program~examples_prg examples_prg program~examples_prg->proc~doplot program~examples_prg->proc~dolegend program~examples_prg->proc~doerror program~examples_prg->proc~dologplot program~examples_prg->proc~dofillbetween program~logo_prg logo_prg program~logo_prg->proc~makelogo
Help

Variables

TypeVisibility AttributesNameInitial
real(kind=pp), public, dimension(:), allocatable:: xl
real(kind=pp), public, dimension(:), allocatable:: yl
character(len=32), public :: code
integer, public :: k

Source Code

	subroutine plot(x,y,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
		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
		character(32)::code
		integer::k
		
		xl = localize(x)
		yl = localize(y)
		
		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 plline(xl,yl)
		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
				do k=1,size(x)
					call plptex(xl(k),yl(k),0.0_pp,0.0_pp,0.5_pp,code)
				end do
			end if
		end if
		call resetPen()
	end subroutine plot