Hi, I want to have a title for the y-axis on the right side of the plot. I know how to do it on the left side:> title(ylab="Title for y-axis")But how can I have the title on the right side? Greets, Phil
Hi r-help-bounces at r-project.org napsal dne 17.12.2010 12:41:20:> Hi, > > I want to have a title for the y-axis on the right side of the plot. > I know how to do it on the left side: > > > title(ylab="Title for y-axis") > > But how can I have the title on the right side?See ?mtext Regards Petr> > Greets, > Phil > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html> and provide commented, minimal, self-contained, reproducible code.
Take a look at mtext() which offers options for writing text in any margin of the table. Andrew Miles On Dec 17, 2010, at 6:41 AM, phils_muell at arcor.de wrote:> Hi, > > I want to have a title for the y-axis on the right side of the plot. > I know how to do it on the left side: > >> title(ylab="Title for y-axis") > > But how can I have the title on the right side? > > Greets, > Phil > > ______________________________________________ > 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.
mtext(4, ylab="your title", font) -- View this message in context: http://r.789695.n4.nabble.com/Title-for-y-axis-on-right-side-tp3092531p3092631.html Sent from the R help mailing list archive at Nabble.com.
On 12/17/2010 10:41 PM, phils_muell at arcor.de wrote:> Hi, > > I want to have a title for the y-axis on the right side of the plot. > I know how to do it on the left side: > >> title(ylab="Title for y-axis") > > But how can I have the title on the right side?Hi Phil, You probably want to add some margin on the right before you do the plot: par(mar=c(5,4,4,4)) plot(...) then: mtext("Right side",side=4,line=2) Jim