- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2026 05:54 AM
Hi @LiamM87,
Apologies. I misread the ask. I have now tested an R sample, and that works for me too.
Here is what I tested.
%r
# Minimal R graphics diagnostics for Databricks notebooks
cat("R version:", R.version.string, "\n")
cat("Capabilities:\n")
print(capabilities())
cat("\nCurrent graphics device before plotting:\n")
print(dev.list())
# 1) Base plot
plot(1:3, 5:7, main = "Base R plot", col = "blue", pch = 19)
cat("\nGraphics device after base plot:\n")
print(dev.list())
# 2) Explicitly force a new page, then another base plot
plot.new()
plot.window(xlim = c(1, 3), ylim = c(5, 7))
points(1:3, 5:7, col = "red", pch = 19)
title("Explicit plot.new / plot.window")
# 3) ggplot2 test, if installed
if (requireNamespace("ggplot2", quietly = TRUE)) {
p <- ggplot2::ggplot(
data.frame(x = 1:3, y = 5:7),
ggplot2::aes(x, y)
) +
ggplot2::geom_point(color = "darkgreen", size = 3) +
ggplot2::ggtitle("ggplot2 test")
print(p)
} else {
cat("\nggplot2 not installed\n")
}
# 4) Device-to-file test: proves R graphics itself is working even if inline render is broken
png("/tmp/r_plot_test.png", width = 800, height = 600)
plot(1:3, 5:7, main = "PNG device test", col = "purple", pch = 19)
dev.off()
cat("\nPNG written to /tmp/r_plot_test.png\n")%r
png("/dbfs/FileStore/r_plot_test.png", width = 800, height = 600)
plot(1:3, 5:7, main = "PNG device test", col = "purple", pch = 19)
dev.off()
displayHTML('<img src="/files/r_plot_test.png" width="700">')
And the output did render correctly.
However, I did see another internal user raise a similar issue. So, this could be a recent regression. I will watch that issue and share any developments.
Could you confirm what compute you're using: serverless or all-purpose/classic, and which Databricks Runtime version? If this is serverless, that may explain it, since R isn't supported there.
A few quick checks that would also help:
- Does it happen in more than one browser?
- Does it reproduce in a brand-new notebook?
- If you run a simple %r cell with just plot(1:3, 5:7), do you see the same behaviour?
- If you write the plot to a file and display that file, does it render?
If this answer resolves your question, could you mark it as “Accept as Solution”? That helps other users quickly find the correct fix.
Ashwin | Delivery Solution Architect @ Databricks
Helping you build and scale the Data Intelligence Platform.
***Opinions are my own***