Set the ticks for the axes
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | optional | :: | dx | Spacing between ticks on x-axis |
|
real(kind=wp), | intent(in), | optional | :: | dy | Spacing between ticks on y-axis |
|
logical, | intent(in), | optional | :: | logx | Flag for log-ticks and labels on x-axis |
|
logical, | intent(in), | optional | :: | logy | Flag for log-ticks and labels on y-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 ticks(dx,dy,logx,logy,color,lineWidth)
!! Set the ticks for the axes
real(wp),intent(in),optional::dx
!! Spacing between ticks on x-axis
real(wp),intent(in),optional::dy
!! Spacing between ticks on y-axis
logical,intent(in),optional::logx
!! Flag for log-ticks and labels on x-axis
logical,intent(in),optional::logy
!! Flag for log-ticks and labels on y-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
if(present(dx)) dxl = real(dx,pp)
dyl = 0.0_pp
if(present(dy)) dyl = real(dy,pp)
xopts = 'bcnst'
if(present(logx)) then
if(logx) xopts = 'bcnstl'
end if
yopts = 'bcnstv'
if(present(logy)) then
if(logy) yopts = 'bcnstvl'
end if
call resetPen()
if(present(color)) call setColor(color)
if(present(lineWidth)) call setLineWidth(lineWidth)
call plbox(xopts,dxl,0,yopts,dyl,0)
call resetPen()
end subroutine ticks