[R] carpet plots

David Winsemius dwinsemius at comcast.net
Mon Jul 2 23:31:56 CEST 2012


On Jul 2, 2012, at 4:21 PM, Joseph Clark wrote:

>
> These "carpet plots" are also called "heat maps" and there's a  
> current thread with the subject line "Heat Maps" in which I've given  
> a couple of examples of code for them.  The R function image() is  
> very easy to use:
>
>
>
> image( x=(x values), y=(y values), z=(matrix of z values with x rows  
> and y columns), col=(vector of colors), breaks=(vector of break  
> points, one more than colors) )
>
>
>
> What I'd like to know is: does anyone know how to easily create a  
> legend/key to the color gradients, like the one in the right margin  
> of Mueller's first example: (http://www.johannes-hopf.de/wordpress/wp-content/uploads/2009/12/Zufall-300x225.png)?
>

require(lattice)
?levelplot

-- 
David.
>
> // joseph w. clark , phd candidate
> \\ usc marshall school of business
>
>
> ----------------------------------------
>> Date: Mon, 2 Jul 2012 20:05:12 +0200
>> From: mueller.eisborn at googlemail.com
>> To: r-help at r-project.org
>> Subject: [R] carpet plots
>>
>> Hi all,
>> I wonder why there is so little software for carpet plots (german:
>> Rasterdiagramm) (Three dimensional plot (x, y, z), the 3rd dimension
>> (z) symbolized by colourgradients). Besides from one or the other non
>> free software I only found an OpenOffice macro, a combination of
>> Gnuplot and Excel (an Excel macro calling gnuplot)
>> (http://www.johannes-hopf.de/2009/12/carpet-plot-version-1-3/9 and
>> Quikgrid (http://www.galiander.ca/quikgrid/) which I use for
>> bathymetric maps.
>>
>> Though I use one or two R scripts I have no deeper knowledge. Because
>> I think "That's a thing R can do!", I suppose, there are scripts for
>> this purpose. Perhaps one of you knows such a script. I would be very
>> grateful if you could point me to some information on this subject.
>>
>> Richard
>>
>> --
>> Richard Müller . Am Spring 9 . D-58802 Balve
>> www.oeko-sorpe.de


David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list