ggbraid icon indicating copy to clipboard operation
ggbraid copied to clipboard

Make the step direction avaliable?

Open XiangLiu-github opened this issue 3 years ago • 1 comments

Hi, thanks for your work! very useful packages.

Just have a suggestion, when the method sets to 'step', it seems it is incompatible with the direction in geom_step.

For example:

tibble(x = 1:10,
       y = 1:10) %>% 
  ggplot(aes(x = x, y = y)) +
  geom_braid(aes(ymax = y + 0.5,
                 ymin = y - 0.5), 
             fill = "grey70", method = "step", direction = 'mid') +
  geom_step(direction = 'mid')

It produces:

Warning message:
Ignoring unknown parameters: direction

XiangLiu-github avatar Jun 10 '22 03:06 XiangLiu-github

Thanks @XiangLiu-github for opening this issue.

You're correct, geom_braid() should support the direction parameter so it can work properly with geom_step().

I'll get to work on a new PR and let you know when it's ready (if you don't mind trying it out before it goes live!).

nsgrantham avatar Jun 12 '22 22:06 nsgrantham