search for: scale_shape_manu

Displaying 19 results from an estimated 19 matches for "scale_shape_manu".

Did you mean: scale_shape_manual
2012 Apr 16
1
ggplot2: scale_shape_manual
...ow=16,ncol=2) colnames(mat) <- paste('t',1:2,sep='') df <- as.data.frame(cbind(mat,leaves)) vals <- 1:length(leaves) names(vals) <- leaves p <- ggplot(df,aes(t1,t2)) p + aes(shape = factor(leaves)) + geom_point(aes(colour = factor(leaves))) + scale_shape_manual("",values=vals) #### Which parameter do I need to change? thanks! [[alternative HTML version deleted]]
2023 Oct 31
0
Missing shapes in legend with scale_shape_manual
...ata = b2, aes(x = Date, y = bg)) + geom_line() + geom_point(aes(shape = medStat), size = 3)+ geom_point(aes(shape = exercise),size = 3)+ scale_y_continuous(name = "Blood glucose (mg/dL)", breaks = seq(100, 230, by = 20) ) + geom_hline(yintercept = 130) + scale_shape_manual(name = "Conditions", labels = c("Missed meds", "Missed exercise"), values = c(20, 4) ) Note that this method then gets very close without the scale_shape_manual, too. Hope that helps. Ti...
2023 Oct 31
0
Missing shapes in legend with scale_shape_manual
...? geom_line() + > ? geom_point(aes(shape = medStat), size = 3)+ > ? geom_point(aes(shape = exercise),size = 3)+ > ? scale_y_continuous(name = "Blood glucose (mg/dL)", > ???????????????????? breaks = seq(100, 230, by = 20) > ? ) + > ? geom_hline(yintercept = 130) + > ? scale_shape_manual(name = "Conditions", > ???????????????????? labels = c("Missed meds", > ??????????????????????????????? "Missed exercise"), > ???????????????????? values = c(20, 4) > ? ) > > > Note that this method then gets very close without the > scale_s...
2023 Oct 30
1
Missing shapes in legend with scale_shape_manual
...(aes(x = Date, y = bg, shape = missed_meds), alpha = 0) + #Invisible point layer for shape mapping scale_y_continuous(name = "Blood glucose (mg/dL)", breaks = seq(100, 230, by = 20) ) + geom_hline(yintercept = 130) + scale_shape_manual(name = "Conditions", labels = c("Missed meds", "Missed exercise"), values = c(20, 4), ## size = 3 ) However, the legend just prints an empty...
2012 Apr 20
1
ggplot2: Legend title
...labels=c("1st fall", "2nd fall")) + scale_fill_manual(values=c("orange", "red"), breaks=c("PCT_ENR_FALL1", "PCT_ENR_FALL2"), labels=c("1st fall", "2nd fall")) + scale_shape_manual(values=c(21, 22), breaks=c("PCT_ENR_FALL1", "PCT_ENR_FALL2"), labels=c("1st fall", "2nd fall")) + opts(title="Postsecondary Enrollment Rates of High School Graduates", legend.position="bottom...
2008 Oct 14
1
ggplot2 plot with symbols and then add line
...]/(f+coef(z)["b"]) pred <- data.frame(GPP = f, TSS = y) #this is what I can do qplot(TSS, GPP, data=r, colour=as.factor(RiverMile)) + geom_line(data=pred, colour ="black") #I would like to do this and then add the nls line qplot(TSS, GPP, data=r, shape=as.factor(RiverMile))+scale_shape_manual(values=1:9) #how do you undo the mapping of shape to add a line is my question #thanks -- Stephen Sefick Research Scientist Southeastern Natural Sciences Academy Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is p...
2010 Aug 23
2
change order of plot panels in faceted ggplot/qplot
...(m) <- paste('V', 1:5, sep = '') b <- data.frame(site = factor(rep(c('A', 'B', 'C', 'D', 'E'), each = 12)), status = factor(rep(rep(c('D','L'), each = 3), 10)), as.data.frame(m)) qplot(V2, V1, data=b, shape=status) + scale_shape_manual(value=c(1,16)) +facet_wrap(~site,nrow=2) What I would like to do is keep the 2 row shape, keep the order (A,B,C) of the top plots, but have the D and E panels in this example align under the B and C plots. Is this possible using qplot? Many thanks, Ali
2015 Sep 04
2
Añadir escala a un mapa
...ase_layer=ggplot(datos, aes(x=lon, y=lat))) + geom_point(data=datos, aes(shape = INSTRUMENTACIÓN, color=INSTRUMENTACIÓN, fill=INSTRUMENTACIÓN), size=7.5) + geom_text(data=coord.geog[1:7,], aes(x=coord.geog$lon[1:7], y=coord.geog$lat[1:7], label=nombres.pluvio, hjust=0.2, vjust=1), size=5.2) + scale_shape_manual(values=c(21,24,22,23)) + geom_polygon(aes(x=long, y=lat, group=group), data=area.fort, colour="black", fill="brown", alpha=0.15, size=0.5, linetype=5) dev.off() Mi duda es: ¿Cómo puedo añadir una escala en km a esa imagen (mapa)? Gracias de antemano, Saludos, Marcos...
2008 Jul 03
1
ggplot2 legend for vertical lines
...library(ggplot2) > dfr <- data.frame(values = sin(1:50/10), > fact = rep(c("short", "long"), each=25, length=50), > fact2 = rep(1:10, length=50)) > > p <- qplot(fact2, values, data=dfr, colour=fact) > p + geom_vline(intercept=c(5), colour = 1) + > scale_shape_manual(name="fact", values=1) # tried this, but useless > here Any tips on changing these settings would be welcome! Sincerely, baptiste _____________________________ Baptiste Augui? Physics Department University of Exeter Stocker Road, Exeter, Devon, EX4 4QL, UK Phone: +44 1392 2...
2011 Sep 24
1
ggplot2: expression() in legend labels?
Is there any way to use expression() in legend labels with ggplot2? It seems that things like > scale_shape_manual(value = c( > x = expression(italic(x)), > y = expression(italic(y)) > )) don't work. Thanks very much :) -- Using GPG/PGP? Please get my current public key (ID: 0xAEF6A134, valid from 2010 to 2013) from a key server. -------------- next part -------------- A non-text atta...
2011 Aug 24
1
Scatter plots, linear regression in ggplot2
...ression lines their equations and Rseq inside or below the plot? Code: set.seed(955) df <- data.frame(cond = rep(c('A', 'B'), each=10), xvar = 1:20 + rnorm(20,sd=3), yvar = 1:20 + rnorm(20,sd=3)) ggplot(df, aes(x=xvar, y=yvar, shape=cond)) + scale_shape_manual(values=c(1,2)) + geom_smooth(method = "lm", se=FALSE) + theme_bw()+ geom_point(size = 5)+ opts(title = "Xvar vs. Yvar", plot.title = theme_text(face="bold", size=16), axis.text.x = theme_text(angle=90),...
2011 Nov 08
2
nesting scale_manual caracteristics in ggplot
...;,'B','C','D','E','F','G'), values=c('A'='solid','B'='dotted', 'C'='solid','D'='dashed', 'E'='dashed','F'='dotted', 'G'='dotted'))+ scale_shape_manual(breaks=c('A','B','C','D','E','F','G'), labels=c('A: Line 8','B: Line 9','C: Line 10','D: Line 11', 'E: Line 12 ','F:Line 13','G:Line 14'),...
2011 Sep 07
2
ggplot2-Issue placing error bars behind data points
...APSE) p<-ggplot(data=NerveSurv,aes(x=Time,y=SAP)) p+geom_point(aes(colour=factor(Temp), shape=factor(Temp), fill=factor(Temp)), size=4) +geom_errorbar(limits,width=0.2) +xlab("Time (min)") +xlim(c(0,50)) +ylab("Normalized Spontaneous Action Potential Rate") +ylim(c(0,1.6)) +scale_shape_manual("Acclimation Temperature",breaks=c(8,18,25), labels=c("25 ºC", "18 ºC", "8 ºC"),values=c(21,21,21)) +scale_fill_manual("Acclimation Temperature",breaks=c(8,18,25), labels=c("25 ºC", "18 ºC", "8 ºC"),values=c(colours()...
2011 Oct 26
2
Help with a scatter plot
Hi everyone, I have some data about a market research which I want to arrange in one plot for easy viewing, the data looks something like: Product Color StoreA StoreB StoreC StoreD Price ProdA R NA 4.33 2 4.33 35 G NA 4.33 2 4.33 35 B
2017 Jun 30
0
Multiple "scale_color_manual" statements in one plot (ggplot2, flexible legend challenge)
...oint(aes(y=Y2, color=GRP, shape=GRP, size=1.5)) + geom_smooth(aes(y=Y2), method= 'loess', size=1.5) + geom_line(data=df2, aes(y=P50), size=1.5) + geom_ribbon(data=df2,aes(ymin=P025, ymax=P975), alpha=0.2) + theme_bw() + scale_color_manual(name="",values=cols.point) + scale_shape_manual(name="",values=shape.point) + guides(color = guide_legend(title='Group', override.aes=list()), size = 'none', shape = guide_legend(title='Group', override.aes=list(size=2))) + theme(legend.position = "top") [[alternative HTML ver...
2019 Jul 18
4
Gráfico tiempos de supervivencia
Hola, Sí, lo puedes hacer de esta forma... #----------------- set.seed(20) DATOS <- data.frame ( ID = c (1:10) , TIEMPO = sample(1:40, 10, replace=F) , DEF = as.factor(sample(c(0,1), 10, replace=T)) ) library(ggplot2) ggplot( data = DATOS ) + geom_point( aes(x = TIEMPO, y = ID , shape = DEF, color = DEF), size = 5 ) + geom_segment( aes( x = 0, y = ID, xend =
2010 Jul 10
3
a very particular plot
Hi all, Thanks for the really great help I've received on this board in the past. I have a very particular graph that I'm trying to plot, and I'm not really sure how to do it. I think I should be able to use ggplot for this, but I'm not really sure how. I have a data.frame which contains fifty sub frames containing one hundred data points each. I can do a histogram of each of
2011 Feb 10
1
Ggplot: free x-scales in a facet-grid
Hello, I have a ggplot that has the looks of the plot that I want, but it doesn't have the right layout. The data is an ordered melted dataframe: - ID - type (to use for a faced grid) - time - type - time - value (POSIXct) - pos (to use for a faced grid, this is an index to split the plot) The goal of the plot is to create a time line for each ID (different points of time). The ID's
2010 Aug 24
0
mlm for within subject design
...ames(m) <- paste('V', 1:5, sep = '') b <- data.frame(site = factor(rep(c('A', 'B', 'C', 'D', 'E'), each = 12)), status = factor(rep(rep(c('D','L'), each = 3), 10)), as.data.frame(m)) qplot(V2, V1, data=b, shape=status) + scale_shape_manual(value=c(1,16)) +facet_wrap(~site,nrow=2) What I would like to do is keep the 2 row shape, keep the order (A,B,C) of the top plots, but have the D and E panels in this example align under the B and C plots. Is this possible using qplot? Many thanks, Ali --Forwarded Message Attachment-- From...