0

Following is my code and I want to limit x and y axis but its messing up. Please have any suggestions.

the data looks like

X     Y 
0.2   30
30    20
10    05
7     25
data <- read.csv("file.csv")

p <- ggdotplot(data, x= "X", y= "Y", binwidth = 0.09)

p <- ggpar(p, xlim  = c(0, 30), ylim = c(0,30))
p
sweety
  • 5
  • 3
  • You're more likely to get help if you offer part of the data you're working with. Without knowing `data` is hard to reproduce how you code is "messing up". https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example – guasi Jul 26 '22 at 04:35
  • If you are using a function from a package, please provide the package name, e.g. `library(ggpubr)` or `ggpubr::ggdotplot`. – Julian Jul 26 '22 at 08:57
  • It seems to be a bug in the `xlim` argument; `ggpubr::ggpar(p, xlim = c(1,4), ylim = c(0,30))` could work for your case, you need to play around with the values unfortunately, I think :/ – Julian Jul 26 '22 at 09:03

0 Answers0