An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20110111/660bfa89/attachment.pl>
plot: skip a range of axis
4 messages · Yuan Jian, Jim Lemon
On 01/12/2011 03:46 PM, Yuan Jian wrote:
Hi, I am using plot to show scatter points in 2_D. in my data, there is no data between -1 and +1 in x-axis. I want to skip this region, i.e. x axis becomes [-Inf:-1, 1:Inf]. can any one tell me how to do?
Hi Yu, Try the gap.plot function in the plotrix package. Jim
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20110112/099ce09d/attachment.pl>
On 01/12/2011 11:15 PM, Yuan Jian wrote:
thanks Jim, I found gap.plot seperates x axis or y axis into two boxes. do you know any plot tool that can skip a range in x-axis or y-axis without lines?
Hi Yu, You could shift your positive numbers down by two, plot those adjusted numbers without an x axis, and finally display a custom x axis for which -1 and +1 were at the same point and the positive tick marks were adjusted back up. I don't think this is a very good idea, though, as the idea of most illustrations is to convey information to the viewer without the producer being present to explain what happened to the number scale. I thought of adding axis breaks on the top and bottom of the above at +-1, but I'm not sure that it will be much of an improvement. I assume that the -1 to +1 gap is a substantial part of your x axis, i.e. you aren't really plotting -Inf to Inf (in which case your gap would be infinitely small). Jim