You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A question on SO led to wondering why duplicate axes aren't usable with scale_x_date or *_datetime. I worked up fairly hacky solutions by converting to numerics and working back from date_breaks, but it should "just work". While you're at it, I'm sure it would be nice to be able to have transformed sec_axis: e.g. hours on the x-bottom and days on the x-top.
Do you have any feelings regarding the transformations allowed with dual axis in the current implementation? To me it seems dual date axes is mostly for decorative purposes, though someone might conceivably want to plot a timeserie with both Chinese and Gregorian calendar..?
That’s my feeling too, but is also the solution resulting in the worst API. It would require an additional set of sec_axis/dup_axis functions that blocks the transformation argument..?
I suggest we postpone it to after this release. I’m still interested in doing it but I don’t want to butcher the API to get it done, so I’ll need some time to think it through...
Another feature related to this is the ability to use two different columns/datasets from which to base the time axes. For example, I have a dataset with "actual time", which I would like to have label the bottom x-axis in date format, and "time since event", which I would like to have label the top x-axis in hours format.
This would be very useful for me, but I also have a feeling that it would be useful in many time series analyses. Not sure what the best approach would be to accomplish this, though.
The road to hell is, unfortunately, paved with good intentions. While it would be easy to support your use case we might inadvertently end up with an api that cannot easily grow or be maintained. Thus, we/I will need some time to think about how to best implement this it.
Activity
hadley commentedon Oct 30, 2017
@thomasp85 any chance you have time to take a look?
thomasp85 commentedon Oct 30, 2017
When do you expect the next release? I can’t promise anything this week
hadley commentedon Oct 30, 2017
I'll probably start the release process in 2-3 weeks.
thomasp85 commentedon Oct 30, 2017
I'll give it a shot
thomasp85 commentedon Nov 8, 2017
Do you have any feelings regarding the transformations allowed with dual axis in the current implementation? To me it seems dual date axes is mostly for decorative purposes, though someone might conceivably want to plot a timeserie with both Chinese and Gregorian calendar..?
hadley commentedon Nov 8, 2017
Yeah, it's not clear that this needs to support transformation, but maybe just different breaks/labels? (i.e. have years on top and months on bottom)
thomasp85 commentedon Nov 8, 2017
That’s my feeling too, but is also the solution resulting in the worst API. It would require an additional set of
sec_axis/dup_axisfunctions that blocks the transformation argument..?hadley commentedon Nov 8, 2017
Hmmm, but it probably needs a different
sec_axisanyway fordate_breaks()etc?thomasp85 commentedon Nov 17, 2017
I suggest we postpone it to after this release. I’m still interested in doing it but I don’t want to butcher the API to get it done, so I’ll need some time to think it through...
hadley commentedon Nov 17, 2017
Ok, np.
kevinwolz commentedon Nov 20, 2017
Another feature related to this is the ability to use two different columns/datasets from which to base the time axes. For example, I have a dataset with "actual time", which I would like to have label the bottom x-axis in date format, and "time since event", which I would like to have label the top x-axis in hours format.
This would be very useful for me, but I also have a feeling that it would be useful in many time series analyses. Not sure what the best approach would be to accomplish this, though.
thomasp85 commentedon Nov 20, 2017
My feeling is that this is a simple transformation, and an argument for keeping the transformation argument in the Datetime implementation
ldecicco-USGS commentedon Nov 22, 2017
I just need axis ticks on the top axis of my timeseries graphs:
That will make my life soooo much easier
thomasp85 commentedon Nov 22, 2017
The road to hell is, unfortunately, paved with good intentions. While it would be easy to support your use case we might inadvertently end up with an api that cannot easily grow or be maintained. Thus, we/I will need some time to think about how to best implement this it.
Your needs have been noted though🙂
ldecicco-USGS commentedon Nov 22, 2017
"Your needs have been noted though" - that's all I was going for. Thanks so much!
Implement sec.axis for date, time, and datetime scales (#2806)
lock commentedon Mar 17, 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/