Set the ticks for the x-axis
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
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