Skip to content

Fix annotate without global data #1690

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
Aug 3, 2016

Conversation

thomasp85
Copy link
Member

This fixes #1655 by adding dummy data to all annotate functions in the way already done for annotate_logticks.

@hadley
Copy link
Member

hadley commented Aug 2, 2016

Could you add a unit test for this? I think it can probably just test that the annotation layer has an appropriate dummy table.

To make it easier to see this pattern in the future it might be worth defining and using:

# Used in annotations to ensure printed even when no
# global data
dummy_data <- function() data.frame(x = NA)

@thomasp85 thomasp85 self-assigned this Aug 3, 2016
@hadley
Copy link
Member

hadley commented Aug 3, 2016

LGTM

(please squash the commits when you merge)

Add to news

Fix inherit.aes so dummy data is not called out

Define and use dummy_data() to assign data to annotation layers

Add tests for dummy data and inherit.aes
@thomasp85 thomasp85 force-pushed the bug-annotate-without-data branch from b959275 to 2ba4a0d Compare August 3, 2016 12:24
@thomasp85
Copy link
Member Author

A feeling of unease as a press merge for the first time :-)

@thomasp85 thomasp85 merged commit 91859da into tidyverse:master Aug 3, 2016
@hadley hadley removed the in progress label Aug 3, 2016
@thomasp85 thomasp85 deleted the bug-annotate-without-data branch August 3, 2016 12:36
@lock
Copy link

lock bot commented Jan 18, 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 18, 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.

Annotations work only if global aes() have been defined
2 participants