Subjects
Home
mod jk2 https
Donation of JAXP 1 3 Sources to Apache
R annoyances
RE: Finding out when the aspnet admin worker process has recycled
Favorite Linux Distribution
eigenvalues of a circulant matrix
Apache Install
Reachin apache from outside
Ant should have an ext directory
Warning: Documentroot doesn 't exist
Can this be Done?
RE: Multilanguage Application
RE: Simple Question On setting up Sub Domain site
Lack of independence in anova()
How to close connection instead of sending 403?
winning the case for ANT
Re: adding php
New Ant GUI 'Ant 's Nest '
Narrowing Down A Strange Problem
Ant Task: sshexec
R Graph Gallery : categorization of the graphs
I 've been hacked, I need some help please
RE: Anyone working with DotNetNuke?
RE: Exception Handling Opinion
hex format
RE: IIS stopped working :(
<for > Build Failed:problem
RE: Separation of Objects from Logic
RE: Tracking pages with long request execution time
sending email to multiple destination
Web Site
ant UI
Easy cut & paste from Excel to R?
Win32 Apache Restart
Improving Tasks
HELP! PLEASE!
RE: Adding Controls to a Page
read table
RE: ASPNET account doesn 't exist!
Best way to uninstall Apache2 on red hat
from win to linux how to web page
XMLParseException changes and creation of XMLLocator2
Re Post: rewrite backslash to forward slash
Target or macrodef?
Page display problem XPSP2
Authentication problems
Dynamic Dictionary Data Type?
Newbie unable access my www from outside
off topic question: Latex and R in industries
Conflict between xtable and Hmisc when using Sweave?
Very old problem without any new solution
mod rewrite help
Basic Authentication question
RE: Code Security
calling ant from java program
prevent double signing
Re: Controlling Copy/Paste/Print
Using R to illustrate the Central Limit Theorem
web server slow too much slow
access to user directories
Links
Home
Official R Project Site
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
Contour plot

Contour plot

2005-02-09       - By Mulholland, Tom
Reply:     1     2     3     4     5     6     7     8     9     10  

x <- rep(seq(1,10),10)
y <- rep(seq(1,10),each = 10)
z <- matrix(100 + x*0.5 + y*0.5,ncol=10,byrow=T)
contour(z)

or back to where you were originally


x <- 1:10
y <- 1:10
# z <- 100:110
z <- 1:100
contour(matrix(z,ncol=10))

read the help on contour it states that
z: a matrix containing the values to be plotted ('NA's are
         allowed).  Note that 'x' can be used instead of 'z' for
         convenience.

So

contour(matrix(runif(100),ncol=10))

works

I can't actually say why there is an x and a y


x <- log(1:10)
y <- log(1:10)
z <- 1:100
contour(matrix(z,ncol=10))

did not do what I expected it to do. I expected the contour lines to become
compressed gradually.

> -----Original Message-----
> From: dhkblaszyk@(protected) [mailto:dhkblaszyk@(protected)]
> Sent: Wednesday, 9 February 2005 12:44 AM
> To: r-help@(protected)
> Subject: Fw: [R] Contour plot
>
>
> I understand that I need to have a (in this case) square
> matrix with all the
> data. But the question now is;
>
> - can the contourplot not interpolate the missing values

What missing values? A 10 by 10 grid is 100 possibilities, you gave 10. Which
10?

x <- 1:10
y <- 1:10
z <- matrix(numeric(100),ncol=10)
diag(z) <- 1:10
contour(z)

or


x <- 1:10
y <- 1:10
z <- matrix(numeric(100),ncol=10)
z[trunc(runif(10) * 100)] <- 1:10
contour(z)

are two possibilities

>
> or alternatively
>
> - I have fit a model to the z data (z = 100 + 0.5x + 0.5y).
> How can I make
> from this model a "square" matrix z to make a contour plot?
>
> Kind regards, Darius Blaszijk
>
> ----- Original Message -----
> From: "Achim Zeileis" <Achim.Zeileis@(protected)>
> To: <dhkblaszyk@(protected)>
> Cc: <r-help@(protected)>
> Sent: Tuesday, February 08, 2005 1:51 AM
> Subject: Re: [R] Contour plot
>
>
> > On Tue, 8 Feb 2005 01:15:06 +0100 dhkblaszyk@(protected) wrote:
> >
> > > Hello,
> > >
> > > I would like to make a contourplot of the following data;
> > >
> > > > x <- 1:10
> > > > y <- 1:10
> > > > z <- 100:110
> > >
> > > By doing >contour(x,y,z) I get the following error;
> > >
> > > "Error in contour.default(x, y, z) : no proper `z' matrix
> specified"
> > >
> > > How do I fix this??
> >
> > x and y specify a grid and thus z must provide a value for each
> > combination of the x's and y's! For example:
> >   x <- y <- 1:10
> >   contour(x, y, outer(x, y))
> > Also look at
> >   outer(x, y)
> > and read ?contour.
> >
> > Z
> >
> > > Kind regards, Datius Blaszijk
> > >
> > > [[alternative HTML version deleted]]
> > >
> > > ______________________________________________
> > > R-help@(protected) mailing list
> > > https://stat.ethz.ch/mailman/listinfo/r-help
> > > PLEASE do read the posting guide!
> > > http://www.R-project.org/posting-guide.html
> > >
>
> ______________________________________________
> R-help@(protected) mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>

______________________________________________
R-help@(protected) mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html