search for: scale_fill_brewer

Displaying 14 results from an estimated 14 matches for "scale_fill_brewer".

2011 Jul 09
1
Suppressing the labelling of tick marks on ggplot2
Hi, I have the follow ggplot2 code I am running: ggplot(data=bb.res.math,aes(x=factor(id.bb),y=bb.math.comb,fill=BB)) + geom_bar() + facet_grid(BB~.) + scale_fill_brewer(pal="Set1") + ylab("Average Student Residual (Math)") + xlab("Student ID") The number of unique id.bb is 2207 and so my X-axis has a couple of thousands, indistinguishable tick marks that correspond to each id. I am wondering if there is a way to suppress these tick m...
2012 Jan 29
1
ColorBrewer question
Hello, R friends,   I'm trying to change colors of my horizontal bars so that they show a sequence. I chose the ColorBrewer palette "Blues". However the resulting plot doesn't show any changes to the default. I tried several places of "+ scale_colour_brewer(type="seq", pal = "Blues")" with no effect. This is my code:   p <- ggplot(data, aes(x =
2023 Nov 24
1
ggplot adjust two y-axis
...ferently? - First y axis (0-60) - Second y axis (0-2500) ### Figure 1 ggplot(Fig1,aes(BFF,Wert,fill=Studien_Flaeche))+ geom_bar(stat="identity",position='dodge')+ scale_y_continuous(name="First Axis", sec.axis=sec_axis(trans=~.*50, name="Second Axis"))+ scale_fill_brewer(palette="Set1") Thanks a lot Sibylle -------------- next part -------------- A non-text attachment was scrubbed... Name: ggplot.pdf Type: application/pdf Size: 4806 bytes Desc: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20231124/f84b6dbc/attachment.pdf>
2023 Nov 24
1
ggplot adjust two y-axis
...ferently? - First y axis (0-60) - Second y axis (0-2500) ### Figure 1 ggplot(Fig1,aes(BFF,Wert,fill=Studien_Flaeche))+ geom_bar(stat="identity",position='dodge')+ scale_y_continuous(name="First Axis", sec.axis=sec_axis(trans=~.*50, name="Second Axis"))+ scale_fill_brewer(palette="Set1") Thanks a lot Sibylle
2008 Dec 19
1
diagonal lines in legends of ggplot2
...ot, ggplot automatically shows diagonal lines in the legend boxes. Is there a way, to remove these diagonal lines? Here's a simple example: library(ggplot2) df<-data.frame(x=gl(6,1),y=rnorm(6,100,50)) ggplot(df,aes(y=y,x=x,fill=x))+geom_bar(aes(group=x),colour='black',size=1)+ scale_fill_brewer(palette='Greys') Thanks for your help! [[alternative HTML version deleted]]
2020 Sep 23
2
ORDEN GRÁFICO POR MESES
...iario_S2, aes(x=mes_AAA, by = MES , y=ARS_DEB))+ # ASIGNAR VARIABLES geom_bar(stat="identity", width=0.7, # ANCHO BARRAS colour="grey", fill="darkgreen", # ASPECTO (borde y relleno) position = "dodge")+ scale_fill_brewer(palette = "paired")+ # PALETA DE COLORES labs(x="MESES", y="IMPORTES EN ARS",color="Tipo")+ # TITULOS EJES ggtitle("VALORES AL DEBE POR MES") # TITULO GRAFICO #####################################################...
2011 Oct 18
3
Ordering of stack in ggplot (package ggplot2)
...+06, fill = Region)) + opts(title = "Migration to the United States by Source Region (1820-2006)") + labs(x = NULL, y = "Number of People (in millions)n", fill = "") b <- a + geom_bar(stat = "identity", position = "stack") b <- b + scale_fill_brewer(palette = "Set1") immigration_theme <- theme_update(axis.text.x = theme_text(angle = 90, hjust = 1), panel.grid.major = theme_line(colour = "grey90"), panel.grid.minor = theme_blank(), panel.background = theme_blank(), axis.ticks = theme_blank(), legend.position = &q...
2010 Sep 20
1
ggplot2 - bar colour
...95-1999 16.64 >12 4 2000-2004 10.56 <6 5 2000-2004 10.71 6-12 6 2000-2004 17.49 >12 7 2005-2009 6.48 <6 8 2005-2009 6.55 6-12 9 2005-2009 7.35 >12 Basically I'm after the ability to specify the fill colours and only seem to be able to do the outside colour. Using 'scale_fill_brewer(pal="Set1/2")' worked to change the colours but that only has limited options. The about qplot line is just where I got to after trying a fair few different combinations. Any help appreciated. Thanks http://r.789695.n4.nabble.com/file/n2546693/Screen_shot_2010-09-20_at_5.11.59_PM.pn...
2009 Dec 04
2
[ggplot2] Wind rose orientation
Aloha all, I love using ggplot. It took a while to get used to the grammar of graphics, but it is starting to get easy now that I am thinking in a more structured way. A question. I'm making a wind rose that I'd like to be oriented with due north straight up. I've discovered that the orientation is sensitive to how north is represented. When north is represented as 0,
2023 Nov 24
1
ggplot adjust two y-axis
...ferently? - First y axis (0-60) - Second y axis (0-2500) ### Figure 1 ggplot(Fig1,aes(BFF,Wert,fill=Studien_Flaeche))+ geom_bar(stat="identity",position='dodge')+ scale_y_continuous(name="First Axis", sec.axis=sec_axis(trans=~.*50, name="Second Axis"))+ scale_fill_brewer(palette="Set1") Thanks a lot Sibylle
2023 Nov 24
1
ggplot adjust two y-axis
...ferently? - First y axis (0-60) - Second y axis (0-2500) ### Figure 1 ggplot(Fig1,aes(BFF,Wert,fill=Studien_Flaeche))+ geom_bar(stat="identity",position='dodge')+ scale_y_continuous(name="First Axis", sec.axis=sec_axis(trans=~.*50, name="Second Axis"))+ scale_fill_brewer(palette="Set1") Thanks a lot Sibylle -------------- next part -------------- A non-text attachment was scrubbed... Name: plot2.pdf Type: application/pdf Size: 4386 bytes Desc: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20231124/f1a8bab7/attachment.pdf&gt...
2023 Nov 24
1
ggplot adjust two y-axis
...ferently? - First y axis (0-60) - Second y axis (0-2500) ### Figure 1 ggplot(Fig1,aes(BFF,Wert,fill=Studien_Flaeche))+ geom_bar(stat="identity",position='dodge')+ scale_y_continuous(name="First Axis", sec.axis=sec_axis(trans=~.*50, name="Second Axis"))+ scale_fill_brewer(palette="Set1") Thanks a lot Sibylle
2016 Apr 09
1
Run script R
...=0.3) + ? scale_y_continuous ("Distance from source, km", limits=c(-500,10000), labels=function(x){x/1000}) +? scale_x_continuous ("Time, seconds", limits=c(0,2)) +? scale_colour_brewer("Distance between cars, m", palette="Dark2", guide = "none") +? scale_fill_brewer("Distance between cars, m", palette="Dark2") +? scale_linetype_manual("Distance between cars, m", values=c(1,2,3,4,5,6,7,8)) +? theme_custom () +? theme (legend.position = c(0.99,-0.05), legend.justification=c(1.0,0), legend.direction = "horizontal") if (!fil...
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),