separate fill scales for margins?

7 views
Skip to first unread message

adam.l...@pnc.com

unread,
May 16, 2012, 11:56:40 AM5/16/12
to ggp...@googlegroups.com
Hi,

How can you vary fill gradients for margins separately?

Starting with the following...

tst.melt <-

structure(list(beg = structure(c(4L, 4L, 4L, 3L, 3L, 3L, 2L,
2L, 2L, 1L, 1L, 1L, 4L, 3L, 2L, 1L), .Label = c("total", "c",
"b", "a"), class = "factor"), end = structure(c(1L, 2L, 3L, 1L,
2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 4L, 4L, 4L, 4L), .Label = c("a",
"b", "c", "total"), class = "factor"), Freq = c(30L, 20L, 10L,
15L, 25L, 10L, 11L, 13L, 20L, 56L, 58L, 40L, 60L, 50L, 44L, 154L
)), .Names = c("beg", "end", "Freq"), row.names = c(NA, -16L), class = "data.frame")


ggplot( tst.melt,aes(end,beg)) +
geom_tile( aes(colour=Freq,fill=Freq,width=7),alpha=.4)+
opts( axis.line=theme_blank()
      ,axis.ticks=theme_blank(),strip.background=theme_blank()
     ,legend.position="none",axis.text.x=theme_blank()
     ,axis.title.x=theme_blank(),title="Ending PD")+
labs( y="Beginning PD")+
facet_grid( .~end,drop=FALSE,scales="free")

Thanks very much!




The contents of this email are the property of PNC. If it was not addressed to you, you have no legal right to read it. If you think you received it in error, please notify the sender. Do not forward or copy without permission of the sender. This message may contain an advertisement of a product or service and thus may constitute a commercial electronic mail message under US Law. The postal address for PNC is 249 Fifth Avenue, Pittsburgh, PA 15222. If you do not wish to receive any additional advertising or promotional messages from PNC at this e-mail address, click here to unsubscribe. https://pnc.p.delivery.net/m/u/pnc/uni/p.asp
By unsubscribing to this message, you will be unsubscribed from all advertising or promotional messages from PNC. Removing your e-mail address from this mailing list will not affect your subscription to alerts, e-newsletters or account servicing e-mails.


Reply all
Reply to author
Forward
0 new messages