Skip to content

Commit 4b0eb84

Browse files
committed
fix(renderPlot): get interactive plotting working with ggplot2 v4.0
1 parent 219fbc6 commit 4b0eb84

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

R/render-plot.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,8 @@ drawPlot <- function(name, session, func, width, height, alt, pixelratio, res, .
266266
# addition to ggplot, and there's a print method for that class, that we
267267
# won't override that method. https://github.com/rstudio/shiny/issues/841
268268
print.ggplot <- custom_print.ggplot
269+
# For compatibility with ggplot2 >v4.0.0
270+
`print.ggplot2::ggplot` <- custom_print.ggplot
269271

270272
# Use capture.output to squelch printing to the actual console; we
271273
# are only interested in plot output

0 commit comments

Comments
 (0)