third Y-axis

33 views
Skip to first unread message

Nasim Fazel

unread,
Jun 23, 2017, 11:21:27 AM6/23/17
to ggplot2
Hi, 

Could someone help me with an example to add a third Y-axis to a plot?

Bests, 
Nasim

Brandon Hurr

unread,
Jun 23, 2017, 11:34:52 AM6/23/17
to Nasim Fazel, ggplot2
3 Y-axes are impossible with base ggplot2. If you just want two, you can do that as long as they are related (temp in F and C) using sec.axis since 2.2.0: 


Kohske put together this before sec.axis was introduced. You might be able to use sec.axis and use grid to add a 3rd y-axis, but having three seems really really like a bad idea. 

See Hadley's response here as to why more than one axis is a bad idea:


If you want further help, you'll need to justify 3 axes a bit and also provide a minimal reproducible example:

HTH, 
B


--
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility
 
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+unsubscribe@googlegroups.com
More options: http://groups.google.com/group/ggplot2

---
You received this message because you are subscribed to the Google Groups "ggplot2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ggplot2+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages