Step-by-step guide

When printing, users are used to setting a DPI (dots per inch) for the quality of their output. Graphics on the web & screen, especially raster graphics, do not have the concept. There is only so much information which can be stored in a pixel. To get a higher quality raster plot you have to scale up the content and possibly increase the (pixel) size of you image (see above question). You can use image manipulation tools to set a DPI when you convert from vector to raster. So you could output your plot into PS or PDF and convert it using Imagemagick (see http://www.imagemagick.org/script/command-line-options.php#density)

For more information on this please read https://www.webdesignerdepot.com/2010/02/the-myth-of-dpi/.