Saving pictures as pdf

There are several ways to generate a picture. We can summarize them into the following four methods:

  • Method #1: Using the Snipping Tool
  • Method #2: Saving the picture by clicking it
  • Method #3: Using Ctrl + Shift + PrintScrn and the Paint software
  • Method #4: Using our programs

The easiest way to save our picture is to use the Snipping Tool. After a picture is generated, launch the Snipping Tool and choose an appropriate area to save. The following example shows the simplest output to a PDF file in R. Let's use the previous example code of drawing a cosine function from -2π to , shown here:

pdf("c:/temp/myGraph.pdf") 
plot(cos,-2*pi,2*pi) 
dev.off() 

Get Hands-On Data Science with Anaconda now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.