Hi, I am doing composite plots with the package plot3D. One of my variables is
qualitative and indexed to integers, and I would like the legend for it to have
labels located at the integer values (midpoints), and not at the breaks between
classes. In the example below, the Elev Classes legend
gton, USA
> -Original Message-----
> From: Karline Soetaert [mailto:karline.soeta...@nioz.nl]
> Sent: Wednesday, June 21, 2017 4:16 AM
> To: Waichler, Scott R
> Subject: RE: customizing color key with plot3D
>
> There is an example in the colkey help file:
>
> exa
Hi, I want to use a discrete color ramp with plot3D, and show NA values as
white (default). I get unexpected results per the following.
# as in help(slice3D) example:
par(mfrow = c(2,2))
x <- y <- z <- seq(-1, 1, by = 0.1)
grid <- mesh(x, y, z)
colvar <- with(grid, x*exp(-x^2 - y^2 - z^2))
slice
I'm learning how to use ggplot in a programming approach where I supply
variable names on the fly. Using aes_ doesn't work as I expected when x =
factor(x). Is this a bug or am I not understanding something?
# toy dataset
df <- data.frame(LogicalVar = c(FALSE, TRUE, FALSE, TRUE, FALSE, TRUE),
Hi,
For years I've been writing text to the beginning of files with cat(append=F) ,
then following that text with data written by write.table(append=T). It is now
giving me an error message. I'm using R-3.1.2. What gives?
df <- data.frame(x = 1, y = 1:10, z = 10:1)
cat(file="junk.txt", sep=
Hi, I can't install package rgl. The last lines from the install process
talking about the error are:
** testing if installed package can be loaded
sh: line 1: 11949 Segmentation fault
'/files3/R/R-3.2.1_install/lib64/R/bin/R' --no-save --slave 2>&1 <
'/tmp/RtmpQCpp6N/file2b115f4f8e1d'
> > Hi, I can't install package rgl. The last lines from the install process
> > talking
> about the error are:
>
> I'd guess you have an OpenGL problem. Does glxgears run?
Yes, it does. I wasn't aware of the program before you mentioned it, but a
display opens with 3 gears and here is some
Hi, I have a 3D finite element mesh where each element (cell) is defined by 8
vertices. Each element is a regular polyhedron. The overall domain is a block
in shape, but its horizontal principal axes are not coincident with x and y
(i.e. the domain is rotated about the z-axis).
I want to pl
Hi,
I encountered the problem below where the last value in the chron vector
created with seq() should have a time of 15:30, but instead has 15:15. What
causes this and how can I make sure that the last value in the chron vector is
the same as the "to" value in seq()?
library(chron)
dt1 <- c
Hi, I am using levelplot() to plot a primary response surface, z1. I wish to
write a custom panel function that will let me plot another surface z2 = f(x,y)
over z1. The second surface z2 is either NA or 1, and at locations where z2 =
1, I will use a color with low alpha to let the the z1 surf
I would like to use the functions in the plot3D package but I am having trouble
getting the axis limits to work correctly. The slices plotted by the code
below go beyond the bounds of the persp box and obscure the axis information.
How can I show just the part of the domain within x.limits and
Hi,
I have some very large (~1.1 GB) output files from a groundwater model called
STOMP that I want to read as efficiently as possible. For each variable there
are over 1 million values to read. Variables are not organized in columns;
instead they are written out in sections in the file, like
Hi,
I found that apply.monthly() in xts does not work as I expected in the case of
a sparse timeseries:
my.dates <- as.Date(c("1992-06-01", "1992-06-24", "1992-06-30", "1993-06-22",
"1994-06-07", "1995-06-08"))
my.xts <- xts(1:6, my.dates)
start(my.xts) # "1992-06-24"
end(my.xts) # "1995-06
I'm having trouble understanding the output from as.windrose(). For one
thing, data on a boundary between sectors seem to be left out of the
counts. I assume that explains the missing point in the output below
(angle 45). Shouldn't one side of each sector interval be open, to
include values such
Dan,
> May I ask you to report this as an issue on the oce webpage,
> so that others can see the discussion? (The "R help" is
> perhaps not the right place to report bugs ... and, yes, this
> is a bug.)
> http://code.google.com/p/r-oce/issues/list
Yes, I will.
> A possible solu
I am looking for examples of how to plot with contour3d() to a PNG or PDF file,
add axes and other elements to the isosurface plot, and use contour3d in
conjunction with lattice. Regarding lattice, I'm not necessarily looking for
conditioning on the data shown in the isosurface plots, just a wa
ection 4.4
will be very helpful to me.
Scott Waichler
Pacific Northwest National Laboratory
P.O. Box 999, Richland, WA 99352
scott.waich...@pnl.gov
509-372-4423, 509-341-4051 (cell)
>
> luke
>
> On Thu, 11 Feb 2010, Waichler, Scott R wrote:
>
> > I am looking for e
I'm making some 3D plots with contour3d from misc3d and wireframe from lattice.
I want to view them from below; i.e. the negative z-axis. I can't figure out
how to do so. I would like my point of view looking up from below, with the z,
y, and x axes positive going away. Can anyone tell me th
How can I eliminate the border drawn by default around a wireframe plot? I've
tried using border=NA and box=FALSE to no avail.
Scott Waichler
Pacific Northwest National Laboratory
scott.waich...@pnl.gov
__
R-help@r-project.org mailing list
https://s
Luke,
Thanks for your previous advice on using misc3d; I've been able to get a good
start with it. Most of my colleagues use Tecplot for graphing and are
wondering if I can make "cut-aways" using R. An example is attached. The idea
is show a 3D isosurface of one property together with a 2D c
Martyn,
> The maintainer of the RHEL RPMs no longer has an i386 machine
> running EL4, and cross-building on an x86_64 machine did not
> work, so I did not distribute them.
>
> As noted in a previous thread, there is a project to port the
> Fedora R RPMs to Enterprise Linux:
>
> On Thursday 2
Regarding the screen argument in wireframe(), here is what I understand about
how it works after much trial-and-error:
After each rotation, new axes are in effect defined for the next rotation as at
the start: x is to the right of the 2D view, y is towards the top, and z is
positive out of the
I see that R 2.9.0 *.rpms have been compiled for RH EL5, i386 and
x86_64, and also for EL4 x86_64, but not for EL4 i386. Is this an
oversight or will that version no longer be compiled?
Scott Waichler
Pacific Northwest National Laboratory
scott.waich...@pnl.gov
__
Hi,
I am using xmlToList() in a loop with a call to a webservice, per the code
below.
# Loop thru target locs
for(i in 1:num.target.locs) {
url <- paste(sep="/", "http://www.earthtools.org/timezone";, lat[i], lon[i])
tmp <- xmlToList(url)
df$time.offset[i] <- tmp$offset
sys
I have a 3D field of a scalar variable (x, y, z, value). Is there a way to
generate a vector field from this data--gradient at defined points? I found
the rasterVis package for 2D data, but as yet nothing for 3D data.
Thanks,
Scott Waichler
Pacific Northwest National Laboratory
Richland, WA
sc
Hi,
pip2d() doesn't seem to work correctly for me. I have a plot of a triangle
that a query point fits inside, but the point is defined as outside the polygon
by pip2d.
library(ptinpoly)
verts <- matrix(c(594891,115309,59,117201,594891,117201), ncol=2, byrow=T)
query <- matrix(c(594885.0
v2, Queries = query)
> [1] 1
>
> Cheers,
> B.
>
> On 2014-04-18, at 6:00 PM, Waichler, Scott R wrote:
>
> > Hi,
> >
> > pip2d() doesn't seem to work correctly for me. I have a plot of a
> triangle that a query po
Hi,
I want to apply a custom function to all the elements of one matrix. The
function uses the value in the same i,j in a second matrix. How can I use
apply() or similar function to avoid nested loops in i and j?
Thanks,
Scott Waichler
Pacific Northwest National Laboratory
Richland, WA, USA
n1[i,j] && length(ind.not.na) > 0) {
ans[i,j] <- a1[i,j,ind.not.na[1]] + m2[i,j]
}
}
}
Scott Waichler
> -Original Message-
> From: Bert Gunter [mailto:gunter.ber...@gene.com]
> Sent: Wednesday, April 30, 2014 12:18 PM
> To: Waichler, Scott R
> Cc: r-he
Here is a working example with no random parts. Thanks for your patience and
if I'm still off the mark with my presentation I'll drop the matter.
v <- c(NA, 1.5, NA, NA,
NA, 1.1, 0.5, NA,
NA, 1.3, 0.4, 0.9)
a1 <- array(v, dim=c(2,2,3))
m1 <- matrix(c(NA, 1.5, 2.1, NA), ncol=2, by
if(length(ind.not.na) > 0) {
return(condition1*(a1[idx,ind.not.na[1]] + m2[idx])) # doesn't work;
improper indexing for a1
}
}
vec <- sapply(seq(length(m2)), evaluate)
Scott Waichler
> -Original Message-
> From: David Winsemius [mailto:dwinsem...@comcast.net]
>
> > Sapply or mapply may work, I haven't used these much and will try to
> learn better how to use them. Your use of sapply looks good; but I'm
> trying to understand if and how I can bring in the operation on a1. This
> doesn't work:
> >
> > evaluate <- function(idx) {
> > ind.not.na <- which(!
ow my computing will be more
efficient.
Thanks also to David and the others who responded to my question. It all
helped. --Scott Waichler
> -Original Message-
> From: arun [mailto:smartpink...@yahoo.com]
> Sent: Thursday, May 01, 2014 6:24 AM
> To: R. Help
> Cc: Waich
I am processing grayscale TIF images that represent X-rays of a sand- and
gravel-filled tube. Each image represents a plane through the porous medium,
and I need to classify each pixel in the image as void or solid. For the most
part, voids are dark and solids are bright, but there are many gr
This is a correction to a post from 3/10/09. I just wanted to get this in the
archive. It is the same thread as
http://www.mail-archive.com/r-help@r-project.org/msg48762.html
Thanks to Matt Oliver for bringing this to my attention.
The correct code for my.interp.surface() follows.
# A fun
Hi, I am unable to install the package rJava. I tried doing what the output
suggests, but it doesn't help. How can I get R to find/recognize my Java
installation? I am running R-2.15.0.
waichler@snow> sudo R CMD javareconf
Java interpreter : /usr/bin/java
Java version : 1.6.0_22
Java home
Milan,
Merci. I did find the javah file and put it in /usr/bin, where R can now find
it.
However, I still get a similar error message when trying to install rJava, i.e.
configure: error: One or more Java configuration variables are not set.
The only field that doesn't have a value now are t
Hi, I've read up on readBin() and chapter 6 in the R Data Import/Export manual,
but I still can't read a binary file. Here is how the creator of the file
described the code that would be needed in Fortran:
"Every record has a return in fortran. The length of each record is nx*ny*4.
To read y
I am trying to use rgenoud and snow with an external model and file I/O.
Unlike the typical application of rgenoud and snow, I need to run an
external executable and do pre- and post-processing of input and output
files for each parameter set generated by genoud(). I'm hoping that
someone can sugg
I want to get the minimum arc (in degrees) needed to include a set of
compass directions. I would like to use the range.circular() function
of the package circular, because that package understands a compass-type
of angle convention, but it gives results I don't understand. Howver, I
can get the
I would like to use aggregate.ts() and apply() on circular data, but I
can't figure out how to get the circular data components to pass
through:
library(circular)
x <- circular(c(20, 30, 355, 5, 345, 25), units = "degrees")
% I want to get the mean angle for each successive pair; answer should
be
Thank you very much, Deepayan. There is just one more feature I'd like
to get, the ability to add the contour lines. My revision to your code
below prints too many lines. What needs to be changed?
--Thanks,
Scott Waichler
[EMAIL PROTECTED]
library(gridBase)
library(lattice)
data(volcano)
pa
> > Thank you very much, Deepayan. There is just one more feature I'd
> > like to get, the ability to add the contour lines. My revision to
> > your code below prints too many lines. What needs to be changed?
> You need to name arguments here. as.double(at) is being
> matched to 'nlevels', b
> Does the contour() solution work? If not, there's not really
> much that can be done.
Yes, I figured out how to add the naming of arguments. This works
great:
library(gridBase)
library(lattice)
data(volcano)
panel.filledcontour <- function(x, y, z, subscripts, at, col.regions =
cm.colors,
There's already an announcement about R 2.8.0, and yet there are still
no R-2.7.2 binaries (rpms) for Redhat Enterprise Linux 4 and 5. Can the
usual responsible party get on it? Can the system be improved to get
more timely builds out on CRAN?
Thanks,
Scott Waichler
Pacific Northwest National La
I just updated my Redhat EL systems to R-2.7.2, and tried to update my
packages as well. Lattice is one that failed. What do I need to do?
R version 2.7.2 (2008-08-25)
> install.packages("lattice", repos = "http://cran.fhcrc.org/";)
Warning in install.packages("lattice", repos = "http://cran.fh
> > I just updated my Redhat EL systems to R-2.7.2, and tried
> to update my
> > packages as well. Lattice is one that failed. What do I
> need to do?
>
> Install the R-devel RPM? (Assuming you installed R from an RPM.)
Yes, I installed R from an RPM. Installing the R-devel RPM worked on
o
I would like to use a map or aerial photo as a background to plotting
solid lines and text, and semi-transparent color contours, in base and
lattice graphics. Plot coordinates need to be consistent with the
georeferenced background. For example, a color contour plot would have
an gray-toned aeri
Greg,
> The rimage package has functions for reading in and plotting
> jpeg files that you could use for displaying the photograph.
> If you then can find 2 points in the image (not on the same
> horizontal or vertical line) for which you know the
> coordinates in the coordinate system that y
Dr. Ripley,
Thank you, yes, it's the anti-aliasing thing again. I'm using Redhat
EL4, R-2.8.0, and pdf(). I had the problem with images displayed in
xpdf, even with xpdf -aa no. I do not get the problem in Adobe Reader
7.0 for Linux. I'll try harder to remember this point.
Scott Waichler
Pac
I wanted a simple function for bilinear interpolation on a 2-D grid, and
interp.surface() in the fields package didn't quite suit my needs. In
particular, it requires uniform spacing between grid points. It also
didn't have the "visual" reference frame I was looking for. Here is an
alternative f
I am trying to use a background photo in a lattice plot. I am using the
rimage and TeachingDemos packages to plot the photo and translate from
the photo coordinates in pixels to geographic coordinates, which is what
I want to use for plotting contours, lines, etc. The (unrunable) code
below does
> I am trying to use a background photo in a lattice plot. I
> am using the rimage and TeachingDemos packages to plot the
> photo and translate from the photo coordinates in pixels to
> geographic coordinates, which is what I want to use for
> plotting contours, lines, etc. The (unrunable) co
Hi,
I'm trying to install rimage on a Mac OS X 10.4 machine. I followed the
advice in previous R-help threads and got over the hurdles of having the
header files in the right places, among other things. But I can't
figure out what to do with this error.
ice.pnl.gov:/home/waichler<949>system_pro
Hi, I want to plot 2d cross sections from physical model output in a 3d domain,
where the same cross section is represented at different times in the lattice
panels. The cross section is a set of sf polygons, where one attribute is
being plotted, with a color ramp. Can anyone point me to an
55 matches
Mail list logo