When I run this code fragment x <- (0:100)/100 y <- x^2 plot(x,y,type="l",xlab=expression(x),ylab=expression(f(x)==x^2), main="Quadratfunktion") the exponent on the y-axis label is mutilated. How can the be changed with minimal effort? ggplot2 does not have this problem: library(ggplot2) x <- (0:100)/100 y <- x^2 qplot(x,y,geom="line",xlab=expression(x),ylab=expression(f(x)==x^2), main="Quadratfunktion")
Plotting with basic plot
3 messages · Erich Neuwirth, Franklin Bretschneider, David Winsemius
Dear Neuwirth Erich, Re:
On 16 Mar 2013, at 19:18 , Neuwirth Erich wrote:
When I run this code fragment x <- (0:100)/100 y <- x^2 plot(x,y,type="l",xlab=expression(x),ylab=expression(f(x)==x^2), main="Quadratfunktion") the exponent on the y-axis label is mutilated. How can the be changed with minimal effort? ggplot2 does not have this problem: library(ggplot2) x <- (0:100)/100 y <- x^2 qplot(x,y,geom="line",xlab=expression(x),ylab=expression(f(x)==x^2), main="Quadratfunktion")
______________________________________________ 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.
# The left margin can be chosen wider, e.g.bij putting: par(mar=c(4,5,4,4)) # before the plotting statement. Beste wishes, Franklin Bretschneider -- Dept Biologie Kruytgebouw W711 Padualaan 8 3584 CH Utrecht The Netherlands
On Mar 16, 2013, at 11:18 AM, Neuwirth Erich wrote:
When I run this code fragment x <- (0:100)/100 y <- x^2 plot(x,y,type="l",xlab=expression(x),ylab=expression(f(x)==x^2), main="Quadratfunktion") the exponent on the y-axis label is mutilated. How can the be changed with minimal effort?
plot(x,y,type="l",xlab=expression(x),ylab="",
main="Quadratfunktion")
title(ylab = expression( f(x)==x^2 ), line=2)
ggplot2 does not have this problem: library(ggplot2) x <- (0:100)/100 y <- x^2 qplot(x,y,geom="line",xlab=expression(x),ylab=expression(f(x)==x^2), main="Quadratfunktion")
David Winsemius Alameda, CA, USA