Displaying 20 results from an estimated 200 matches similar to: "Sorting order of reorder with multiple variables"
2011 Sep 01
1
Background fill and border for a legend in dotplot
Dear R help group
I've been working on this plot for a while now and now getting around to the
minor adjusments. I would like to be able to put a border and background
fill around the legend in this plot.
I understand the legend 'bty' should do this have this capablity but not
sure how the syntax works in this case
###### initalise
library("lattice")
2011 Sep 15
1
Colour code y-axis labels on a dot plot
Dear R helpers
I would like to be able to colour code the y-axis labels on a complex dot
plot by a variable known as company (of which there are only two). The code
is below and data attached.
Thanks
MarkM
library("lattice")
library(latticeExtra) # for mergedTrellisLegendGrob()
# set size of the window
windows(height=10, width=7,rescale=c("fixed"))
##read the data to a
2011 Sep 10
0
Mutiple vertical reference lines with a dotplot
Dear R helpers
I would like to plot vertical reference lines for yearly averages the
variable being plotted. In this case there are three years 2002, 2009 and
2010 for a variable Resc_Gt.
I've attempted to get the 2002 mean plotting (2.27) using the 'abline'
command but no joy.
Ideally I would like to be able to compute and plot the means of the three
years automatically using a
2011 Sep 15
1
Move the x-axis labels to the top of the dotplot
Dear R helpers
I would like to move the x-axis labels, which plot automatically at the base
of a dot plot to the top of the plot. Is there a way to do this?
Code snippet below
with(Cal_dat,
dotplot(reorder(paste(Mine,Company), Resc_Gt) ~ Resc_Gt,
fill_var = Commodity,
pch_var = factor(Year),
xlab_var = factor(Company),
pch = c(21, 22, 23),
2011 Sep 15
1
Move the main titel to the left of the plot
Dear R helpers
I wish to move the main title, which appears on a dotplot to be right
aligned with the left axis. Is there are parameter associated with dotplot
'main' that allows the title to be placed where I want it?
Code snippet relating to dotplot is below.
with(Cal_dat,
dotplot(reorder(paste(Mine,Company), Resc_Gt) ~ Resc_Gt,
fill_var = Commodity,
2011 Aug 19
2
Auto key legend does not match plot
Dear R-help members. I am an 'R-learner' (about 6 hours so far) using the
lattice library to create a ranked dotplot and am colour coding the dots by
a variable called "Commodity". However when i use autokey to make a legend
the size (cex) and symbol (pch) do not match what is on the dotplot.
Code is below and image attached
library("lattice")
Cal_dat <-
2011 Aug 21
1
Dot plot with two grouping variables concurrently
Dear R help(ers). I'm an R-learner (about 10 hours now) trying to make a
ranked dot plot where the symbols are coded by two variables concurrently.
I'm trying to use Deepanyan Sarkar's book 'Lattice' as a guide but get the
feeling it is a bit advanced for my level of understanding.
I have three questions
Q1.
Right now I like to know how to get the dual coding working
2010 Aug 22
0
lattice::xyplot() with one factor for points and another for lines - solution
Hi:
Yesterday, I posted a question regarding how to handle different graphical
behavior between two factors in xyplot() [package lattice]. After a public
and private reply from Deepayan Sarkar, the problem has been resolved
nicely, including the addition of a stacked legend for the two factors in
question. The latter requires package latticeExtra.
library(lattice)
library(latticeExtra)
# Test
2010 Oct 26
1
lattice key subtitle
Hello everybody,
Is there a way to add a subtitle to a lattice key?
It is important form me that the subtitle must be linked to the key
because those graphs are produced on a daily temporal scale,
and the numbers of rectangles from the key may be different from day to
day.
Thank you,
Alexandru Dumitrescu
[[alternative HTML version deleted]]
2011 Nov 23
2
Looping and paste
Dear R helpers
I'm trying to make up some labels for plot from this vector
BndY<-seq(from = 18900,to= 19700, by = 50)
using
Ylab<-for(i in BndY) {c((paste(i," to ",i+50,"mN")))}
but the vector created is NULL
However if i use
for(i in BndY) {print(c(paste(i," to ",i+50,"mN")))}
I can see the for loop is making the labels I'm looking for
2011 Oct 04
1
Plotting a polygon with xyplot
Dear R helpers
I would like to plot a string of points as a polygon in xyplot. I'm a bit
lost as to how to get the points plotting in the correct order. I would
also like some hints on how to render or fill the polygon.
Scrpt below and data file attached
Thanks
Markm
library("lattice")
# set size of the window
windows(height=7, width=10,rescale=c("fixed"))
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
2005 Apr 19
3
Help with predict.lm
Hi
I have measured the UV absorbance (abs) of 10 solutions of a substance at
known concentrations (conc) and have used a linear model to plot a
calibration graph with confidence limits. I now want to predict the
concentration of solutions with UV absorbance results given in the new.abs
data.frame, however predict.lm only appears to work for new "conc" variables
not new "abs"
2011 Sep 16
1
Move the x label to the top of an lattice plot
Dear R helpers
With some help from R-help I've moved the x-scale to the top of a lattice
plot using...'alternating'
scales = list(x = list(log = 10),alternating=2),
but now I cannot seem to find a way to move the x-axis label to the top ?
Thanks
--
View this message in context: http://r.789695.n4.nabble.com/Move-the-x-label-to-the-top-of-an-lattice-plot-tp3819397p3819397.html
2004 Aug 27
3
reorder [stats] and reorder.factor [lattice]
It was recently pointed out on the lists that the S-PLUS Trellis suite has
a function called reorder.factor that's useful in getting useful ordering
of factors for graphs. I happily went ahead and implemented it, but it
turns out that R (not S-PLUS) has a generic called reorder (with a method
for "dendrogram"). Naturally, this causes R to think I'm defining a
method for
2006 Aug 09
1
Allowing users to reorder displayed data from a table
I have a list of names and prices from a database to display on a
webpage. I would like to allow the user to be able to display those
items either alphabetically or by price (decending or ascending.) I
would also like the user to be able to list items with a certain price
range of their choosing also. How can I do this in Rails?
Thanks!
--
Posted via http://www.ruby-forum.com/.
2006 Jun 27
0
Ajax reorder
Hi,
I have this code:
<%= sortable_element "item-list-#{@unique_id}",
:complete => visual_effect(:highlight, "item-list-#{@unique_id}"),
:url => { :action => "order" } %>
And an order method in my controller. It doesn''t seem to ever fire that
event when I reorder though. The visual stuff works, but it never gets
into the order
2006 Feb 09
1
How to reorder rows in a table?
Hi,
I have a link table with a location field, here is the code I wrote to
reorder the rows
# move_up action in links controller
def move_up
current_link = Link.find(params[:id])
current_link.location -= 1
current_link.save
same_link = Link.find_by_location(current_link.location)
same_link.location += 1
same_link.save
redirect_to :action =>
2010 Jan 04
0
[RFC 03/12 RESEND PATCH] Btrfs: Reorder __btrfs_map_block to make code more efficient.
Allocate multi structure only after we know the correct size
and do not do unneeded steps when we are only returning length.
Signed-off-by: jim owens <jowens@hp.com>
---
fs/btrfs/volumes.c | 65 +++++++++++++++++++--------------------------------
1 files changed, 24 insertions(+), 41 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 5af76fc..e6599ef 100644
---
2005 Jul 21
0
reorder bug in heatmap.2?
I want to plot a heatmap without reordering the columns. This works
fine in "heatmap":
> heatmap(meanX[selected,], col=cm.colors(256), Colv=NA)
But in "heatmap.2" I get:
> heatmap.2(meanX[selected,], col=cm.colors(256), Colv=NA)
Error in if (!is.logical(Colv) || Colv) ddc <- reorder(ddc, Colv) :
missing value where TRUE/FALSE needed
(Note that instructions for