fillBetweenx Subroutine

public subroutine fillBetweenx(y, x1, x0, fillColor, fillPattern, lineWidth)

Arguments

Type IntentOptional AttributesName
real(kind=wp), intent(in), dimension(:):: y
real(kind=wp), intent(in), dimension(:):: x1
real(kind=wp), intent(in), optional dimension(:):: x0
character(len=*), intent(in), optional :: fillColor
character(len=*), intent(in), optional :: fillPattern
real(kind=wp), intent(in), optional :: lineWidth

Description

Fill space between two lines

Calls

proc~~fillbetweenx~~CallsGraph proc~fillbetweenx fillBetweenx plfill plfill proc~fillbetweenx->plfill
Help

Variables

TypeVisibility AttributesNameInitial
real(kind=pp), public, dimension(:), allocatable:: yl
real(kind=pp), public, dimension(:), allocatable:: x1l
real(kind=pp), public, dimension(:), allocatable:: x0l
integer, public :: N

Source Code

	subroutine fillBetweenx(y,x1,x0,fillColor,fillPattern,lineWidth)
		!! Fill space between two lines
		real(wp),dimension(:),intent(in)::y
		real(wp),dimension(:),intent(in)::x1
		real(wp),dimension(:),intent(in),optional::x0
		character(*),intent(in),optional::fillColor
		character(*),intent(in),optional::fillPattern
		real(wp),intent(in),optional::lineWidth
		
		real(pp),dimension(:),allocatable::yl,x1l,x0l
		integer::N
		
		N = size(y)
		
		yl  = localize(y)
		x1l = localize(x1)
		if(present(x0)) then
			x0l = localize(x0)
		else
			allocate(x0l(N))
			x0l = 0.0_pp
		end if
		
		if(present(fillColor)) call setColor(fillColor)
		if(present(fillPattern)) call setFillPattern(fillPattern)
		if(present(lineWidth)) call setLineWidth(lineWidth)
		call plfill([x1l(1:N:1),x0l(N:1:-1)],[yl(1:N:1),yl(N:1:-1)])
		call resetPen()
	end subroutine fillBetweenx