I did not find an answer to my question after a quick search using the R search engine so thought I'd ask away: Does any know if there's a function exists to create an interrupted Y axis? What I mean by interrupted Y axis is that part of the Y axis has been removed or excised to permit one to see parts of the data in more detail. Perhaps an example will make this clear. Please go to http://www.jbc.org/cgi/reprint/274/41/28950 and open the PDF document located there. Go to page 4, figure 2c provides a crude example of what I mean by interrupted Y axis. Part of the Y axis between 800 and 4500 has been removed to permit easy inspection of the upper end of the range of data. (This is not my work but simply an example of what I'm trying to describe.) One finds these interrupted Y axis graphs in newspapers or other periodicals, more often than not as a bar chart. Does a function in R exist to permit on to this easily to a graph? If not, would such a function be useful? If yes, would the grid package be the right tool for me to try and implement this? ~Nick
On 7/2/05, Nick Drew <drewbrewit at yahoo.com> wrote:> I did not find an answer to my question after a quick > search using the R > search engine so thought I'd ask away: > > Does any know if there's a function exists to create > an interrupted Y axis? > What I mean by interrupted Y axis is that part of the > Y axis has been > removed or excised to permit one to see parts of the > data in more detail. > > Perhaps an example will make this clear. Please go to > http://www.jbc.org/cgi/reprint/274/41/28950 and open > the PDF document > located there. Go to page 4, figure 2c provides a > crude example of what I > mean by interrupted Y axis. Part of the Y axis between > 800 and 4500 has been > removed to permit easy inspection of the upper end of > the range of data. > (This is not my work but simply an example of what I'm > trying to describe.) > One finds these interrupted Y axis graphs in > newspapers or other > periodicals, more often than not as a bar chart. > > Does a function in R exist to permit on to this easily > to a graph? If not, > would such a function be useful? If yes, would the > grid package be the right > tool for me to try and implement this?See axis.break in the plotrix package.
On Sat, 2005-07-02 at 06:09 -0700, Nick Drew wrote:> I did not find an answer to my question after a quick > search using the R > search engine so thought I'd ask away: > > Does any know if there's a function exists to create > an interrupted Y axis? > What I mean by interrupted Y axis is that part of the > Y axis has been > removed or excised to permit one to see parts of the > data in more detail. > > Perhaps an example will make this clear. Please go to > http://www.jbc.org/cgi/reprint/274/41/28950 and open > the PDF document > located there. Go to page 4, figure 2c provides a > crude example of what I > mean by interrupted Y axis. Part of the Y axis between > 800 and 4500 has been > removed to permit easy inspection of the upper end of > the range of data. > (This is not my work but simply an example of what I'm > trying to describe.) > One finds these interrupted Y axis graphs in > newspapers or other > periodicals, more often than not as a bar chart. > > Does a function in R exist to permit on to this easily > to a graph? If not, > would such a function be useful? If yes, would the > grid package be the right > tool for me to try and implement this? > ~NickUsing: RSiteSearch("axis break") comes up with 78 hits. You might want to consider some of the approaches taken, including the axis.break() function in the 'plotrix' package on CRAN. Note however that the examples (ie. newspapers) you site are called "Pop Charts" by Bill Cleveland in his book The Elements of Graphing Data and are highly criticized. If you have such disparate ranges you might want to consider separate plots and/or log scaling. Be careful however, that expanding the vertical axis to isolate specific data can result in the visual perception of significant difference where none exists. This notion is also explored by Cleveland and Tufte ("The Visual Display of Quantitative Information"). HTH, Marc Schwartz
Nick Drew wrote:> I did not find an answer to my question after a quick > search using the R > search engine so thought I'd ask away: > > Does any know if there's a function exists to create > an interrupted Y axis? > What I mean by interrupted Y axis is that part of the > Y axis has been > removed or excised to permit one to see parts of the > data in more detail. > > Perhaps an example will make this clear. Please go to > http://www.jbc.org/cgi/reprint/274/41/28950 and open > the PDF document > located there. Go to page 4, figure 2c provides a > crude example of what I > mean by interrupted Y axis. Part of the Y axis between > 800 and 4500 has been > removed to permit easy inspection of the upper end of > the range of data. > (This is not my work but simply an example of what I'm > trying to describe.) > One finds these interrupted Y axis graphs in > newspapers or other > periodicals, more often than not as a bar chart. > > Does a function in R exist to permit on to this easily > to a graph? If not, > would such a function be useful? If yes, would the > grid package be the right > tool for me to try and implement this? > ~Nick >As Gabor and Mark have already pointed out, axis.break() in the plotrix package will do the axis break. You will also have to create custom axis labels using axis(). However, the plotting function used in the paper you cite also breaks the bars that extend to the upper range (nice touch, wish I had thought of that). I'm not sure if any of the barplot* functions will do this out of the box. I would probably fake the bottom and top sections with homemade bars using rect() if I had this problem. Anybody have a better idea? Jim
Maybe Matching Threads
- Major Printing Failure Problem
- [ThinLTO] static library failure with object files with the same name
- tm: custom reader for readPlain
- [ThinLTO] static library failure with object files with the same name
- [ThinLTO] static library failure with object files with the same name