xticks Subroutine

public subroutine xticks(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 x-axis

Calls

proc~~xticks~~CallsGraph proc~xticks xticks plbox plbox proc~xticks->plbox
Help

Called By

proc~~xticks~~CalledByGraph proc~xticks xticks proc~doplot doPlot proc~doplot->proc~xticks 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 xticks(d,logScale,primary,secondary,color,lineWidth)
		!! Set the ticks for the x-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)) dxl = real(d,pp)
		
		xopts = 'nst'
		
		if(present(primary)) then
			if(primary) xopts = trim(xopts)//'b'
		else
			xopts = trim(xopts)//'b'
		end if
		
		if(present(secondary)) then
			if(secondary) xopts = trim(xopts)//'c'
		else
			xopts = trim(xopts)//'c'
		end if
		
		if(present(logScale)) then
			if(logScale) xopts = trim(xopts)//'l'
		end if
		yopts = ''
		
		if(present(color)) call setColor(color)
		if(present(lineWidth)) call setLineWidth(lineWidth)
		call plbox(xopts,dxl,0,yopts,dyl,0)
		call resetPen()
	end subroutine xticks