yticks Subroutine

public subroutine yticks(d, logScale, primary, secondary, color, linewidth)

Arguments

Type IntentOptional AttributesName
real(kind=wp), intent(in), optional :: d

Spacing between ticks

logical, intent(in), optional :: logScale

Flag for log-ticks and labels

logical, intent(in), optional :: primary

Draw primary axis

logical, intent(in), optional :: secondary

Draw secondary axis

character(len=*), intent(in), optional :: color

Color code for ticks, box, and labels

real(kind=wp) , optional :: linewidth

Line width for ticks and box

Description

Set the ticks for the y-axis

Calls

proc~~yticks~~CallsGraph proc~yticks yticks plbox plbox proc~yticks->plbox
Help

Called By

proc~~yticks~~CalledByGraph proc~yticks yticks proc~doplot doPlot proc~doplot->proc~yticks program~examples_prg examples_prg program~examples_prg->proc~doplot
Help

Variables

TypeVisibility AttributesNameInitial
real(kind=pp), public :: dxl
real(kind=pp), public :: dyl
character(len=10), public :: xopts
character(len=10), public :: yopts

Source Code

	subroutine yticks(d,logScale,primary,secondary,color,lineWidth)
		!! Set the ticks for the y-axis
		real(wp),intent(in),optional::d
			!! Spacing between ticks
		logical,intent(in),optional::logScale
			!! Flag for log-ticks and labels
		logical,intent(in),optional::primary
			!! Draw primary axis
		logical,intent(in),optional::secondary
			!! Draw secondary axis
		character(*),intent(in),optional::color
			!! Color code for ticks, box, and labels
		real(wp),optional::linewidth
			!! Line width for ticks and box
		real(pp)::dxl,dyl
		character(10)::xopts,yopts
		
		dxl = 0.0_pp
		dyl = 0.0_pp
		if(present(d)) dyl = real(d,pp)
		
		yopts = 'nst'
		
		if(present(primary)) then
			if(primary) yopts = trim(xopts)//'b'
		else
			yopts = trim(yopts)//'b'
		end if
		
		if(present(secondary)) then
			if(secondary) yopts = trim(yopts)//'c'
		else
			yopts = trim(yopts)//'c'
		end if
		
		if(present(logScale)) then
			if(logScale) yopts = trim(yopts)//'l'
		end if
		xopts = ''
		
		if(present(color)) call setColor(color)
		if(present(lineWidth)) call setLineWidth(lineWidth)
		call plbox(xopts,dxl,0,yopts,dyl,0)
		call resetPen()
	end subroutine yticks