- Trending Categories
- Data Structure
- Operating System
- MS Excel
- C Programming
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to find the size of the plotting window in R?
The plotting window size can be found by using dev.size function and we can pass in for inches and cm for centimeters. For example, if we create a plot then we can use dev.size("in") to find the plot size in inches and dev.size("cm") to find the size in centimeters.
Consider the below vectors and create a point chart between those vectors −
x<-rnorm(10) y<-rnorm(10,500,35) plot(x,y)
Now finding the plotting window size −
dev.size("in") # in inches
 5.760417 5.750000
dev.size("cm") # in centimeters
 14.63146 14.60500
This will change if we drag the plotting window to right, left, upper or down side as shown below (dragging the plotting window to left) −
Now again finding the size −
 6.614583 5.750000
 16.80104 14.60500
This will not change until and unless we do not increase the plotting window manually.
- Related Articles
- How to find the object size in R?
- How to set the size of the browser window in Selenium?
- Setting the size of the plotting canvas in Matplotlib
- How to resize the background image to window size in Tkinter?
- How to find the sample size for t test in R?
- How to create a plot in R with a different plot window size using plot function?
- How to find the size of localStorage in HTML?
- How to change the font size of legend in base R plot?
- How to change the size of plots arranged using grid.arrange in R?
- How to find the unique combinations of a string vector elements with a fixed size in R?
- How to change the tick size using ggplot2 in R?
- How to set a Tkinter window to a constant size?
- How to change the point size in geom_point conditionally in R?
- How to find the size of a list in C#?
- How to change the title size of a graph using ggplot2 in R?