mviljamaa
2016-Sep-19 15:50 UTC
[R] Overlapping axis numbering and labels when using par(new=TRUE)?
I'm trying to plot two data sets on the same plot by using par(new=TRUE). However this results in the axis numbering and labels being plotted twice as seen in the following picture: http://i.imgur.com/4b1sNIc.png How can I get the axis numbering and labels to not overlap? I could also manage with plotting only the axis numbering and labels of the other plot, but not of the other.
MacQueen, Don
2016-Sep-19 16:03 UTC
[R] Overlapping axis numbering and labels when using par(new=TRUE)?
Take a look at what plot(1:10, yaxt='n', xaxt='n') does. Then study the help page for the par function, i.e., ?par See also ?axis -Don -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA 94550 925-423-1062 On 9/19/16, 8:50 AM, "R-help on behalf of mviljamaa" <r-help-bounces at r-project.org on behalf of mviljamaa at kapsi.fi> wrote:>I'm trying to plot two data sets on the same plot by using >par(new=TRUE). > >However this results in the axis numbering and labels being plotted >twice as seen in the following picture: > >http://i.imgur.com/4b1sNIc.png > >How can I get the axis numbering and labels to not overlap? I could also >manage with plotting only the axis numbering and labels of the other >plot, but not of the other. > >______________________________________________ >R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >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.
David Winsemius
2016-Sep-19 21:06 UTC
[R] Overlapping axis numbering and labels when using par(new=TRUE)?
> On Sep 19, 2016, at 8:50 AM, mviljamaa <mviljamaa at kapsi.fi> wrote: > > I'm trying to plot two data sets on the same plot by using par(new=TRUE). > > However this results in the axis numbering and labels being plotted twice as seen in the following picture: > > http://i.imgur.com/4b1sNIc.png > > How can I get the axis numbering and labels to not overlap? I could also manage with plotting only the axis numbering and labels of the other plot, but not of the other.You need to set the ylim values of both plots to the same range, and suppress plotting of the ylab in one of hte plot calls.> > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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.David Winsemius Alameda, CA, USA
Jim Lemon
2016-Sep-19 21:08 UTC
[R] Overlapping axis numbering and labels when using par(new=TRUE)?
Hi mviljamaa, Have a look a the twoord.plot function in the plotrix package. Jim On Tue, Sep 20, 2016 at 1:50 AM, mviljamaa <mviljamaa at kapsi.fi> wrote:> I'm trying to plot two data sets on the same plot by using par(new=TRUE). > > However this results in the axis numbering and labels being plotted twice as > seen in the following picture: > > http://i.imgur.com/4b1sNIc.png > > How can I get the axis numbering and labels to not overlap? I could also > manage with plotting only the axis numbering and labels of the other plot, > but not of the other. > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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.
S Ellison
2016-Sep-19 21:39 UTC
[R] Overlapping axis numbering and labels when using par(new=TRUE)?
> How can I get the axis numbering and labels to not overlap? I could alsoTry specifying las=2 in your plot command? See ?plot.default and ?par S Ellison ******************************************************************* This email and any attachments are confidential. Any use...{{dropped:8}}