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

Add detection for consistency in plot labels #22

Open
ballardao opened this issue Aug 11, 2017 · 1 comment
Open

Add detection for consistency in plot labels #22

ballardao opened this issue Aug 11, 2017 · 1 comment

Comments

@ballardao
Copy link

Let's say I want to make sure that all my labels are the same. In the following example, the word 'text' is spelled differently on the x-axis and the y-axis (and you could argue it is spelled incorrectly on the x-axis):

ggplot(mtcars, aes(mpg, wt)) +
    geom_point() +
    labs(x="This is some txt", y="This is more text",
         title="Thisy is a titlle",
         subtitle="This is a subtitley",
         caption="This is a captien") +
    theme_ipsum_rc(grid="XY") -> gg

gg_check(gg)

gg_check(gg) picks up that 'Thisy', 'titlle', and 'subtitley' are misspelled, but not that 'txt' is misspelled (even though it is an abbreviation) or that there is another instance of the same word on the plot. I can see an argument for not suggesting that abbreviations are misspellings, but detecting for consistency would be great!

Above code is from here.

@hrbrmstr
Copy link
Owner

May be able to do some string diff and come up with a good way to report it for 0.4.0. #ty!

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

No branches or pull requests

2 participants