similar to: vector field from a 3D scalar field

Displaying 20 results from an estimated 4000 matches similar to: "vector field from a 3D scalar field"

2017 Jun 21
0
customizing color key with plot3D
Karline, Thank you for your help. I discovered that in addition to including clim, I needed to omit breaks. This code uses one of your other examples as a starting point and works as intended: persp3D(z = volcano, zlim = c(-60, 200), phi = 20, colkey = list(length = 0.2, width = 0.4, shift = 0.15, cex.axis = 0.8, cex.clab = 0.85), lighting = TRUE, lphi = 90, clab =
2017 Jun 21
0
customizing color key with plot3D
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 has labels at the breaks and nothing at the midpoints. How can I show the class labels at 1:3, and not
2017 Jun 29
0
plot3D color ramp not working as expected
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)) slice3D (x, y, z, colvar = colvar, theta = 60) # # use three discrete classes and colors
2004 Jul 13
1
summary() doesn't work with Date class objects
The handy function summary() doesn't work correctly with Date class objects: > R.version.string [1] "R version 1.9.1, 2004-06-21" > b <- as.Date(c("2002-12-26", "2002-12-27", "2002-12-28", "2002-12-29", "2002-12-30")) > b [1] "2002-12-26" "2002-12-27" "2002-12-28" "2002-12-29"
2012 Apr 13
2
Can't read a binary file
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 you would use the following: nlayx = nx*ny*4 do iz=1,nz,4 read(binary file) var(1:nlayx)
2003 Nov 13
1
Can't get Sweave syntax highlighting with Emacs
I can't get Emacs to automatically do syntax highlighting of Sweave files. I have followed Friedrich's suggestion for code to insert into my .emacs file. The complete section from my .emacs file is given below. When I load a *.Snw file, font is white until I press M-x, then the first code and document chunks get highlighted, but not the rest of the file. Latex and Noweb menus are
2010 Mar 03
2
Screen settings for point of view in lattice and misc3d
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 the correct settings for screen to achieve this? Here is what I've found so far:
2005 Mar 02
1
Rounding parameter values in genoud(), Rgenoud package
I would like to limit the significant figures of the calibrated parameters determined by genoud() in the Rgenoud package. Below is some example output, where column 1 is model run number, columns 2-7 are the parameter values, and columns 8-12 are model fit statistics. I would like genoud to internally limit parameters to 4 decimal places as shown in this output. It is clear that the function is
2004 Jan 15
3
Extracting multiple elements from a list
For a long time I've wanted a way to conveniently extract multiple elements from a list, which [[ doesn't allow. Can anyone suggest an efficient function to do this? Wouldn't it be a sensible addition to R? For example, alist <- list() alist[[1]] <- list() alist[[1]]$name <- "first" alist[[1]]$vec <- 1:4 alist[[2]] <- list() alist[[2]]$name <-
2004 Dec 16
2
Unsightly lines from x*y grid in levelplot with Postscript
When I generate levelplot figures with Postscript, the lines from the underlying grid (i.e., the x and y in z ~ x* y) show up as faint white lines in the output. If I have a dense grid, the lines wash out the contour colors. I can avoid the problem if I use png instead, but that brings up other problems. Any ideas for how I can get Postscript to not show those lines around the cells? Scott
2004 Jun 14
1
polygons around clusters of identically valued nodes in levelplot()
I'm looking for a way to plot lines on top of a levelplot(), where the lines are borders between cells of different values. The clines() function provides contours suitable for continuous data. I am dealing with discrete values, spatial clusters of nodes where each cluster has an integer value, and I want to plot the borderlines between these areas. So, in a levelplot having nodes with
2004 Jul 05
1
Apparent conflict between \Sexpr in Sweave and R2HTML
I have come across an apparent bug in the operation of Sweave. If I load the package R2HTML then execution of \Sexpr{} in an *.Rnw file no longer works. The \Sexpr{} code is simply written to the *.tex file. Below are my *.Rnw file, commands, and output. The Sweave file, Sweave-test-1_short.Rnw: % -*- mode: noweb; noweb-default-code-mode: R-mode; -*- \documentclass{article} \title{A Test
2017 Aug 13
1
ggplot's aes_ doesn't work as expected for x=factor()
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), Var1 = c(0.01, 0.01, 1, 1, 30, 30), pct1 = c(12, 88, 60,
2009 Mar 10
0
Alternative to interp.surface() offered
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 function, followed by an example. # A function for bilinear interpolation on a 2-d
2008 Nov 12
1
rimage doesn't install on Mac OS X 10.4
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_profiler -detailLevel mini SPSoftwareDataType Software: System Software Overview:
2008 Oct 13
2
Using an image background with graphics
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 aerial photograph as a background for overprinted semi-transparent color contours of some spatially
2005 Apr 22
3
Problem with R-2.1.0: install.packages() doesn't work
I installed R-2.1.0 from source on a Linux box running Red Hat Enterprise Linux WS release 4 but install.packages() wouldn't work (see below). When I install R-2.0.1 from RPM on the same system, everything is fine. Version 2.1.0 (2005-04-18), ISBN 3-900051-07-0 . . . > options(CRAN = "http://cran.fhcrc.org/") > install.packages("rgenoud") --- Please select a CRAN
2007 Apr 25
2
levelplot and unequal cell sizes
I am using levelplot() from lattice with grids that have unequal cell sizes. This means that the boundary between two cells is not always half-way between nodes, as levelplot() assumes. The result is that some cell sizes are rendered incorrectly, which can be painfully obvious if using relatively large cells. Is there any work-around? I am using the conditioning capability of lattice and
2010 Feb 11
2
Using contour3d: axes, plotting to file, with lattice
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 way to show multiple plots in one figure and label them. I am new to the packages misc3d and rgl.
2006 Jan 14
2
change lattice panel background color
I can't find a way to change just the panel background color in lattice. I would like NA regions in levelplot() to appear black. I've tried the trellis.par.set() stuff, but it it makes the background of the whole graphic black. Thanks, Scott Waichler Pacific Northwest National Laboratory scott.waichler _at _ pnl.gov