[R] ggplot2

AlexPiche alexandre.piche at mail.mcgill.ca
Mon Jul 8 14:54:07 CEST 2013


Hello Folks,

I have an other problem with ggplot2. This is what I got so far.


levels(xmelt$Var2) <- c("Outright", "Market Move Adjusted")

ggplot(xmelt, aes(x=factor(Var1),value, row=L1, col=Var2, group=Var2)) + 
geom_bar(stat="identity") + facet_grid(Var2~L1, scale="free") + 
xlab("Maturities") + ylab("Basis Points Move") + theme(legend.position =
"none")


<http://r.789695.n4.nabble.com/file/n4671087/greygraph.bmp> 


And I would like to add something like

 + scale_colour_manual(breaks=c(30,20,15,10,7,5,3,2),
values=c("30"=gray(0.8),"20"=gray(0.75),"15"=gray(0.7),
 "10"=gray(0.65),"7"=gray(0.6),"5"=gray(0.55),"3"=gray(0.5),"2"=gray(0.45)))

to set different color of grey to different maturity.

Anyone know how I could do this?

Thank you for your time,

Alex



--
View this message in context: http://r.789695.n4.nabble.com/ggplot2-tp4671087.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list