Marshall Feldman
2010-Apr-02 13:56 UTC
[R] Plots don't update with xlab, etc. What am I doing wrong.
Hi,
I've been struggling with this problem the last few days and finally
discovered it's happening at a very fundamental level. Going through
Stephen Turner's tutorial on ggplot2, I entered these base graphics
commands:
> with(diamonds, plot(carat,price))
> with(diamonds, plot(carat,price), xlab="Weight in Carats",
ylab="Price in USD", main="Diamonds are expensive!")
The first command works as expected and draws the plot with labels
"carat" and "price" and no title. The second command makes R
redraw the
plot (I can see it clear and redraw), but it's identical to the first!
What am I doing wrong?
Marsh Feldman
[[alternative HTML version deleted]]
David Winsemius
2010-Apr-02 14:00 UTC
[R] Plots don't update with xlab, etc. What am I doing wrong.
On Apr 2, 2010, at 9:56 AM, Marshall Feldman wrote:> Hi, > > I've been struggling with this problem the last few days and finally > discovered it's happening at a very fundamental level. Going through > Stephen Turner's tutorial on ggplot2, I entered these base graphics > commands: > >> with(diamonds, plot(carat,price)) >> with(diamonds, plot(carat,price), xlab="Weight in Carats", > ylab="Price in USD", main="Diamonds are expensive!")Remove the extraneous ")". -- David.> > The first command works as expected and draws the plot with labels > "carat" and "price" and no title. The second command makes R redraw > the > plot (I can see it clear and redraw), but it's identical to the first! > What am I doing wrong? > > Marsh FeldmanDavid Winsemius, MD West Hartford, CT