output.png from gnuplot is not as good as the figure from prompt shell

后端 未结 4 1317
暗喜
暗喜 2021-01-30 07:03

I often plot graphs in gnuplot prompt shell, like this:

gunuplot> plot sin(x) with linespoints pointtype 3

and the figure showe

4条回答
  •  旧巷少年郎
    2021-01-30 07:08

    The default size of the PNG image generated gnuplot with the PNG terminal is 640x480 pixels. This resolution in certain cases may result in "pixelated" graphs which are not as nice as those produced on screen with the default (wxt) terminal.

    You can change the resolution of the output image using the size option:

    set terminal png size    
    

    where x and y are the desired numbers of pixels along the horizontal and vertical axis, respectively. For example:

    set terminal png size 1024,768
    

    Please note that, images with larger resolution will result in proportionally larger files on disk. Alternatively you can try to use non-raster terminals like "post eps" or "pdf" if available on your machine, which may give you high quality scalable and (relatively) portable images without a large disk footprint.

提交回复
热议问题