Displaying 20 results from an estimated 2000 matches similar to: "lattice package plots"
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
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
2011 Nov 15
1
equal spacing of the polygons in levelplot key (lattice)
Given the example:
R> (levs <- quantile(volcano,c(0,0.1,0.5,0.9,0.99,1)))
0% 10% 50% 90% 99% 100%
94 100 124 170 189 195
R> levelplot(volcano,at=levs)
How can I make the key categorical with the size of the divisions equally spaced in the key? E.g., five equal size rectangles with labels at levs c(100,124,170,189,195)?
Apologies if this is obvious.
-A
R> version
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
2009 Apr 03
2
Titles on lattice colorkey
Dear R-ers,
I'm not sure if this is a missing feature, a support request, or stupidity on my part, but nevertheless, its a question. Is it possible to add titles to colorkey legends? As far as I can tell, there is a command to do it for normal "key" legends, but not for "colorkeys".
eg it works for a normal key, created through auto.key
xyplot(decrease ~ treatment,
2010 Mar 25
4
3 levelplots and 1 colorbar
I want to create a simple plot containing three levelplots with one colorbar.
I used the "Three levelplots" code below, but the third levelplot is drawn
smaller than the first two. However, if I try the "Two levelplots" code below
it works well. Can anybody tell me how could I draw three levelplots (of the
same size) with one colorbar.
Thanks in advance, Joaquin
### Three
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
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
2004 Feb 25
2
levelplot add line
R folks,
I can't seem to find the instructions in the help files for the lattice
package that explain how to add lines, such as with lines() or ?, to a
levelplot. I'd be grateful if someone could point me in the proper direction.
Cheers,
Jeff
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jeff Jorgensen
Center for Limnology jcjorgensen at wisc.edu
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 Dec 23
5
iid.test
I downloaded the iid.test, but I can't run it. I get the following message:
Error: could not find function "iid.test"
Where am I supposed to save this package in order that it works?
Thanks,
EZ
[[alternative HTML version deleted]]
2006 Sep 07
1
legend problems in lattice
Hi!
Im sorry to bother you but I cant fix this.
I use the lattice function levelplot and I want the colorkey at the
bottom, how do I get it there? I have tried changing colorkey.space and
changing in legend but I cant get it right, plz help
btw I'd like to speceify strings to appear at the tick marks and also
there I fail any thoughts?
cheers
Ernst
2012 Aug 26
1
Multiple lattice levelplots from matrices
Dear R-users,
My goal is to construct a levelplot (from the lattice package) with 4 or more individual plots sharing the same colorkey. While this appears to be relatively simple using functions, I haven't been able to find a solution using data matrices. An example of a working levelplot with just one matrix:
d <- replicate(10,rnorm(10))
levelplot(d)
I have found partial solutions using
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
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
2003 Dec 19
1
Different scales for keys in lattice levelplots
Can anyone tell me how to obtain a custom scale for
the colorkey in each levelplot of a lattice? I am using
lattice and levelplot to plot z = f(x, y) for multiple z
variables. x and y values are the same across plots, but
units for z are different and therefore I need to create
a custom scale for each plot's key. It follows that I need
to place each plot's key inside that plot's
2009 Apr 08
2
sourced plot commands not working
I have source a script running with no errors that ends in these lines:
==============
for (i in 2:3) win.graph()
dev.set(2)
levelplot(avg ~ procs * size, rrt, drape=T, colorkey=T,main="ops/sec",scales=list(x=list(tick.number=15),y=list(log=10)))
dev.set(3)
levelplot(avg ~ procs * size, ort, drape=T, colorkey=T,main="ops/sec",scales=list(x=list(tick.number=15),y=list(log=10)))
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 Mar 26
1
using alpha transparency for lines in levelplot
Hello, I'm having trouble with using the alpha channel for transparency
with lines with lattice levelplots.
If I use transparency via the alpha argument to rgb to overplot lines on
levelplot the transparent colour affects all of the region colours in the
plot.
Can anyone explain why the difference in region colours?
#### Warning: this code attempts to create PDF files in working
directory