Question: How can I save a histogram in different widths and heights?
0
gravatar for tannaz
4 months ago by
tannaz0
tannaz0 wrote:

one can save a histogram in different sizes when he/she exports it with Rstudio. My question is that is there any sort of command or function in R that can do that? How can we save histograms with different sizes through R script?

R • 234 views
ADD COMMENTlink modified 4 months ago by arup40 • written 4 months ago by tannaz0
0
gravatar for tannaz
4 months ago by
tannaz0
tannaz0 wrote:

found it:

https://www.r-bloggers.com/exporting-nice-plots-in-r/

ADD COMMENTlink written 4 months ago by tannaz0
2

This reminds me of the joke: What is the best way to find typos on a manuscript? Press the submit button.

ADD REPLYlink written 4 months ago by h.mon9.2k
0
gravatar for theobroma22
4 months ago by
theobroma221.0k
theobroma221.0k wrote:

In R there is also tiff() and jpeg() commands which also have the width and height arguments to make adjustments.

ADD COMMENTlink written 4 months ago by theobroma221.0k
0
gravatar for arup
4 months ago by
arup40
India
arup40 wrote:

What do you actually mean by different size? If it's the dimension you can save the same plot with different width and height by adding separate codes like following.

png(filename = "my_plot.png", width = 480, height = 480, units = "px", pointsize = 12, bg = "white", antialias)

png(filename = "my_plot.png", width = 640, height = 640, units = "px", pointsize = 12, bg = "white", antialias) dev.off()

ADD COMMENTlink written 4 months ago by arup40
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 722 users visited in the last hour