Skip to content

New examples for theme_*() #2721

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

Merged
merged 1 commit into from
Jul 10, 2018
Merged

Conversation

jrnold
Copy link
Contributor

@jrnold jrnold commented Jun 27, 2018

Update the example used in the "complete themes" help page (ggtheme). I extended the current mtcars example to use more (all?) of the features which themes affect: title, subtitle, tag, caption, and both x- and y-facets.

There are now two plot examples. One with no facets, and one with 2x2 facets. The latter is enclosed in \donttest{} to keep R CMD check from complaining about the runtime.

The mtcars dataset may not be the best for this, but I wanted to keep it close to the orginal example, and the data isn't as important in this example.

Update the example used in the "complete themes" help page (`ggtheme`). I extended the current `mtcars` example to use more (all?) of the features which themes affect: title, subtitle, tag, caption, and both x- and y-facets.

There are now two plot examples. One with no facets, and one with 2x2 facets. The latter is enclosed in `\donttest{}` to keep R CMD check from complaining about the runtime.

The `mtcars` dataset may not be the best for this, but I wanted to keep it close to the orginal example, and the data isn't as important in this example.
@hadley hadley requested a review from dpseidel July 8, 2018 22:50
Copy link
Collaborator

@dpseidel dpseidel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! The additional labels and facetting certainly make for nicer examples. However, as none of the complete themes differ in font family or colour or size, the title, tag, subtitle, and caption elements don’t exhibit any differences across plots, except minor positional adjustments when using theme_void(). These elements should be showcased but perhaps are better suited elsewhere in themes documentation? Some are already explored in theme.r examples but not all, so perhaps this example construction could be applied there instead/as well.

@jrnold
Copy link
Contributor Author

jrnold commented Jul 9, 2018

So I think that the purpose of these examples is to different than that of the examples in theme.r.
The docs for theme() covers changing various features of the theme. But I think that the examples of the included themes should be rich enough to show any differences (or lack thereof) between themes.

as none of the complete themes differ in font family or colour or size, the title, tag, subtitle, and caption elements don’t exhibit any differences across plots, except minor positional adjustments when using theme_void()

I would have expected that to be the case, but without an example that uses the full capabilities of the themes, this wouldn't have been obvious.

Copy link
Collaborator

@dpseidel dpseidel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dpseidel dpseidel merged commit 5f49fb4 into tidyverse:master Jul 10, 2018
@dpseidel dpseidel mentioned this pull request Jul 11, 2018
@jrnold
Copy link
Contributor Author

jrnold commented Jul 11, 2018

Awesome! Thanks!

@lock
Copy link

lock bot commented Jan 7, 2019

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Jan 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants