Ggplot2: Plot X Axis As Y= 0 Line
Salutations:
I'm making a figure in R using ggplot2, I actually have a copy of the R Graphics Cookbook, but they seemed to neglect any option to move the X axis to the origin.

This is how I dealt with it in base R
> plot(..., xant='n")
> axis(0,pos=1)
But I'm a little lost in ggplot2
Tusen takk.
• 1,739 views
•
link
0 answers
No answers yet.
Log in to answer this question.
1) This has nothing to do with bioinformatics (try an R forum), so I'll close the post. 2) You R code wouldn't even work, since the bottom axis is 1, not 0, and you meant
xaxtrather thanxant.Edit: I'll add that the trick is something like:
Edit2: See also this issue report.