Quantcast

carpet plots

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

carpet plots

Richard Müller
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

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: carpet plots

David Winsemius

On Jul 2, 2012, at 2:05 PM, Richard Müller wrote:

> 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.
>

You need to expand you search list:

?heatmap
?levelplot
?contour
.... and many others


Here's an example with base graphics cobbled together from the last  
example on help(contour)

image(x,y,volcano)
line.list <- contourLines(x, y, volcano)
contour(x, y, volcano, col = tcol[2], lty = "solid", add = TRUE,
              vfont = c("sans serif", "plain"))
templines <- function(clines) {
   lines(clines[[2]], clines[[3]])
}
invisible(lapply(line.list, templines))

--
David.


> Richard
>
> --
> Richard Müller . Am Spring 9 . D-58802 Balve
> www.oeko-sorpe.de
>
> ______________________________________________
> [hidden email] 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.

David Winsemius, MD
West Hartford, CT

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: carpet plots

David Winsemius

On Jul 2, 2012, at 3:11 PM, David Winsemius wrote:

>
> On Jul 2, 2012, at 2:05 PM, Richard Müller wrote:
>
>> 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.
>>
>
> You need to expand you search list:
>
> ?heatmap
> ?levelplot
> ?contour
> .... and many others
>
>
> Here's an example with base graphics cobbled together from the last  
> example on help(contour)
>
> image(x,y,volcano)
> line.list <- contourLines(x, y, volcano)
# I did say "cobbled",
# .... and I am likely throwing errors since 'tcol' was not in that  
code.

tcol <- terrain.colors(12)

> contour(x, y, volcano, col = tcol[2], lty = "solid", add = TRUE,
>             vfont = c("sans serif", "plain"))
> templines <- function(clines) {
>  lines(clines[[2]], clines[[3]])
> }
> invisible(lapply(line.list, templines))
>
> --
> David.
>
>
>> Richard
>>
>> --
>> Richard Müller . Am Spring 9 . D-58802 Balve
>> www.oeko-sorpe.de
>>
>> _

>

David Winsemius, MD
West Hartford, CT

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: carpet plots

Joseph Clark
In reply to this post by Richard Müller

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)?


// joseph w. clark , phd candidate
\\ usc marshall school of business


----------------------------------------

> Date: Mon, 2 Jul 2012 20:05:12 +0200
> From: [hidden email]
> To: [hidden email]
> 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
>
> ______________________________________________
> [hidden email] 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.    
______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: carpet plots

David Winsemius

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: [hidden email]
>> To: [hidden email]
>> 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

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: carpet plots

David Winsemius

On Jul 2, 2012, at 5:31 PM, David Winsemius wrote:

>
> 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

Also for base graphics fans:

?filled.contour         # ......  and its first example
filled.contour(volcano, color = terrain.colors, asp = 1)# simple

>
> --
> David.
>>
>> // joseph w. clark , phd candidate
>> \\ usc marshall school of business
>>
>>
>> ----------------------------------------
>>> Date: Mon, 2 Jul 2012 20:05:12 +0200
>>> From: [hidden email]
>>> To: [hidden email]
>>> 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
>
> ______________________________________________
> [hidden email] 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.

David Winsemius, MD
West Hartford, CT

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: carpet plots

Jim Lemon
In reply to this post by Joseph Clark
On 07/03/2012 06:21 AM, 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)?
>
>
Hi Joseph,
Have a look at color2D.matplot and color.legend in the plotrix package.
There is also sampcolorlegend in the shape package.

Jim

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: carpet plots

John Kane
In reply to this post by Joseph Clark
Anything here that might help
http://learnr.wordpress.com/2010/01/26/ggplot2-quick-heatmap-plotting/

John Kane
Kingston ON Canada


> -----Original Message-----
> From: [hidden email]
> Sent: Mon, 2 Jul 2012 13:21:25 -0700
> To: [hidden email], [hidden email]
> Subject: Re: [R] carpet plots
>
>
> 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)?
>
>
> // joseph w. clark , phd candidate
> \\ usc marshall school of business
>
>
> ----------------------------------------
>> Date: Mon, 2 Jul 2012 20:05:12 +0200
>> From: [hidden email]
>> To: [hidden email]
>> 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
>>
>> ______________________________________________
>> [hidden email] 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.
> ______________________________________________
> [hidden email] 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.

____________________________________________________________
FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your desktop!

______________________________________________
[hidden email] 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.
Loading...