search for: guide_legend

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

2017 Jun 25
3
Orden de categorías en gráficos de barras (position = "stack")
...egún tramo de edad." , subtitle = subtit.todos , x = "", y = "Cantidad de asistentes" ) + # , caption = caption) + theme(legend.position = "bottom", legend.direction = "horizontal", legend.title = element_blank()) + guides(fill = guide_legend(nrow = 1), color = guide_legend(nrow = 1), size = 3) #----------- Saludos, Carlos Ortega www.qualityexcellence.es El 25 de junio de 2017, 10:19, jose luis via R-help-es < r-help-es en r-project.org> escribió: > [image: Imagen en el mensaje] > > Es curioso porque aplicando tu scri...
2017 Jun 24
2
Orden de categorías en gráficos de barras (position = "stack")
...amo de edad." , subtitle = subtit.todos , x = "", y = "Cantidad de asistentes" , caption = caption) + theme(legend.position = "bottom", legend.direction = "vertical", legend.title = element_blank()) + guides(fill = guide_legend(nrow = 1), color = guide_legend(nrow = 1), size = 3) + theme(plot.caption = element_text(size = 8, hjust = 0, margin = margin(t = 15)))? [image: Imágenes integradas 1] ? -- Mauricio ------------ próxima parte ------------ Se ha borrado un adjunto en formato HTML... URL: <https://stat.ethz....
2013 Sep 18
1
ggplot2: changing strip text in facet_grid and a legend text problem
...and on the right side of the graph. I want however, the text horizontally on the right side. I do not understand why facet_grid plotted it this way for me. Why? I would also like to change the text in the legend of this plot. I have tried several solutions including: scale_fill_discrete(guide = guide_legend(), labels=c("cyanobacteria", "zooplankton")) scale_fill_discrete(name="organism", breaks=c("cyano", "seston"), labels=c("cyanobacteria", "seston")) for some reason nothing works. I...
2017 Jun 30
0
Multiple "scale_color_manual" statements in one plot (ggplot2, flexible legend challenge)
...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 version deleted]]
2012 Apr 20
1
ggplot2: Legend title
...quot;PCT_ENR_FALL1", "PCT_ENR_FALL2"), labels=c("1st fall", "2nd fall")) + opts(title="Postsecondary Enrollment Rates of High School Graduates", legend.position="bottom", axis.title.y=theme_blank()) + guides(fill=guide_legend(nrow=1)) + xlab("Graduation year") The legend on the resulting plot uses "Enrolled_by" for a title. I'd like it to be able to use "Enrolled by" without the underscore, but thus far I've been unable to get ggplot to use a variable name containing a space. Is th...
2013 May 14
1
Tamaño plots y calidad en grafico ggplot
...abs(x="", y="")+ theme(panel.background=element_rect(fill="white", colour="#B4CDFF"), panel.grid.minor=element_blank(), panel.grid.major.y=element_blank(), axis.text = element_text(colour = "black"), legend.position="none") + guides(fill = guide_legend(label.position = "bottom"))+ coord_flip() #......................................... Un saludo jm~ _______________________________ J. Miguel Marin http://www.est.uc3m.es/jmmarin Dep. of Statistics University Carlos III of Madrid European Union (EU)
2017 Oct 12
1
dual y-axis for ggplot
...,"solid") p <- ggplot(obs, aes(x = Timestamp)) p <- p + geom_line(aes(y = air_temp, colour = "Temperature", linetype ="Temperature")) p <- p + geom_line(aes(y = rel_hum/5, colour = "Humidity", linetype="Humidity")) p <- p + guides(colour=guide_legend(override.aes=list(linetype=override.linetype))) p <- p + scale_colour_manual(values = c("blue", "red")) p <- p + scale_linetype_manual(values = c("twodash", "solid"),guide=FALSE) p I searched for help and used the info I found at this link: https://sta...
2012 Jun 06
5
ggplot incorrect legend
How do I create a legend with ggplot? I think should be getting the FuelTypeNum in the legend. Plot: http://r.789695.n4.nabble.com/file/n4632471/Rplot.jpeg My code is: ggplot(data=tempTable, aes(x=Bands8, y=SubPercent, fill=FuelTypeNum)) + geom_bar(position="stack", stat="identity") + scale_colour_hue('my legend', breaks = levels(tempTable$FuelTypeNum),
2013 May 13
0
Tamaño plots y retoques de ticks en grafico ggplot
...(x="", y="")+ theme(panel.background=element_rect(fill="white", colour="#B4CDFF"), panel.grid.minor=element_blank(), panel.grid.major.y=element_blank(), axis.text = element_text(colour = "black"), legend.position="none") + guides(fill = guide_legend(label.position = "bottom"))+ coord_flip() #........................................................ Un saludo jm~ _______________________________ J. Miguel Marin http://www.est.uc3m.es/jmmarin Dep. of Statistics University Carlos III of Madrid European Union (EU)...
2020 Apr 01
2
añadir líneas verticales con ggplot
...lst),size=1.25) + scale_color_manual(values=c("grey45","navy","skyblue","gold","green3","darkgreen")) + geom_path( data=world, aes(x=long, y=lat,group=group)) + labs(title = "Trophic Patterns - Full Data")+ guides(colour = guide_legend(override.aes = list(size=5))) después hago un loop con for: for (i in seq(from = -180, to = 170, by = 10)){ traindata <- subset(Data, lon < i|lon>= i+10) testdata <- subset(Data,(lon> i & lon<= i+10)) fitrp <- rpart(Clst ~ .- lon - lat, data=traindata,method = &quot...
2017 Oct 12
0
dual y-axis for ggplot
Sorry let me clarify. If I modify the line p <- p + geom_line(aes(y = air_temp, colour = "Temperature")) by p <- p + geom_line(aes(y = air_temp, colour = "Temperature", linetype ="Temperature")) and p <- p + geom_line(aes(y = rel_hum/5, colour = "Humidity")) by p <- p + geom_line(aes(y = rel_hum/5, colour = "Humidity",
2017 Oct 12
2
dual y-axis for ggplot
Hi, To my knowledge, an excellent of ggplot with a second y-axis is https://rpubs.com/MarkusLoew/226759 In this example, the author uses two colors for the two lines, but the line shapes are the same -- both are solid. Could each line have its own color as well as its own shape? For example, can I make the red line with the linetype "twodash", while the blue line with the
2012 Mar 02
0
ggplot2 0.9.0
...emove the need for them. * Axis labels are now centred underneath the panels (not the whole plot), and stick close to the panels regardless of the aspect ratio. GUIDES * Guides (particularly legends) have been rewritten by Kohske Takahashi to provide considerably more layout flexibility. * `guide_legend` now supports multi-row/column legend and reversed order, gives more flexible positioning of title and label, and can override aesthetics settings. This is useful, for example, when alpha value in a panel is very low but you want to show vivid legend. * `guide_colorbar` is a guide specially...
2012 Mar 02
0
ggplot2 0.9.0
...emove the need for them. * Axis labels are now centred underneath the panels (not the whole plot), and stick close to the panels regardless of the aspect ratio. GUIDES * Guides (particularly legends) have been rewritten by Kohske Takahashi to provide considerably more layout flexibility. * `guide_legend` now supports multi-row/column legend and reversed order, gives more flexible positioning of title and label, and can override aesthetics settings. This is useful, for example, when alpha value in a panel is very low but you want to show vivid legend. * `guide_colorbar` is a guide specially...
2013 Mar 06
6
Ggplot2: Moving legend, change fill and removal of space between plots when using grid.arrange() possible use of facet_grid?
Hi, # For publications, I am not allowed to repeat the axes. I have tried to remove the axes using: # yaxt="n", but it did not work. I have not understood how to do this in ggplot2. Can you help me? # I also do not want loads of space between the graphs (see below script with Dummy Data). # If I could make it look like the examples on the (nice) examples page: #