yarrr icon indicating copy to clipboard operation
yarrr copied to clipboard

Set intervals on the y-axis

Open vince-p opened this issue 7 years ago • 1 comments

Is there a way to specify the intervals for the y-axis of a pirate plot? My data has values from 1 to 5, but the y-axis includes values for 1.5, 2.5 etc. Is there a way to get it to only show integers on the y-axis?

vince-p avatar May 31 '17 22:05 vince-p

Hmmm, currently there is not. But you can turn off the axis yourself and add a custom axis later with axis.

E.g.

# Create the plot and turn off the yaxis with yaxt = "n"
yarrr::pirateplot(weight ~ Diet, data = ChickWeight, yaxt = "n")

#Add a custom axis
axis(2, at = seq(from = 0, to = 1000, by = 100))

ndphillips avatar Jun 10 '17 11:06 ndphillips