I'm doing a teaching example of a small choropleth map. I want to remove the axes and the gray background. I've got it working with the code below. Is there an option I'm missing that would make this much easier?
Thanks,
Bob
no_margins <- opts(
axis.line = theme_blank(),
axis.text.x = theme_blank(),
axis.text.y = theme_blank(),
axis.ticks = theme_blank(),
axis.title.x = theme_blank(),
axis.title.y = theme_blank(),
axis.ticks.length = unit(0, "cm"),
axis.ticks.margin = unit(0, "cm"),
panel.background = theme_blank(),
panel.border = theme_blank(),
panel.grid.major = theme_blank(),
panel.grid.minor = theme_blank(),
plot.background = theme_blank(),
plot.title = theme_blank(),
plot.margin = unit(c(0, 0, 0, 0), "lines")
)
ggplot(data=TinylandDF)+
geom_polygon( aes(long, lat,
fill=pop, group=group) ) +
geom_text( aes(labptX, labptY, label=region) ) +
scale_fill_continuous(low = "grey80", high = "grey20") +
coord_equal() +
opts(panel.grid.major = theme_blank(),
panel.grid.minor = theme_blank(),
panel.background = theme_blank()) +
no_margins
=========================================================
Bob Muenchen (pronounced Min'-chen), Manager
Research Computing Support
Voice: (865) 974-5230
Email: muen...@utk.edu
Web: http://oit.utk.edu/research,
News: http://oit.utk.edu/research/news.php
========================================================
OK, I'll try that out. Thanks for the help!
Bob
>--
>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
>-----Original Message-----
>From: ggp...@googlegroups.com [mailto:ggp...@googlegroups.com] On
>Behalf Of Osmo Salomaa
>Sent: Tuesday, November 02, 2010 11:08 AM
>To: ggplot2
>Subject: Re: Map with blank background
>