[R-sig-eco] Having issue trying to get plot to have plain-white background
Mollie Brooks
mo|||eebrook@ @end|ng |rom gm@||@com
Sat Jun 15 18:18:58 CEST 2019
Hi Bruce,
I like to use this line by default so that all the plots have white backgrounds.
library(ggplot2); theme_set(theme_bw())
I’m sure it’s also possible to use theme_bw() on individual plots somehow, but I haven’t tried.
cheers,
Mollie
> On 15Jun 2019, at 18:16, Bruce Miller <batsncats using gmail.com> wrote:
>
> Hi all, This is not directly an R-Ecology question but neither the
> general R help forum nor GGplot forums has any responses.
> This is an ecology based application however LOL
>
>
> I need to save plots for a publication but can not seem to get he syntax
> correct to have GGPLOT use only a white background vs. the default gray one.
>
> I have tried the various themes but nothing seems to work.
> This is the existing code for the plot and followed by what I have tried
> to no avail.
>
> Works with gray plot frame backgrounds
>
>
> ggplot(polished, aes(x =Night, y = Time, colour = Species)) +
>
> geom_point() +
>
> **scale_colour_hue(l=40)+
>
> ggtitle(label = ' Linderos temporal activity')+
>
> facet_grid(. ~ Night) +facet_wrap(facets = ~Species)+
>
> scale_y_continuous(labels = label_hours, breaks = break_hours) +
>
> theme(axis.text.x = element_text(angle = 270))
>
> Trying theme bw does not seem to work!
> I did also load one of the "themes" packages to see if that was the
> issue. Not.
>
> ggplot(polished, aes(x =Night, y = Time, colour = Species)) +
>
> geom_point() +
>
> **scale_colour_hue(l=40)+
>
> ggtitle(label = 'Temporal activty')+
>
> facet_grid(. ~ Night) +facet_wrap(facets = ~Species)+
>
> scale_y_continuous(labels = label_hours, breaks = break_hours) +
>
> *theme_b**w*(axis.text.x=element_text(angle = 270))
>
>
> Any guidance on correct syntax/usage to plot clean-white plot back
> ground welcomed.
>
> Bruce
>
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
More information about the R-sig-ecology
mailing list