Skip to content
Back to formatted view

Raw Message

Message-ID: <C78EEC51-DF40-4B2E-9BC0-CD2D9604A056@univie.ac.at>
Date: 2013-03-16T18:18:30Z
From: Erich Neuwirth
Subject: Plotting with basic plot

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")