search for: scale_colour_discret

Displaying 15 results from an estimated 15 matches for "scale_colour_discret".

Did you mean: scale_colour_discrete
2011 Jan 06
1
Help spruce up a ggplot graph
..."area", "disc"), class = "data.frame", row.names = c(NA, 14L)) ggplot(ddata, aes(x = area, y = disc, colour = year)) + geom_point() + geom_line(aes(group = year), size = 1) + scale_y_continuous(name='Percent Well Prepared', limits=c(0, 100)) + scale_colour_discrete('Year') + xlab('') Thanks! Art _______________________________________ Art Burke Associate Education Northwest 101 SW Main St, Suite 500 Portland OR 97204-3213 Art.Burke@educationnorthwest.org Phone: 503-275-9592 http://educationnorthwest.org Need help finding evidence-based answ...
2012 Nov 07
1
change colour of geom_step by scale_colour_manual
...on="hv", size=5.0)+ scale_y_continuous("Rates of initiating first orientation flight", limits=c(0,0.6), expand=c(0,0), breaks=c(0,0.2,0.4,0.6)) + scale_x_continuous("Age of adults (days)", limits=c(0,16), expand=c(0,0), breaks=c(5, 10, 15)) + scale_colour_discrete(name ="Group", breaks=c("ace", "ctrlAM","met"), labels=c("acetone", "untreated","methoprene"))+ theme_bw() + # maek background the...
2009 Mar 20
1
ggplot2: specifying legend titles
I am trying to specify a legend title to be other than the variable name, but I find that the legend splits because scale_shape() takes effect but scale_colour() does not. Can someone spot my error? Here's some toy code that produces the problem on my system (R2.8.1, windows, today's CRAN package updates): library(ggplot2) a <- sample(letters[1:5],100,replace=T) b <-
2010 Aug 14
1
is it possible to map 2 plots(c and d) in a single output plot?
is it possible to map 2 plots(c and d) in a single output plot? library(ggplot2) c <- ggplot(mtcars, aes(qsec, wt)) d <- ggplot (mtcars, aes(qsec, wt)) c + stat_smooth(fill="darkgrey", colour="blue", size=2, alpha = 0.2) d + stat_smooth(fill="darkgrey", colour="red", size=2, alpha = 0.2) -- View this message in context:
2011 Oct 04
0
ggplot2: not displaying annotation (label = expression) in/on graph
...rmat R superscript 2 followed by "=" value, I can now get R^2 = value. However with the following code: ggplot(blData, aes(x = xData, y = yData)) + geom_point(aes(colour = factor(diagnosis))) + geom_smooth(method = "lm") + opts(legend.position = c(0.75, 0.25)) + scale_colour_discrete(name = "Diagnosis") + labs(x = r2format(t0.lm, output = "R^2 == rval", sub = "rval")) + #"Baseline - Automated", y = "Baseline - Manual") + annotate("text", x = 1.35, y = 2.5, label = r2format(t0.lm, output = "R^...
2012 Apr 16
1
ggplot2: scale_shape_manual
Hi, I was trying to replicate one of the graphs given on the ggplot2 website. I have given a sample code below. I would like to combine the legends, since each color is uniquely mapped to a shape. ### library(ggplot2) leaves <- letters[1:8] mat <- matrix(sample(1:1000,32),nrow=16,ncol=2) colnames(mat) <- paste('t',1:2,sep='') df <-
2012 May 10
0
Fwd: Re: need help in R
...eom_tile(aes(x = lon, y = lat, fill = fill), data = GGemz)+ > geom_jitter(aes(x=lon,y=lat, color=fieldworker),data=emz)+ > scale_fill_identity()+ > scale_x_continuous('Longitude', limits = lon_range) + > scale_y_continuous('Latitude', limits = lat_range) + > scale_colour_discrete('') + > opts(title = 'Invitation map of Emzinini, 2012') + > coord_equal() > > this code brings an error says > Error in dev.copy2pdf(device = "x11", file = paste(mapdir, "EmzinoniGG.pdf", : > no device to print from > i am not sure...
2007 Sep 03
1
Legend issue with ggplot2
Dear useRs, I'm struggling with the new version of ggplot2. In the previous version I did something like this. But now this yield an error (object "fill" not found). library(ggplot2) dummy <- data.frame(x = rep(1:10, 4), group = gl(4, 10)) dummy$y <- dummy$x * rnorm(4)[dummy$group] + 5 * rnorm(4)[dummy$group] dummy$min <- dummy$y - 5 dummy$max <- dummy$y + 5 ggplot(data
2010 Oct 19
2
superpose.polygon, panel.polygon and their colors
Dear R-helpers, the problem I'm facing today is to convince lattice to paint some areas in gray. The areas I would like to have in gray, are confidence bands I've googled around in the mailing list archives and eventually find some clues. This link is my starting point http://tolstoy.newcastle.edu.au/R/e2/help/07/04/15595.html I'm reproducing here the code for your convenience est
2013 Apr 13
0
help on smoothing volatility surface..
...#39;, zlab='IV', main='IV Surface')) putsplot <- ggplot(puts, aes(delta, IV, group = factor(maturity), color = factor(maturity))) + labs(x = "Delta", y = "Implied Volatilty", title="Volatility Smile", color = "GooG \nExpiration") + scale_colour_discrete( breaks=c(fractionofyear.levels), labels=c(expiries.formated)) + geom_line() + geom_point() putsplot [[alternative HTML version deleted]]
2010 Nov 23
2
Help with grouped barplot
Given the data structure below, how can I create a bar plot for the values of disc for each area grouped by year? bar <-structure(list(year = c(2003, 2003, 2003, 2003, 2003, 2003, 2003, 2007, 2007, 2007, 2007, 2007, 2007, 2007), area = structure(c(6L, 4L, 1L, 2L, 3L, 5L, 7L, 6L, 4L, 1L, 2L, 3L, 5L, 7L), .Label = c("AK", "ID", "MT", "NW",
2008 Feb 05
2
dynamically add items to key of lattice xyplot
Hi all, is it possible to dynamically add key items to an already existing key, belonging to a lattice xyplot? This is what I do: I make an xyplot with an initial key. Later on, I want to extend this key with more items, as more lines are added to the plot (lines are added using trellis.focus("panel")). I guess I need some function to access the key panel in order to extend it,
2011 May 28
1
ggplot pale colors
Hello i am new to ggplot and i observed a strange behavior. I want to display two groups of points, each group with a different color. But i encountered a problem with the colors. Here is a first example: dataset <- data.frame(Main = c("A", "A", "B", "B"), Detail = c( "b", "c", "1", "2"), resp = runif(4, min
2012 Mar 02
0
ggplot2 0.9.0
...been removed. If you want to change the default scale for an aesthetic, just create a function called `scale_aesthetic_continuous` or `scale_aesthetic_discrete` that returns the scale that you want. For example: p <- qplot(mpg, wt, data = mtcars, colour = factor(cyl)) p scale_colour_discrete <- scale_colour_brewer p * Scales now automatically shrink to what is actually displayed on the plot, not the underlying data used for statistical transformation. If you want the old behaviour, supply `shrink = FALSE` to the facetting specification. (Fixes #125) * `scale_colour_gr...
2012 Mar 02
0
ggplot2 0.9.0
...been removed. If you want to change the default scale for an aesthetic, just create a function called `scale_aesthetic_continuous` or `scale_aesthetic_discrete` that returns the scale that you want. For example: p <- qplot(mpg, wt, data = mtcars, colour = factor(cyl)) p scale_colour_discrete <- scale_colour_brewer p * Scales now automatically shrink to what is actually displayed on the plot, not the underlying data used for statistical transformation. If you want the old behaviour, supply `shrink = FALSE` to the facetting specification. (Fixes #125) * `scale_colour_gr...