Displaying 20 results from an estimated 2000 matches similar to: "New R on Mac user fails to run MASS"
2006 May 11
1
Conditional contour plots for estimated density functions using Lattice
Does anybody here have a suggestion for a clever way of creating contour
plots for estimated bivariate density functions conditional on a factor?
The contourplot function in the 'lattice' package only accepts data that
are on the form 'z ~ x * y', not on the form 'x,y' or 'y~x'; otherwise I
could probably have used the panel function to do the needed conversion.
2007 Aug 30
2
Need help putting histograms on the diagonal of a splom plot
Hello,
I am in need of help in putting histograms on the diagonal of a plot
produced with splom().
The plot matrix I am trying to produce is to have standard scatterplots
in the upper-left triangle, contour plots in the lower-right triangle,
and histograms on the diagonal. I have a function that does the first
two, but the histograms on the diagonal has been beyond my ability.
Here is my
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/
2008 May 30
1
Reducing space around lattice wireframe plots
Dear R-help.
When plotting 3D wireframe plots with the lattice package, there is often
a lot of space between the actual plot (i.e., cube) and panel borders. For
a single wireframe, this is not a problem, but when plotting multiple
wireframes, the wasted space decreases the size of the plots very much.
Is there a way to decrease this space/margin? I could not find any
information about it in
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
2008 Sep 18
0
Joint distributions
Dear R-help!
I need to draw contour lines in a plot of wave heights (Hs) versus peak
periods (Tp) showing the joint probabilities of 1-year wave heights~peak
periods, 10-year wave heights~peak periods and 100-year wave heights~peak
periods.
I've used the contourplot() function in the plot I've added in this mail.
You can use the added dataset "Rhelpdata.txt" to reproduce a
2006 May 10
4
lattice package plots
I am using the lattice packge for its levelplot and contourplot. Is it
possible to adjust the line thickness of the 'box' and tickmarks in these
plots?
Thanks for the attention,
Matt Sundling
2006 Jun 24
1
Overlaying 2D kernel density plots on scatterplot matrix
Hi all
We are pretty new to R here and trying to achieve something that we believe
is possible but it?s not easy to work out how to do it.
We are producing scatterplot matrices for e.g. 10 variables. What we would
like to do is superimpose 2D kernel density estimators on top of each plot
so that we end up with a scatterplot matrix of 2D kernel density (contour)
plots.
The kernel density plots
2012 Apr 09
3
how to add 3d-points to bplot {rms} figure?
Hello!
I have created a bplot-figure using this code:
*file <- "2dcali_red.ttt"
ux<-as.matrix(read.table(file, dec = ","))
mode(ux)<-'numeric'
vel<-ux[,1]
ang<-ux[,2]
x<-ux[,3]
y<-ux[,4]
dat<- data.frame(ang=ang, x=x,y=y)
require(rms)
ddist2 <- datadist(dat)
options(datadist="ddist2")
fitn <- lrm(ang ~ rcs(x,4) +
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
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
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")
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 Aug 14
1
How to add lines to lattice plot produced by rms::bplot
I have a plot produced by function bplot (package = rms) that is
really a lattice plot (class="trellis"). It is similar to this plot
produced by a very minor modification of the first example on the
bplot help page:
requiere(rms)
n <- 1000 # define sample size
set.seed(17) # so can reproduce the results
age <- rnorm(n, 50, 10)
blood.pressure <- rnorm(n, 120,
2007 Sep 28
0
transparency of one layer in multiple wireframe plot
Sorry sending this again - is anyone familiar with multiple transparent wireframe plots?
I already checked the ?wireframe, but with no examples and as newcommer its hard to find out a correct code.
If we set drape=F in the example:
g <- expand.grid(x = 1:10, y = 5:15, gr = 1:2)
g$z <- log((g$x^g$g + g$y^2) * g$gr)
wireframe(z ~ x * y, data = g, groups = gr,
scales = list(arrows
2007 May 20
1
lattice contourplot error
Hello,
A weird thing is happening to me. I have a 128x128 elements matrix m
with values between 0 and 1. If I do:
R> library(lattice)
R> contourplot (m, cuts=9)
I get the following error message: Error in validDetails.text(x) :
Invalid 'rot' value
The same for any cuts >9.
I can plot m with contourplot(m, cuts=8) but this is not detailed
enough. The 'normal'
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 Aug 09
1
creating pdf of wireframe
Dear R list,
I have written some code to produce several wireframe plots in a panel. They
look good, but when I try to create a pdf, many (but not all) of the details
I have specified are not reproduced. For example, the line width I have
specified is not reproduced, and neither are the font sizes for the axis
labels. I'm an R novice, so I could really use some guidance.
Here is the code I am
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
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: