Skip to content

Version 1.5 fixes#250

Merged
mattdbowes merged 8 commits intomasterfrom
version-1.5-fixes
Mar 9, 2026
Merged

Version 1.5 fixes#250
mattdbowes merged 8 commits intomasterfrom
version-1.5-fixes

Conversation

@mattdbowes
Copy link
Collaborator

  • New grattan_write_ai_guide() function writes a style guide for AI coding assistants (Claude, Codex, Gemini) to your project directory.
  • theme_grattan() now auto-detects horizontal/flipped charts and applies flipped = TRUE automatically. Detection triggers for coord_flip() and bar charts (discrete y + continuous x). A message is shown every 8 hours when auto-detection fires. Set flipped = TRUE explicitly to silence the message, or flipped = FALSE to opt out of auto-detection.
  • Renamed check_chart_aspect_ratio() to check_chart().
  • Updated grattan_point_filled function signature for consistency with geom_point.
  • Updates export_latex_code for consistency with grattan_save_overleaf.
  • Bug fixes for save_chartdata function.

Update column selection in save chartdata so that it doesn't include functions
Remove subdirectory 'chart' within overleaf atlas, consistent with grattan_save_overleaf. Update consequential test.
Change function signature for consistency with geom_point
Add automatic detection of horizontal/flipped charts when theme_grattan() is added to a plot. Introduces ggplot_add.grattan_theme (R/detect_flipped.R) which inspects coord_flip() and mappings (discrete y + continuous/NULL x) and rebuilds the theme with flipped = TRUE when detected; a throttled message is shown (once per 8 hours). Change flipped default to NULL, store original args on the theme object for detection, and strip the custom class before delegating to ggplot2.
Create claude.md instructions file, and also create a function that writes the file to your local directory.
@MattCowgill
Copy link
Contributor

@wfmackey good shit - warms the heart

Fix function signature of the ggplot_add.grattan_theme.
@mattdbowes mattdbowes merged commit cd5fe9f into master Mar 9, 2026
5 checks passed
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