Skip to content

Show more tick marks on axes #121

Answered by pbreheny
Arrozito asked this question in Q&A
Discussion options

You must be logged in to vote
library(visreg)
fit <- lm(Ozone ~ Solar.R + Wind + Temp, data=airquality)

# Base graphics
visreg(fit, "Wind", xaxt='n')
axis(1, labels = 2:21, at=2:21)

# ggplot
visreg(fit, "Wind", gg=TRUE) +
  ggplot2::scale_x_continuous(breaks=2:21, labels=2:21)
#> Loading required namespace: ggplot2

Created on 2024-04-16 with reprex v2.1.0

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by pbreheny
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants