Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Making Google Slides About R for Visualization

· 4 min read · Home Tech

In this article
  1. Build the Deck: From R Plot to Google Slide
  2. Why Exported Images Beat Screenshots
  3. Worked Example: One ggplot2 Chart on One Slide
  4. Where These Decks Usually Go Wrong
  5. Sharing and Presenting the R Deck

To make Google Slides about R for visualization, create your charts in R (usually with ggplot2), export them as high-resolution PNG files with ggsave(), then insert them into your slides with Insert > Image. Google Slides cannot run R, so every plot you show must be an exported image or a screenshot.

Time 45 min · Steps 6 · Level Easy

Build the Deck: From R Plot to Google Slide

  1. Outline the story first. Decide the 3–5 plots that carry your message before opening R. A typical talk deck runs 10–15 slides: one title, one on your data, one per plot, and one or two on the R code behind them.
  2. Make each plot in R. Use ggplot2 for most charts: ggplot(data, aes(x, y)) + geom_point() style code. Keep one plot per slide so the audience can actually read it from the back of the room.
  3. Export at presentation size. Save with ggsave("chart1.png", plot, width = 10, height = 6, dpi = 300). That produces a 3000 × 1800 pixel image, which stays sharp when projected full-screen.
  4. Insert into Google Slides. Open slides.google.com, create a blank presentation, then use Insert > Image > Upload from computer for each PNG. Menu labels can differ slightly by version.
  5. Add the matching code. Put the R snippet that made each chart on the same slide (Insert > Text box) or the slide after it, trimmed to the 3–6 lines that matter. Full scripts belong in an appendix slide or a shared link.
  6. Set fonts and check contrast. Use at least 24 pt text and a light background. If your ggplot2 theme uses thin grey lines, switch to theme_minimal(base_size = 18) and re-export so the plot text is readable at distance.

Why Exported Images Beat Screenshots

Exporting with ggsave() gives you a fixed pixel size you control; a screenshot gives you whatever your screen happened to be showing. A plot saved at 3000 × 1800 pixels stays crisp on a projector, while a screenshot grabbed from a laptop panel often looks soft the moment it fills a slide. Exporting also lets you re-run the same code when the data changes and drop in the updated PNG without redoing the slide.

One misconception worth clearing up: Google Slides cannot display R graphics live or run R code. The correct fact is that Slides only shows static images, so the workflow is always R first, export second, insert third. Tools like R Markdown or Quarto can render an entire HTML or PDF presentation from R directly, but that output is separate from Google Slides — you would present the rendered file itself, not import it.

Worked Example: One ggplot2 Chart on One Slide

Say you have 12 months of sales figures and want a bar chart slide. In R you would run something like:

library(ggplot2)
ggplot(monthly, aes(x = month, y = sales)) +
geom_col(fill = "#2b6cb0") +
theme_minimal(base_size = 18)
ggsave("sales.png", width = 10, height = 6, dpi = 300)

That file is 10 inches by 6 inches at 300 dots per inch, so 3000 × 1800 pixels. In Google Slides, insert it, then drag the corner handle to fill the slide — a standard slide is 10 inches by 5.63 inches (a 16:9 ratio), so a 10 × 6 image will be cropped or slightly shrunk; either set height to 5.63 and let the width overflow, or re-export at width 10, height 5.63 to match the slide exactly. Add a text box with the three key lines of code underneath, and the slide is done.

Where These Decks Usually Go Wrong

The most common failure is tiny plot text. ggplot2's default base size is 11 pt, which is fine on a laptop and unreadable from the third row of a room. Re-export with base_size = 18 or larger, or set theme(text = element_text(size = 18)).

The second is pasting code as a screenshot. Screenshots of RStudio code come with editor chrome and small fonts; instead, paste the code as text into a text box, set it in a monospaced font at 18 pt or larger, and keep it short. The third is exporting at the default dpi of 72, which gives a 720 × 432 pixel image from a 10 × 6 inch plot — that will visibly pixelate on a large screen, so always set dpi = 300. The fourth is forgetting that Google Slides autosaves to Drive but your PNGs live on your computer; keep the R script and the images in one folder so you can regenerate any chart later.

Sharing and Presenting the R Deck

Share the deck with the Share button the way you would any Google Slides file, and use Presenter View under the present options to see your notes while the audience sees only slides. If your audience wants the code, put the full script in a text file and share the link on your last slide rather than pasting pages of code into the presentation itself. If someone asks for the charts in better quality, SVG export (ggsave("chart.svg")) scales without pixelation, though Google Slides may not import SVG directly — convert it to a high-dpi PNG for the deck and keep the SVG for print.

Official source: Google Workspace Learning Center