similar to: Dot plot with two grouping variables concurrently

Displaying 20 results from an estimated 300 matches similar to: "Dot plot with two grouping variables concurrently"

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 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 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 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,
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"
2000 Feb 29
0
mapping of colornames into hsv: half way done
Ok, now we have the mapping of color names to color codes (see below) and conversion to rgb (something like Ben Bolker's function), but how to convert rgb to hsv? Thanks to Brian Ripley, Peter Dalgaard and Ben Bolker Details below Regards Jens etc/colors.big maps 455 names to rgb in S syntax etc/rgb.txt maps 657 names to rgb in C syntax, but unlike colors() it has mixed upper and
2009 Jan 19
2
plotting arrows with different colors and varying head size
Dear list, I would like to plot arrows with different colors according to arrow length, and also (if possible) with head size proportional to arrow length. The idea is to make a quiver-like plot of matlab with wind speed data. So far, I´ve been able to use different colors, but I need to find a more efficient way to recode arrow length intervals into colors. On the contrary, I can't define
2009 Mar 05
1
is there any option like cex.axis in ggplot2?
Dear list,   I made boxplots using ggplot and want to control for x- and yaxis. Using "plot" I can do it by setting cex.axis equally to any size but can't figure out how to do it with ggplot.     ggplot(dat, aes(x = factor(time), y = volume)) + opts(axis.title.x=theme_text(size=8),axis.title.y=theme_text(size=8)) + geom_boxplot() + geom_jitter(aes(colour = id))+labs(x =
2004 Feb 17
2
Lattice graphics and strip function
I am looking for examples of code that demonstrates the fine tuning of the strip panels in lattice graphics and uses plotmath characters. The code for the graphic is as follows: xyplot(lagy ~ n | rho1 * rho2, data= data, layout=c(2,6), span = 1, xlab = "Sample Size", ylab = "Bias in the Coefficient for the Lag of X", type = "o") rho1 is a four level factor
2012 Feb 07
3
Lattice - different axis length
Dear all, I have a question about the lattice package, more specifically about the control of the x-axis length in the different panels. I use the following code to make the stacked barchart: barchart(country ~ climatechangefocalpoint + meteorologyservice + adaptationorvulnerability + cdmcarbonmarkets + energy + aviationmaritimetransport + forestry + pressofficer|period, data=graph5,
2008 Mar 23
2
ggplot2 - legend for fill coulours
Dear All, I am trying to build a stacked bar plot, where I define the colours to use. I have asked this before, and I was using a solution in http://thread.gmane.org/gmane.comp.lang.r.general/100649/focus=100673 (thanks, Thierry). However, it looks this works only when the data are in the sequence of the levels in the factor defining the fill colours. When the sequence is different, the
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()
2012 Jan 10
2
stacked barplot colour coding
Hi all, i'm fairly new to R and its graphing, but having unsuccessfully 'googled' and checked this forum to find answer to my problem, i'm posting my question here. I'm trying to plot stacked barplot. I have simple data that looks like this: bg ag 0.41 2.81 0.37 2.91 0.31 2.06 0.32 2.39 every row indicates a factor (1,2,3,4, see below in names.arg). Now when i plot
2009 Mar 23
1
changing order of lattice plots
Hi, This is another question relating to my 2 factor figure. densityplot(~End-Begin | Type * Chromosome, data=Mon, layout=c(5,12), xlab="Element Length",type="percent", col="grey60", strip=strip.custom(style=3, bg="grey90", par.strip.text=list(cex=0.5))) I would like to flip the plot so those at the bottom are at the top and so on. I have tried using a
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 <-
2012 Oct 03
5
error bars on line plot with error bars using ggplot
I'm new to this and struggling away with ggplot. I need to plot some line graphs for about 4 series. I have the values to plot and also the value of the standard error of the value. Is it possible to plot the standard error bars when the value are already calculated as opposed to letting R do the analysis to calculate the SE bars? Any simple example would be most appreciated. Thanks J