adding overall facet label

38 views
Skip to first unread message

scu...@nps.edu

unread,
Sep 27, 2011, 1:33:31 PM9/27/11
to ggplot2
Hi All,

Is there a way to add an overarching facet label to a plot? For
example, in Fig 7.7 (pg 126, ggplot2 book), I'd like to add "cut" over
the "D", "E", etc.. I'd like to do a similar thing if there are
additional facets.

thanx
steve

Adam_L...@keybank.com

unread,
Sep 27, 2011, 4:45:45 PM9/27/11
to scu...@nps.edu, ggplot2
If you put in the facet_grip function, labeller="label_both," the name of the facet variable, along with a colon, will precede the value.



For example, if you have x<-c(x1,x2,x3) and y<-c(y1,y2,y3), then...

facet_grid(x~y, labeller="label_both") produces:

x: x1 |  x: x2 | x: x3

and

y: y1 | y: y2 | y:y3





Adam Loveland

--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example:
http://gist.github.com/270442

To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options:
http://groups.google.com/group/ggplot2

This communication may contain privileged and/or confidential information. It is intended solely for the use of the addressee. If you are not the intended recipient, you are strictly prohibited from disclosing, copying, distributing or using any of this information. If you received this communication in error, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. This communication may contain nonpublic personal information about consumers subject to the restrictions of the Gramm-Leach-Bliley Act. You may not directly or indirectly reuse or redisclose such information for any purpose other than to provide the services for which you are receiving the information. 127 Public Square, Cleveland, OH 44114


If you prefer not to receive future e-mail offers for products or services from Key
send an e-mail to mailto:DNERe...@key.com with 'No Promotional E-mails' in the SUBJECT line.

Upton, Stephen (Steve) (CIV)

unread,
Sep 27, 2011, 5:30:13 PM9/27/11
to Adam_L...@keybank.com, ggplot2

Thanks Adam! Worked like a charm.

 

steve

Reply all
Reply to author
Forward
0 new messages