Displaying 20 results from an estimated 300 matches similar to: "Background fill and border for a legend in dotplot"
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 Aug 25
1
Sorting order of reorder with multiple variables
I've been building a ranked dot plot for several days now and am sorting the
data using the reorder command. What I don't understand is how reorder
works when mutiple varibles are plotted by grouping. In the example below
I'm using re-order to sort by a variable name Resv_Prop, but I'm plotting up
to three different values of Resv_prop (different Year values) for each
factor.
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 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
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 <-
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]]
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"
2007 Jan 19
2
PMI patch for OpenSSH 4.4p1
I have just published a pre-alfa of a patch that has the goal to make
OpenSSH aware with PMI.
Reference site : http://nutmay.sourceforge.net
--
Vincenzo Sciarra
2011 Aug 20
1
Detaching LVM volume from Windows guest
Hello,
I have some difficulties regarding to above title. Windows as guest OS
is running on KVM(Ubuntu natty).
After attaching LVM volume to guest OS and did "safely remove device" in
guest windows, detaching volume was failed.
> root at localhost:/opt/win# virsh detach-disk testwin vdc
> error: Failed to detach disk
> errpr: operation failed: detaching virtio-disk2 device
2011 Aug 15
2
Alternative and more efficient data manipulation
Hello list,
## I have been doing the following process to convert data from one
form to another for a while but it occurs to me that there is probably
an easier way to do this. I am often given data that have column names
which are actually data and I much prefer dealing with data that are
sorted by factors. So to convert the columns I have previously made
use of make.groups() in the lattice
2009 Feb 04
5
ggplot: problem with fill option in stat_smooth()
Hi all,
I am using ggplot2 and continuing to find it very useful and pretty.
However, I am trying to create some graphics for publication that would be
included in an MS Word document (not my choice!) in Windows Vista.
The problem is that I want to use stat_smooth() to add an fitted linear
model line along with its 95% confidence band, but I cannot seem to get the
confidence band in a format
2007 Oct 24
2
Graphics - plotting two graphs
Hi,
I wanted to plot 2 lines on a single graph. Each graph has one axis that can be common. The code that I'm using is:
-------------------------------------------------------
par(mfrow=c(1, 1))
x1 <- c(2, 4, 6, 8, 10, 12)
x2 <- c(10, 20, 30, 40, 50, 60)
y1 <- c(10,12,15,22,34,21)
y2 <- c(40, 130, 150, 145, 40, 30)
par(las=1, mar=c(4, 4, 2, 4))
plot.new()
2009 Sep 11
1
bar chart with means - using ggplot
Like this?
# example using qplot
library(ggplot2)
meanprice <- tapply(diamonds$price, diamonds$cut, mean);meanprice
cut <- factor(levels(diamonds$cut), levels = levels(diamonds$cut))
qplot(cut, meanprice, geom="bar", stat="identity", fill = I("grey50"))
dev.new() # create a new graph to compare with qplot
# Example using ggplot
ggdata <-
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
2011 Oct 26
1
Using abline in lattice
Dear all,
being a relative beginner in R, I apologize for posting the second question
within two days.
So I want a stacked barchart, which should look like the one produced by
this code:
Tuvalu <- c(9,3,4,0,3,0,0)
Singapor <- c(38,0,0,0,12,19,0)
Samoa <- c(26,16,2,0,5,2,0)
PNG <- c(56,4,0,5,2,0,56)
Micronesia <- c(6,0,0,0,0,0,0)
graph4 <-
2008 Mar 31
1
Reorder the x-axis using lattice
Dear list,
Is there a way to reorder the xaxis using lattice. Using the following data, the x-axis is ordered as BP GH MH PF RE RP SF VT but I would like the x-axis to be ordered as PF RP BP GH VT SF RE MH.
Kön Skalor Tillfälle Medelvärde
1 Kvinnor BP 1-inskrivning 36.45283
2 Kvinnor GH 1-inskrivning 38.62255
3 Kvinnor MH 1-inskrivning 62.88889
4
2009 Feb 03
1
Time series plots with ggplot
Hi,
I am newbie user of ggplot and would like some assistance in
implementing time series plots.
I'd like to know how the tsdiag plot can be made in ggplot?
Thanks
Harsh Singhal
Decisions Systems,
Mu Sigma Inc.