8  PowerPoint Import

8.1 Introduction

One of the most common ways to ruin a perfectly good R plot is to copy-paste it into PowerPoint. This creates low-resolution bitmaps that look terrible when projected. This chapter teaches you the proper workflow for inserting high-quality plots into presentations.

Learning Objectives

By the end of this chapter, you will:

  • Understand why copy-paste creates low-quality plots
  • Know the correct workflow: save first, insert second
  • Learn optimal formats for PowerPoint (PNG at 150 DPI, SVG)
  • Be able to ungroup SVG elements for editing in PowerPoint
  • Understand the trade-offs between PNG and SVG for presentations

8.2 The Copy-Paste Problem

What happens when you copy from RStudio:

  • Pastes as low-resolution bitmap
  • Looks OK on screen (72 DPI)
  • Terrible when projected
  • Pixelated and blurry
  • Doesn’t scale well
  • The “Copy Plot to Clipboard” → “Copy as Metafile” corrupts plot symbols. Save as SVG instead.

8.3 The Solution: Save First, Insert Second

Never copy-paste!

Instead:

  1. Save plot as file
  2. Insert file into PowerPoint
  3. Maintain quality

8.4 Vector Formats for PowerPoint

Three options:

  1. SVG: Good support in modern PowerPoint → Use this!

    • Editable after import
    • Preserves vector format
    • Exports as SVG/PDF maintain vector quality
  2. EMF: Windows only, obsolete and of no benefit in newer PowerPoint. Requires devEMF

  3. PDF: Very poorly supported! Low resolution import (rasterized!) and no editing

  4. PNG: If you must use raster, then 300+ DPI

8.5 SVG Editing in PowerPoint

SVG is Editable in PowerPoint

Modern PowerPoint supports SVG editing:

  1. Insert SVG file into PowerPoint
  2. Right-click → Ungroup (or Convert to Shape)
  3. Individual elements become editable
  4. Modify colors, text, positions
  5. Compose multi-panel figures
  6. Export as SVG/PDF to preserve vector format

PowerPoint can be your figure composition tool!

Ungrouping May Break Complex SVGs

Be careful when ungrouping:

  • Complex SVGs may lose gradients, patterns, or effects
  • Some plot elements might break apart unexpectedly
  • Text rendering may change
  • Clipping paths may be lost

Recommendation:

  • Keep a backup copy before ungrouping
  • Test with your specific plots first
  • For complex figures, consider Inkscape instead if editing is needed.

8.6 Summary

Key Takeaways
  1. Never copy-paste from RStudio - creates low-resolution bitmaps

  2. Workflow: Save → Insert

    ggsave("plot.png", p, width = 10, height = 6, dpi = 150)

    Then Insert > Pictures in PowerPoint

  3. Format recommendations for presentations:

    • PNG at 150 DPI - good quality, reasonable file size
    • SVG - perfect quality, editable, but larger PowerPoint file
    • Never JPEG - lossy compression
  4. SVG in PowerPoint:

    • Can be ungrouped and edited
    • Text becomes editable
    • Colors/shapes can be changed
    • Warning: complex plots may break when ungrouped
  5. Sizing:

    • Create plots at ~10 inches width for full-screen slides
    • 6-8 inches for half-screen
    • Match slide aspect ratio (16:9 typically)
  6. Quality hierarchy: SVG > PNG 150+ DPI > PNG 72 DPI > copy-paste

8.7 Exercises

Try It Yourself
  1. Create a plot and save two versions:

    p <- ggplot(mtcars, aes(mpg, hp, color = factor(cyl))) + geom_point(size = 3)
    ggsave("plot.png", p, width = 10, height = 6, dpi = 150)
    ggsave("plot.svg", p, width = 10, height = 6)
  2. Insert both into PowerPoint and compare quality

  3. Try ungrouping the SVG (Right-click > Group > Ungroup)

  4. Change the color of one element in the ungrouped SVG

  5. Compare file sizes: copy-paste vs PNG vs SVG versions

8.8 Further Reading