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

Would be nice to have geom_step not throw in non renderable situations #1645

Closed
JohnMount opened this issue Jun 3, 2016 · 2 comments
Closed

Would be nice to have geom_step not throw in non renderable situations #1645

JohnMount opened this issue Jun 3, 2016 · 2 comments
Labels
bug
Milestone

Comments

@JohnMount
Copy link

@JohnMount JohnMount commented Jun 3, 2016

It would be nice to have geom_step not throw in non renderable situations. It would be an improvement if the following code:

library('ggplot2')
d <- data.frame(x=1,y=1)
ggplot(data=d,aes(x=x,y=y)) + geom_step()

issued a warning and draws a graph like geom_line does in:

ggplot(data=d,aes(x=x,y=y)) + geom_line()

instead of erroring-out with the message "invalid line type" (as Cran current ggplot2 2.1.0 does). One can easily run into this when using geom_step with facet_wrap.

I have an article explaining the actual use case here https://github.com/WinVector/Examples/blob/master/UsingGeomStep/UsingGeomStep.md and the small example here https://github.com/WinVector/Examples/blob/master/UsingGeomStep/StepThrow.md .

@hadley hadley added bug ready labels Jul 28, 2016
@hadley hadley added this to the v2.2.0 milestone Jul 28, 2016
@hadley hadley closed this in 5b06edd Jul 28, 2016
@hadley hadley removed the ready label Jul 28, 2016
@hadley
Copy link
Member

@hadley hadley commented Jul 28, 2016

Somewhat ironically, caused by use of 1:length(x) 😦

@JohnMount
Copy link
Author

@JohnMount JohnMount commented Aug 17, 2016

That 1:0 thing is the bug that just keeps on giving. That being said I do appreciate you teaching seq_len().

@lock lock bot locked as resolved and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants