Skip to content

Conversation

@jack-davison
Copy link
Collaborator

@jack-davison jack-davison commented Dec 9, 2025

This PR implements ggplot2 versions of various plotting functions, as part of the drive to provide a modern API for openair.

Time Series & Trends

  • trendLevel() -> plot_heatmap()
  • calendarPlot() -> plot_calendar()
  • timeProp() -> plot_trend_bars()
  • timePlot() -> plot_trend_lines()
  • smoothTrend() -> plot_trend_smooth()
  • TheilSen() -> plot_trend_theilsen()
  • timeVariation() -> plot_variation()

Directional Analysis

  • polarFreq() -> plot_polar_heatmap()
  • percentileRose() -> plot_polar_percentile()

Model Eval

  • conditionalQuantile() -> plot_conditional_quantile()
  • taylorDiagram() -> plot_taylor_diagram()

Other Plots

  • scatterPlot() -> plot_xy_scatter() and plot_xy_bins()
  • corPlot() -> plot_correlation()

This PR also adds some necessary structural changes to initialise ggplot2 in openair:

  • Adds ggplot2 (>=4.0.0) and scales as dependencies.
  • Adds exported "options" functions to help manage options in a consistent way:
    • discretise_opts for flexibly discretising a scale (e.g., plot_calendar, plot_heatmap)
    • scale_opts for scale controls (limits, transforms, breaks)
    • facet_opts for controlling how facets are handled
    • windflow_opts for controlling the appearance of windflows
  • Adds label_openair(), which is a vectorised version of quickText() more suitable for use in ggplot2.

Old functions are still present, and documentation cross-links them.

@jack-davison jack-davison mentioned this pull request Jan 6, 2026
@jack-davison jack-davison changed the title ggplot2 implementation of time series & trends functions ggplot2 implementation of many openair functions Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants