Skip to content

Commit bc9fa59

Browse files
author
Lindsay Carr
committed
axis: n.minor use auto axis ticks if "at" hasn't been user-specified
1 parent b3f566b commit bc9fa59

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

R/axis.R

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,16 @@ draw_axis <- function(gsplot, index.axis) {
9696
} else {
9797
axis(axisParams)
9898
n.minor <- n.minor + 1
99-
#Minor axis:
100-
at <- axTicks(axisParams$side)
99+
100+
# Minor axis:
101+
102+
#if user hasn't specified "at", calculate it
103+
if(is.null(axisParams$at)){
104+
at <- axTicks(axisParams$side)
105+
} else {
106+
at <- axisParams$at
107+
}
108+
101109
newAT <- c()
102110

103111
if(axisParams$side %% 2 == 0){

0 commit comments

Comments
 (0)