[R] Converting qqplot2 qplot() to grammar?
B. Bogart
bbogart at sfu.ca
Tue May 13 20:19:37 CEST 2008
Thanks Hadley,
I did not even consider needing the aes() function.
It does seem to be behaving properly now.
> Could you provide a fuller description of what you're trying to do?
Now that this part is working there are two more aspects of the plot I
would like to remove: (in order of importance)
* The row/column facetting labels.
* the whitespace that surrounds the plot. I'd like the ggsave output to
resemble the "cropped.png" file rather than the "ggplot.png" file
(attached).
* the gaps between the subplots (or the ability to change the colour of
the subplot border?, looks to be grey50.)
> Just in R at the moment - see ?opts.
Hmm, I just get the generic R help for ggplot that says go to the
website for complete documentation.
That's using R 2.6.2 (2008-02-08).
Thanks for your help,
B. Bogart
hadley wickham wrote:
> You're missing one thing. You want:
>
> layer(data = somdf, geom = "tile", aes(fill=rgb))
>
> (i.e. there's an aes function wrapped around the fill). I'd probably
> use a few more of the built in defaults to get:
>
> geom_tile(aes(fill = rgb))
>
>
>> The other issue I'm having is that the above seems to create multiple
>> plots, another, apparently identical, plot gets drawn after I call
>> dev.off(). I have no idea why this would be so.
>
>
>> Setting name and breaks to " " seems like a hack to get rid of the axis
>> stuff, is there a better way?
>
> Not at the moment.
>
>> Oh, and I can't find documentation for opts() on the ggplot2 website,
>> where is it available?
>
>
> Hadley
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cropped.png
Type: image/png
Size: 40131 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20080513/aae47848/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ggplot.png
Type: image/png
Size: 45086 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20080513/aae47848/attachment-0001.png>
More information about the R-help
mailing list