George Chen
2009-Apr-10 17:37 UTC
[R] Two different scales for the same axis in the same plot.
Hello, Could anyone tell me how to plot data on two different scales in the same axis in the same plot? Here is my quandary: The range of my X axis runs from 0 to 10, but the majority of my meaningful data lies between 7 and 10. The data from 0 to 7 is essentially noise. Is there a way for me to present my data such that the range from 0 to 7 takes up a smaller amount of space on the graph compared to the range from 7 to 10 so that I can see more of the details in 7 to 10? Thanks in advance, George Chen
Greg Snow
2009-Apr-10 18:05 UTC
[R] Two different scales for the same axis in the same plot.
Look at the gap.plot function in the plotrix package. It may work for you, or if not, looking at the code may give you some ideas of how to make a similar plot with the different scales that you want. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.snow at imail.org 801.408.8111> -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of George Chen > Sent: Friday, April 10, 2009 11:38 AM > To: r-help at r-project.org > Subject: [R] Two different scales for the same axis in the same plot. > > Hello, > > Could anyone tell me how to plot data on two different scales in the > same axis in the same plot? > Here is my quandary: > The range of my X axis runs from 0 to 10, but the majority of my > meaningful data > lies between 7 and 10. The data from 0 to 7 is essentially noise. > Is there a way for me to present my data such that the range from 0 to > 7 takes > up a smaller amount of space on the graph compared to the range from 7 > to 10 > so that I can see more of the details in 7 to 10? > > Thanks in advance, > > George Chen > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting- > guide.html > and provide commented, minimal, self-contained, reproducible code.
Jorge Ivan Velez
2009-Apr-10 18:08 UTC
[R] Two different scales for the same axis in the same plot.
Dear George, Take a look at the twoord.plot function in the plotrix package. HTH, Jorge On Fri, Apr 10, 2009 at 1:37 PM, George Chen <glchen@stanford.edu> wrote:> Hello, > > Could anyone tell me how to plot data on two different scales in the same > axis in the same plot? > Here is my quandary: > The range of my X axis runs from 0 to 10, but the majority of my meaningful > data > lies between 7 and 10. The data from 0 to 7 is essentially noise. > Is there a way for me to present my data such that the range from 0 to 7 > takes > up a smaller amount of space on the graph compared to the range from 7 to > 10 > so that I can see more of the details in 7 to 10? > > Thanks in advance, > > George Chen > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]
Maybe Matching Threads
- How to plot graph with different scale (y axis) on same graph?
- plotting several datasets with different scales into same plot
- Plotting two y-axis vs non-numeric x-axis
- RES: Barplot with "Independent" Lines Y axis
- 2 plots with different scales in the same graphical window