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 horizontal linerange geom #1261

Closed
wants to merge 2 commits into from
Closed

Conversation

bbolker
Copy link
Contributor

@bbolker bbolker commented Aug 12, 2015

I believe this is all done (haven't reoxygenized it). As demonstrated in the example, it's useful when coord_flip()+ geom_linerange() is not feasible, e.g. when using facet_wrap().

I'm violating DRY quite a bit here -- it might be better to add an orientation argument to geom_linerange? I'm willing to try that if it's thought to be better, but what's here is reasonably useful as is.

@hadley
Copy link
Member

hadley commented Aug 13, 2015

Maybe orient = c("v", "h") would be better in geom_linerange()? I think I'd prefer a parameter than more names. It might be possible to use flip_labels() for a fairly dry implementation?

@lionel- would you be interested in working on again for the other vertical only geoms? This would also involve deprecating geom_errorbarh

@lionel-
Copy link
Member

lionel- commented Aug 13, 2015

it'd also be great to find a solution for dodging. Maybe the Geoms could have a orient field that Positions could query to do the right thing.

I may work on it again next week but could you be more explicit about what you didn't like in #1128 (besides the repeated code)?

@hadley
Copy link
Member

hadley commented Aug 13, 2015

@lionel- just all the duplicated code. I think with an orient parameter and by using flip_labels(), there should be hardly any duplication.

I didn't think about dodging. The easiest approach would probably be an orient param to position_dodge(), and then that could get automatically passed on during layer creation, a la geom_jitter(). I'd prefer to not break encapsulation by allowing geoms & positions to communicate.

@bbolker
Copy link
Contributor Author

bbolker commented Aug 13, 2015

I wasn't aware of #1128, now that I see it it seems to completely supersede what I'm trying to do here (hurrah). Is there any reason not to just close this PR (and if useful/necessary copy some of the relevant discussion back to the #1128 thread) ?

@lionel-
Copy link
Member

lionel- commented Aug 14, 2015

@bbolker I just uploaded #1265 which implements horizontality through an argument and handles position adjustments. If Hadley is ok with the implementation, I'll try to make the PR as complete as the old one.

@bbolker
Copy link
Contributor Author

bbolker commented Sep 24, 2015

bump. Did this ever happen? I would love to have that functionality ...

@hadley
Copy link
Member

hadley commented Oct 12, 2015

I'm not super excited about this (just because it's something I'm unlikely to use) and since you can now create your own geoms outside of ggplot2, I think a package that provided a whole bunch of horizontal geom variants would be reasonable.

@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.

None yet

3 participants