Skip to content

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

Closed
@JohnMount

Description

@JohnMount

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 .

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions