willgearty / deeptime

Plotting Tools for Anyone Working in Deep Time
https://williamgearty.com/deeptime/
GNU General Public License v3.0
79 stars 7 forks source link

Custom geological timescale axis guide #53

Open willgearty opened 4 months ago

willgearty commented 4 months ago

I don't expect to replace/remove coord_geo() anytime soon, but I think it would be fairly easy to assemble a custom geological timescale axis guide that could then be used with the new guide_axis_stack() (see news here). I envision that an example of how this would be used would look like so:

ggplot(dat) +
  geom_point(...) +
  guides(x = guide_axis_stack(guide_geo_axis(dat = "periods"), guide_geo_axis(dat = "stages"), "axis"))
willgearty commented 4 months ago

It looks like this should also work for secondary axes using e.g., guides(x.sec = ...)