[R] Plots don't update with xlab, etc. What am I doing wrong.

David Winsemius dwinsemius at comcast.net
Fri Apr 2 16:00:35 CEST 2010


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 Feldman

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list