Displaying 20 results from an estimated 10000 matches similar to: "questions about image()"
2007 May 22
5
Reducing the size of pdf graphics files produced with R
Hi,
Without trying to print 1000000 points (see <http://
finzi.psych.upenn.edu/R/Rhelp02a/archive/42105.html>), I often print
maps for which I do not want to loose too much of coastline detail,
and/or plots with 1000-5000 points (yes, some are on top of each
other, but using transparency (i.e. rgb colors with alpha
information) this actually comes through as useful information.
2004 May 06
1
Problem with filled.contour/image
Quick question - I am having problems creating an orographic image
(similar to volcano example). I have created a map matrix with 3 columns
and over 2million rows.
I have created the matrix as follows:
map<-read.table("map.dat",header=TRUE)
long.grid<-sort(unique(map$long)
lat.grid<-sort(unique(map$lat)
map.matrix<-matrix(map$height,nrow=length(lat.grid),byrow=TRUE)
The
2009 Sep 05
8
Color index in image function
Dear All,
I was looking for the color index in?image function,?such as from topo.colors(n) and etc. but still never found it. For instance, from the help menu.
###########################################
# Volcano data visualized as matrix. Need to transpose and flip
# matrix horizontally.
image(t(volcano)[ncol(volcano):1,])
# A prettier display of the volcano
x <- 10*(1:nrow(volcano))
y
2009 Feb 28
2
filled.contour and time axis
Dear all,
I am using filled.contour and my x-axis consists of a vector of dates,
formatted using as.POSIXct.
When I assign this vector to x in filled.contour, the x-axis in the plot is
correctly formatted as dates.
However, when I use plot.axes=axis(1) in filled.contour the x-axis is not
correctly formatted. I need to opt for the latter because I want to add
additional lines and points to the
2008 Feb 17
2
filled.contour with log axis
Dear all,
I would like to generate a filled.contour plot with log x and y axis,
however using:
filled.contour(as.line,log="xy")
results in a warning message.
Does anybody knos what to do?
Thanks
Thomas
2004 Jun 07
1
filled.contour - color palette so z=0 ONLY is blue
I am trying to create a topographic map of an island - the filled.contour
function works fine except i am experiencing difficulty trying to
represent the sea properly. Basically I want the default colour blue for
any instance where z=0, if I simply use the default topo.color I get
shades of blue for z values up to 220 metres. Is there a way in which I
can specify terrain.color for all values of
2003 Sep 25
1
multiple plot layout and filled contour
Hello everybody,
Could anybody give me a hint how I can use "layout" and "filled.contour" (or "image"
plot with a color legend) together, please?
What I want to do is something like the following example (Two or more plots with a
legend for each at one page):
data(volcano)
layout(matrix(1:2, 1, 2, byrow = TRUE))
for (i in 1:2) {
filled.contour(i*volcano, color =
2009 May 05
2
Lattice: use levelplot as panel for wireframe
Hi,
I want to draw a figure similar to http://dsarkar.fhcrc.org/lattice/book/images/Figure_13_07_stdBW.png
from http://lmdvr.r-forge.r-project.org/figures/figures.html (figure
13.7) . However instead of using a contour plot as a panel for the
wireframe I want to use a levelplot. Can somebody help me with this?
Thanks in advance for any help,
Kind regards,
Anton Bossenbroek
2010 Jan 04
2
Adding a distance scale to a plot?
Do you know what steps I need to take to add a scale to a plot?
I'm pulling my example out of "An Introduction to R: Software for StatisticalModelling & Computing" (see the R code around Figure 76).
I would like to add a scale to the image produced by the following code.? I would like to the scale to list the distance?and units:?
data(volcano)
x <- 10*(1:nrow(volcano))
y
2001 Feb 12
1
3d plots?
Hi all
I'm trying to create a three-dimensional wireframe-type plot,
much like the screenshot shown at
http://www.r-project.org/screenshots/volcano-persp.jpg
In my case, I'm trying to show a density estimate of
two-variable system, using the GenKern package. I've
used the image() and contour() to create a nice shaded plot,
but I've found a 3d plot is often easier for the
2008 Aug 05
1
Add arrows to a filled.contour margin
Hi,
I try to put an arrow to a filled.contour plot. I make this:
filled.contour(volcano, color = terrain.colors,key.axes=F)
arrows(0.95,0,0.95,1,lwd=2)
This work, but the problem is that I find the coordinates at random try, for
other graphic with other scale is other fight with coordinates. Anybody know
a more easy or more generalized way to make this? Somethink like this
2011 Aug 09
1
Transparent color ramp problem
Hello,
I can't seem to add transparency to any color ramp I create using colorRampPalette(). Can someone tell me if it is possible to create transparent colour ramps?
I am attempting to map shaded relief under elevation data. I know I can use the terrain.colors() with the alpha option, but I would prefer to create my own colour ramp using more vibrant colours.
My most recent attempt at
2010 Nov 20
1
Setting a Red->Yellow->Green Color Transition in Image(...) with yellow corresponding with the Mean Value...
In the following example I would like to have the color transition from
Red->yellow->green in the image(...) function, and if possible have the yellow
be set to correspond with the mean value (for the below 75).
?
I was able to figure something like out when using filled.contour(...), e.g.
filled.contour(ak.fan, levels = c(70, 73, 76,?80, 90), color = terrain.colors)
(I still
2009 Feb 06
2
annotating a filled contours plot with a grid of points
Dear R-help members,
I am trying to plot annotate a filled contours plot (with filled.contour)
with a grid of points. I have read ways of annotating it with individual
points but not with grids in another matrix.
Any ideas?
Thank you very much.
Dario
___________________________________
Dario Martin-Benito
CIFOR-INIA
Dpto. Sistemas y Recursos
2009 Feb 06
2
undesired grid in ps/eps outputs generated by filled.contour or image
Hi!
Whenever I save a graphic in ps/eps format generated by filled.contour or
image, an undesired grid is added to it (not visible on the X11 screen). For
example:
postscript("volcano.eps")
filled.contour(volcano,col=gray(seq(0,1,,50)),levels=seq(min(volcano),max(volcano),,50))
dev.off()
Any ideia how to eliminate this grid?
Thanks,
Rachel
[[alternative HTML version deleted]]
2009 Mar 03
1
behavior of squishplot in TeachingDemos
Hi list,
I wonder if anyone has had this experience with squishplot() in the TeachingDemos package.
Taking the example from the ?image help page,
library(TeachingDemos)
x <- 10*(1:nrow(volcano))
y <- 10*(1:ncol(volcano))
layout(matrix(c(1,2,3,4),ncol=2,byrow=TRUE),height=c(2,1))
## 1st plot
op <- squishplot(range(x),range(y),1)
image(x, y, volcano, col = terrain.colors(100))
par(op)
2003 Jul 12
2
help with bivariate density plot question
Dear R users:
I have a dataset with two variables (>20000 observations, two samples from same subject) and I used "kernSur" from library(Genkern) to
get a estimated bivariate density and corresponding plots as follows:
new.data.normal<-data.normal[!is.na(data.normal[,2]),]
x<-new.data.normal[,2]
y<-new.data.normal[,3]
op <- KernSur(x,y, xgridsize=50, ygridsize=50,
2013 Sep 22
2
colores
Como usas la función image puedes consultar la ayuda ?image o help(image) y
encontrarás el siguiente ejemplo donde se usa un diferente color Palette
(mencionada por pepeceb en su respuesta).
x <- 10*(1:nrow(volcano))
y <- 10*(1:ncol(volcano))
image(x, y, volcano, col = terrain.colors(100), axes = FALSE)
# O puedes usar directamente el número para indicar el color
image(x, y, volcano, col =
2007 Jul 24
3
Overlaying a single contour from a new data array in levelplot
Dear R-Help community,
I am trying to overlay a single contour line over a correlation plot using
levelplot in the lattice package. These are the two arrays:
1) a correlation plot over Africa - so each grid square is a different colour
dependent on correlation - this is in an array: result_cor with dim[465,465]
2) a single contour line from a ***different data source*** - this is from data
2011 Mar 02
1
pb with Date format using filled.contour
Hi R-help community,
Can anyone tell me why, while using :
x <- seq(as.Date("2001-01-01"),as.Date("2001-01-01") +
nrow(volcano)-1,1)
y <- seq(1, ncol(volcano),1)
when I plot the volcano matrix with that command :
filled.contour(x,y,volcano)
the graph has a Date format on X-axis, ok ...
... but when adding a contour plot to the filled contour, using this