
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Save a Plot in PDF in R
To save a plot in pdf, we can use the pdf function in base R. For example, if we want to save a plot with the name PDF then it can be done using the below command −
pdf("PDF.pdf")
After this we can create the plot and use dev.off().
Example
pdf("pdfExample.pdf") plot(1:10)
Output
Example
dev.off()
Output
To check where it is saved, find the working directory using getwd().
Advertisements