Hi I've attached an example about something I want to do in R. This example was done in a Fortran application called ASGL. Here's an example in matplotlib http://matplotlib.sourceforge.net/examples/pylab_examples/hexbin_demo.html Basically, it's like a scatter plot, but have several additional things. One thing are the grids inside the graph, and the other is a density bar used as a reference to evaluate the frequency of the points. The command that I've always used in R for scatter plots is. > plot(l1, l2) I need to know if there is something similar in a library of R, or if I could implement it on my own. Greetings Ignacio -------------- next part -------------- A non-text attachment was scrubbed... Name: test.pdf Type: application/pdf Size: 30433 bytes Desc: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20101018/1c2b0e3f/attachment.pdf>
Dear Ignacio,
if you want it hexagonal (as I gather from the "hexbin_demo", have a
look at the
hexbin package.
Otherwise, lattice's levelplot is your friend. Or, if you prefer ggplot:
geom_tile or geom_hex.
UIf you play a bit with findFn from package sos, e.g.
findFn ("plot 2d density")
findFn ("plot 2d histogram")
you'll find more related functions.
Claudia
> I've attached an example about something I want to do in R. This
example was
> done in a Fortran application called ASGL. Here's an example in
matplotlib
>
> http://matplotlib.sourceforge.net/examples/pylab_examples/hexbin_demo.html
>
> Basically, it's like a scatter plot, but have several additional
things. One
> thing are the grids inside the graph, and the other is a density bar used
as a
> reference to evaluate the frequency of the points.
>
> The command that I've always used in R for scatter plots is.
>
> > plot(l1, l2)
>
> I need to know if there is something similar in a library of R, or if I
could
> implement it on my own.
>
> Greetings
>
> Ignacio
>
>
>
> ______________________________________________
> 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.
--
Claudia Beleites
Dipartimento dei Materiali e delle Risorse Naturali
Universit? degli Studi di Trieste
Via Alfonso Valerio 6/a
I-34127 Trieste
phone: +39 0 40 5 58-37 68
email: cbeleites at units.it
On 10/18/2010 11:34 PM, Ignacio Ibarra Del R?o wrote:> Hi > > I've attached an example about something I want to do in R. This example > was done in a Fortran application called ASGL. Here's an example in > matplotlib > > http://matplotlib.sourceforge.net/examples/pylab_examples/hexbin_demo.html > > Basically, it's like a scatter plot, but have several additional things. > One thing are the grids inside the graph, and the other is a density bar > used as a reference to evaluate the frequency of the points. > > The command that I've always used in R for scatter plots is. > > > plot(l1, l2) > > I need to know if there is something similar in a library of R, or if I > could implement it on my own. >Hi Ignacio, Have a look at the color2D.matplot in the plotrix package with do.hex=TRUE. Jim