legend

11 views
Skip to first unread message

Felipe

unread,
Jun 3, 2009, 10:33:44 AM6/3/09
to ggplot2
Hi:
See the attached pdf graphic. The legend overlaps a little bit with
the strip. Is there a way to move it over a half a cm?

Felipe

unread,
Jun 3, 2009, 10:35:42 AM6/3/09
to ggplot2
I forgot to mention that the file name is 'Europe.pdf'

Mike Lawrence

unread,
Jun 3, 2009, 10:42:13 AM6/3/09
to Felipe, ggplot2
no attachment received.
--
Mike Lawrence
Graduate Student
Department of Psychology
Dalhousie University

Looking to arrange a meeting? Check my public calendar:
http://tr.im/mikes_public_calendar

~ Certainty is folly... I think. ~

Felipe Carrillo

unread,
Jun 3, 2009, 3:18:54 PM6/3/09
to Mike Lawrence, ggplot2
Try the attachment again...
Europe.pdf

Mike Lawrence

unread,
Jun 4, 2009, 7:14:42 AM6/4/09
to Felipe Carrillo, ggplot2
Ah, I've noticed that happen occasionally myself and it annoys the
heck out of me!

Mike Lawrence

unread,
Jun 4, 2009, 9:27:18 AM6/4/09
to Felipe Carrillo, ggplot2
Here's a couple self-contained examples (a little bit less extreme
than Felipe's example, but you can still see that the bounding box of
the legend overlaps with the panel/strips):


ggplot(mtcars,aes(x=disp,y=mpg,colour=cyl))+
geom_point()+
opts(
legend.background=theme_rect(fill='red',colour='white')
, panel.background=theme_rect()
)

ggplot(mtcars,aes(x=disp,y=mpg,colour=cyl))+
geom_point()+
facet_grid(vs~.)+
opts(
legend.background=theme_rect(fill='red',colour='white')
, strip.background=theme_rect()
)

hadley wickham

unread,
Jun 4, 2009, 10:22:46 AM6/4/09
to Mike Lawrence, Felipe Carrillo, ggplot2
Thanks for the minimal reproducible example. I've added it to my to do list.
Hadley
--
http://had.co.nz/
Reply all
Reply to author
Forward
0 new messages