GUIDE

ggplot2

RCode returns complete ggplot2 code — aes, geoms, scales, themes, and faceting — not fragments you have to assemble.

ggplot2 example in RCode

Tips for better answers

  • Paste your data frame structure or head() output in the context panel
  • Name the geoms and stats you already tried
  • Specify publication requirements (colorblind-safe, journal theme)

Example prompt

Forest plot with hazard ratios and 95% CI.
One row per treatment arm, reference at HR=1.

Common topics

Faceting, dual axes (and why to avoid them), custom themes, ordering factors for display, and combining patchwork layouts.