Displaying 20 results from an estimated 8000 matches similar to: "Levelplot without margins"
2009 May 05
3
Heatmap without levelplot
Hi there,
as I'm not sure to understand the coloring levelplot uses, I'm looking for
another easy way to create a heatmap like this:
library(lattice)
mat <- matrix(seq(1,5, length.out = 12), nrow = 3)
mat[1,2] <- 3.5
my.at <- seq(0.5,5.5, length.out = 6)
my.col.regions <- rainbow(5)
graph <- levelplot(t(mat[nrow(mat):1, ] ), at = my.at, col.regions =
my.col.regions)
2009 Jan 26
2
heatmap with levelplot
Hi there,
I'd like to create a heatmap from my matrix with
a) a defined color range (lets say from yellow to red)
b) using striking colors above and below a certain threshold (above = "green",
below = "blue")
Example matrix (there should be a few outliers generated...) + simple levelplot
without outliers marked:
library(lattice)
my.mat <- matrix(rnorm(800), nrow =
2009 May 04
4
levelplot question
Hi there,
I have a question concerning the behaviour of the colouring with levelplot. (I
hope, I manage to explain)
If I give the parameters "at" and "col.regions" like this:
at <- c(1,2,3,4,5,6)
col.regions <- c("blue","blue","blue","yellow","yellow","yellow")
Which color would have the value 3.5?
I would
2009 Feb 27
1
levelplot help needed
Hi there,
I'm looking for someone who can give me some hints how to make a nice
levelplot. As an example, I have the following code:
# create some example data
# --------------------------------------
xl <- 4
yl <- 10
my.data <- sapply(1:xl, FUN = function(x) { rnorm( yl, mean = x) })
x_label <- rep(c("X Label 1", "X Label 2", "X Label 3", "X
2012 May 29
1
lattice: add a marginal histogram on top of the colorkey of a levelplot?
Lattice experts:
Can you think of a way to produce a levelplot as below and then add a histogram of the z variable to the top margin of the plot that would sit on top of the color key?
x <- seq(pi/4, 5 * pi, length.out = 100)
y <- seq(pi/4, 5 * pi, length.out = 100)
r <- as.vector(sqrt(outer(x^2, y^2, "+")))
grid <- expand.grid(x=x, y=y)
grid$z <- cos(r^2) *
2011 Apr 06
2
Layout within levelplot from the lattice package
Hi,
I'm a novice with levelplot and need some assistance! Basically, I want a window
which contains 6 levelplots of equal size presented in 3 columns and 2 rows.
I've tried to approach it two ways. The first way leads to this question:
Is there any way to concatenate levelplots from a factor vertically as opposed
to horizontally? I'd like to pair the levelplots by factor.2 on
2008 May 11
1
positioning of color key in levelplot
Is there a way of positioning the color key in levelplot when the axes are on a categorical (rather than numerical) scale? I've put some sample code below. I need to add a secondary y axis to the right side of my plot but then the labels interfere with the color key (which is currently on the right side). Is there a way to shift the color key over a bit more to the right? I've tried
2012 Jun 16
2
aligning axis labels in a colorkey from levelplot
R does a great job with the fine details regarding plots. e.g in the
following:
library(lattice)
y <- -4:4/10
xyplot(y~1, las=1)
the y axis is labelled with numbers -0.4, -0.2, 0.0, 0.2, 0.4 with the
numbers aligned on the decimal point.
How do I get the same behaviour in the colorkey of a levelplot? e.g.
levelplot(matrix(y,3,3))
the numbers in the colorkey seem left-aligned, and
2004 Apr 27
1
helps on levelplot
I'm a new user of levelplot, and are not familiar with the terminology
very well. Is the bar alongside the levelplot indicating color or shade
call "colorkey"? I have to adjust the size of its label, but couldn't
make it so far. This is how I did:
levelplot(z~x*y, grid, at=seq(0,1,by=0.1),
colorkey=list(labels=list(cex=2)))
But I got error message "Error in
2007 Oct 31
3
thicker axis in levelplot
Dear R-help community,
I need to find out how to make the black axis line around my plot thicker in
levelplot, I cannot find the correct command in ?levelplot or ?par - or if it is
there I cannot get it to work - any help would be more that appreciated!
Here's an example script - I would want the code for making the axis bordering
the plot thicker:
x<- seq(pi/4, 5*pi,length=100)
2009 May 02
1
lattice levelplot axis + custom annotations
How would I set the "scales" property of a lattice levelplot, so that
I can add specific annotations at specific positions?
For example, I have a 200 x 1000 element levelplot. Along the y-axis
(along the 1000-element axis) I would like to add annotations on the
left side of the levelplot at elements 120, 300, 500, and 805, which
represent clusters of interest.
Currently I have
2012 Jan 06
1
Can levelplot colorkeys display a logarithmic scale evenly?
I'm using the {lattice} "levelplot" function to make a (more or less) 2-d
histogram, and for the most part it's working fine with my data. However, I
can't get the color key to do what I need. I can give it labels and custom
cutoffs, but my cutoff lines (and hence my labels) aren't evenly spaced, instead
they're more-or-less logarithmic, starting at
2013 Feb 20
1
Problem with levelplot() in a loop
Dear R users,
I am trying to print heatmaps in a loop (with a pause). Idea is to
visualize changing correlations over time and for testing I wrote this
simple (reproducible) code below.
My problem is that levelplot() does not produce any output when I run the
code (though heatmap does). Ideally I would like to use levelplot() as it
produces a neat index on the side indicating the color and the
2006 Feb 12
1
contour lines for levelplot
Hi,
I would like to add contour lines to a (trellis/lattice-) levelplot.
Sure, there is the "contour=TRUE" argument, but this uses
"cuts=..." (which is usually chosen very high for my plots. I guess
cuts=99 is the best you can do (?)) for plotting the contour lines.
Furthermore, I do not like the numbering of the contour lines this
way. Therefore, I tried to add a
2012 Dec 30
2
levelplot
I have two questions;
Do you know how to take out axes in a levelplot? Me doesn't work axes =
FALSE
And I would like to fix the values range of colorkey or legend from my
rainbow col.regions, dou you know how can I fix this values independent
of values database?
Thanks and happy new year!
[[alternative HTML version deleted]]
2007 Oct 23
1
Custom colourkey spacing in levelplot, contourplot
Dear R gurus,
I have got stuck on how to customise the colorkey generated by
levelplot and contourplot, in the lattice package. This best
illustrated by an example:
library(lattice)
levelplot(volcano^20/1e45,at=c(0,0.001,0.01,0.1,1,10))
The reason for raising the volcano dataset to the 20th power is to
create a dataset with a large vertical exaggeration - this is similar
in nature to the data
2004 Feb 11
1
levelplot colorkey
Dear R'ers,
I've scanned available documentation and the web, but I can't seem to
figure out where I've gone wrong in adding numbers to scale the colorkey in
levelplot (Lattice package). For example,
levelplot(z, contour=T, labels=T, cuts=10, region=T,...
colorkey=list(T, space="bottom",
at=seq(0,2000,length=20),
2004 Aug 31
1
add single contour line to levelplot
Hello,
I want to add a single contour line to a levelplot but can't figure out
how to do it 'on-the-fly'. When I include the last line in the code below,
I get the following error:
Error in NextMethod("[") : Argument "subscripts" is missing, with no default
Any tips on how to fix this are greatly appreciated!
Ian Jonsen
2014 Jun 10
2
Como controlar la altura de "colorkey" en levelplot de RatserVis
Hola miembros de la lista,
Estoy utilizando la función levelplot del paquete rasterVis para graficar
un raster y quiero controlar la altura de la referencia de color (colorkey)
del mapa, pero cuando cambio valores en el argumento "height" no parece
provocar cambios. Alguna idea de por qué no está funcionando?
> cobertura
class : RasterLayer
dimensions : 780, 1296, 1010880
2012 Jun 16
2
Adding title to colorkey
A recent paper on visualisation (in Neuron, a leading neuroscience
journal) surveyed how well previous articles in this journal labelled their
graphs (e.g. axis labelling and describing their error bars). Of
particular interest is that (only) 40% of plots labelled what their
colorkey was showing (variable and units).
The paper is at http://dx.doi.org/10.1016/j.neuron.2012.05.001
R is not yet