Displaying 20 results from an estimated 1000 matches similar to: "vectors on top of contours, and lattice"
2009 Mar 25
2
need help with ordering of plots
I want to do a series of contour plots, 4 in all. The data is coming
from a data frame named "nd.frame", which has elements "xdf", "ydf",
"zdf", and "pndt". I am treating "pndt" as a factor, and it has four
levels. I make a call to the lattice graphics routine "contourplot"
like so:
2004 Aug 06
1
: (Lattice): Overlaying more than one trend surface using contourplot() and wireframe()
Hi,
Is there a way to plot more than one trend surface using the functions
contourplot() and wireframe(). I have found an add=T in contour(), but
no equivalent argument in contourplot() and wireframe()?
I have taken the example 11-2 (pages 441-451) from Design and analysis
of experiments (Montgomery 2001, 5th edition) to see if this could be
done in R. I have managed to plot individual
2007 Jan 29
1
overlay xyplot on contourplot in lattice in R
Hi everybody,
I want to do a contourplot in lattice with my raw data overlaid on it(xyplot)
which seemed to be a very easy thing to do.
I've tried it in many ways, but I haven't succeeded at obtaining it.
let's say x, y, and z as the variables that comes from the data frame ''ex'':
therefore my countourplot is as followed :
contourplot(z ~ x * y, cuts=550)
I
2003 Jul 27
1
contourplot:how to get it to label all contours like 'contour'
Hi,
one of the nice things about contour is that it labels all contour lines.
contourplot only labels each particular elevation a single time.
i.e., if there are two contour lines corresponding to z = 45, it will only
label one of them.
is there a way to get contourplot to automatically label all the contour lines,
even those that are repeated?
i ask because i want to plot contour plots *w/
2009 Apr 16
1
weird error with contourplot
Sorry if I am cluttering up this list with too many rank beginner
questions. But I *am* a rank beginner, and I am at my wit's end with
this one:
I have a data frame df, with components x,y,z. This command to make a
contour plot with lattice graphics works just fine:
> contourplot(z~x*y,data=df,cuts=20)
Then I try
> contourplot(z~x*y,data=df,cuts=20,region=T)
And it dies on me with
2013 Feb 14
1
Clip a contour with shapefile while using contourplot
Hi, I have done the interpolation for my data and I was able to create the
contours in multipanel with the help of Pascal. Now, I want to clip the
contour with the shapefile. I want only the portion of contour to be
displayed which falls inside the boundary of the shapefile.
The data mydata.csv can be found on
https://www.dropbox.com/s/khi7nv0160hi68p/mydata.csv
The data for shapefile can be
2005 Apr 07
3
4D Plot ??
Tried to post this last night, but it doesn't seem to have appeared.
Using R 2.0.1 on Windows XP + SP2.
I am traveling, away from my usual references. I'm trying to make a
4-dimensional plot: a levelplot with overlaid contours, with different
response variables represented by (1) colors on the levelplot and (2)
the contour lines.
First try was filled.contour + contour but the key
2009 Mar 15
1
Contour plots of four two-dimensional matrices
I have four large two-dimensional matrices of which I want to create contour
plots. Something like
filled.contour(<matrix>)
contourplot(<matrix>)
works but only gives me one plot at a time. If I combine the four matrices
into one three-dimensional matrix, which I'll name "seven", there should be
a way of doing something like this
contourplot(seven[,,k] for k in 1 to 4)
2009 May 13
1
overlap contour
Friends,
I have two covariance matrices (m1 and m2) of same size (150x150). I used
contourplot function to make contour plots individually (c1 and c2). I am
interested in making one contourplot overlapping the two individual contours
so that the portion of the plot above and below the diagonal can represent
the c1 and c2. Someone suggest me how can i do the same.
Is there any way that i can
2011 Mar 29
3
passing arguments via "..."
I would like to do something like the following:
Fancyhist<-function(x,...) {
# first, process x into xprocess somehow, then ...
if (is.null(breaks)) { # yes, I know this is wrong
# define the histogram breaks somehow, then call hist:
hist(xprocess,breaks=breaks,...)
} else {
# use breaks give in calling argument
hist(xprocess,...)
}
}
But, those of you who know R better
2008 Dec 03
1
how do I eliminate excess levels in lattice contourplot key / legend?
I'm working on a contourplot( ) graph, the subject of several previous
posts to this list. The contours express probabilities from 0 - 1, but the
key that is automatically generated by contourplot pads the probability
scale with values that are impossible (i.e, range goes from -0.2 to 1.2),
which will be confusing to those who view the plot. How can I get the
scale to just run from 0 - 1?
2010 Jun 22
1
contour plots
Hi All,
I'm having difficulty making a contour plot a would like some help.
A standard contourplot can be made by having an x,y, and some matrix (shape
x*y) with contents:
x = 1:10
y = 1:10
cont <- matrix(runif(100,min=1,max=2),nrow=10,ncol=10)
filled.contour(x,y,cont)
Looks very nice.
Sometimes data comes in a different format however. Basically an x and an y,
and a vector z with all
2007 Dec 13
2
Overlaying trellis xyplot on contourplot
Friends: I wish to overlay data points on a contour graph. The following
example produces a nice contour plot, but I have not mastered the concept
of using panel functions to modify plots. Can someone show me how to
overlay the data points (given after contour plot statement) on the
contourplot?
--Seth
model <- function(a,b,c,X1,X2) # provide model
function for contour
2010 Jun 08
1
add one point to contourplot()
Hi All,
I want to add one point to contourplot(). I used contourplot() in my code like
contourplot(z ~ a + b |c, data)
I understand there is plot.axes argument for filled.contour(), but it did not work for my code. I also tried plot() and text() for contourplot(), but got this error: "plot.new has not been called yet"
Any suggestion for adding a point in contourplot()?
Thank you very
2006 Feb 10
1
the proper way to use panel functions in lattice package?
Hi,
I was trying to stack a topographic map readed in from esri shapefile with a
contour map and a vector map. However, the plotMap(maptools) and
contourplot(lattice) do not seem to work well on top of each other. Here is
part of my code.
xrange<-range(225000:350000)
yrange<-range(2685000:2810000)
basemap <- read.shape("Twn25_town_dxf_Polygon.shp")
2008 Nov 24
2
lattice contourplot background covers inward-facing ticks
I wish to have inward-pointing ticks on my contourplot graph, but the
colored background produced by the "region=TRUE" statement covers the
ticks up, is there any way around this? Sample code below. --Seth
library(lattice)
model <- function(a,b,c,d,e, f, X1,X2) # provide model function
for contour plot
{J <- a + (b*X1) + (c*X2) + (d*X1*X2) + e*(X1^2) + f*(X2^2)
pp
2009 Nov 19
2
plot filled.contour over continent map
Dear all,
As a newbie in R I would like to do the following (simple?) thing:
to plot a filled.contour plot over a map showing country boundaries (e.g. for Europe)
What i do is:
map('worldHires',xlim=c(-10,40),ylim=c(35,70),boundary = TRUE,border=0.1)
map.axes()
filled.contour(mslp, zlim=c(1000,1020),color.palette = colorRampPalette(c("blue", "white",
2005 Feb 08
2
Fw: 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
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:
2010 Jul 10
1
contourplot by year
Hi - I have a dataframe with 4 variables - long, lat, temp and year. I would
like to plot temperature by lat and long in contour plots by year. There
are 391 data points. When I try
contourplot(temp~long*lat|year,data=hake,cuts=10,labels = TRUE,contour =
TRUE,pretty = TRUE,region=TRUE)
I get plots with dots around by data, but not contour lines or filled in
regions.
I have also used the
2010 Sep 27
1
smooth contour lines
Is there an easy way to control smoothness of the contour lines?
In the plot I am working on due to the undersampling the contour
lines I am getting are jugged, but it is clear "by eye" these should
be basically straight lines.
In maps package I found smooth.map function, but maybe there is a more
generic way
of accomplishing the same thing.
Ideally there would be an option to control