Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redefining axis.text.x in theme can break cowplot #66

Closed
devillemereuil opened this issue Jul 17, 2017 · 3 comments
Closed

Redefining axis.text.x in theme can break cowplot #66

devillemereuil opened this issue Jul 17, 2017 · 3 comments

Comments

@devillemereuil
Copy link

devillemereuil commented Jul 17, 2017

Changing the settings of the axis.text.x component of theming in ggplot2/cowplot can result in a strong breakage of the package (see MWE attached).

If I understand correctly, I think the problem is that cowplot rely on theme_nothing (hence theme_void) for the grid layout, but somehow the values provided by axis.text.x do not get overwritten (indeed changing axis.text.x for axis.text doesn't seem to result in breakage in the MWE attached).

Ultimately, I think the issue comes from the fact that theme_void doesn't seem to be full-fledged, compared to other themes (including theme_cowplot, which relies on theme_grey which is full-fledged).

I see two possibles fixes:

  • Stop relying on theme_void and make theme_nothing rely on a full-fledged theme like theme_grey
  • Report "upstream" to ggplot2, asking Hadley Wickham to make theme_void full-fledged

MWE.txt

@clauswilke
Copy link
Contributor

clauswilke commented Jul 17, 2017

This is being worked on in ggplot2 (see here). In the meantime, for a workaround, see issue #60 or #63.

@devillemereuil
Copy link
Author

Indeed! Thanks.

@clauswilke
Copy link
Contributor

This will be permanently addressed in the upcoming cowplot 0.8.0. In the meantime, it's fixed in the development version on github.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants