79645855

Date: 2025-05-30 17:23:49
Score: 2
Natty:
Report link

After setting your working directory:

hist1 <- hist(rnorm(1000),  xlab  = "x", ylab = "density", probability=T)

install.packages("sjPlot")

library(sjPlot)

save_plot("myhist.png", fig = hist1, width = 50, height = 25)

Base R:

hist2 <- hist(rnorm(1000),  xlab  = "x", ylab = "density", probability=T)


png(filename = "C:\\YourPath\\myhist2.png")
plot(hist2)
dev.off()

Is this suitable for you?

Reasons:
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (0.5):
Posted by: MetehanGungor