How to resize and save plots in png format?

前端 未结 2 783
隐瞒了意图╮
隐瞒了意图╮ 2021-01-07 17:52

I would like to plot the results from a quantile regression, but am not able to:

  1. control the dimensions/size of the plots and
  2. save the plots as png.
相关标签:
2条回答
  • 2021-01-07 18:26

    For subdividing the plots:

    plot(fit1,parm=1:2)
    plot(fit1,parm=3)
    

    Note that you could have found the answer by careful reading of ?plot.summary.rqs, but this may not have been obvious: in order to know where to look you would need to do class(fit1) to figure out which plot method was being used.

    Roman's answer takes care of the image dimension stuff.

    0 讨论(0)
  • 2021-01-07 18:28

    You can control the image dimensions by png argument.

    png("image.png", width = 800, height = 600)
    plot(...)
    dev.off()
    

    To "finish" the image, use dev.off.

    0 讨论(0)
提交回复
热议问题