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

后端 未结 4 1352
暗喜
暗喜 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:21

    The source of your problems with the PNG quality is most likely the missing antialiasing in the png terminal of Gnuplot. Since you give no screenshots, I'm not sure what you mean when talking about bad linewidth, but here's how it looks for me (on MacOS). This screenshot shows the output of gnuplot's native aquaterm output:

    A plot using gnuplot's native aquaterm output

    If we create a png using set term png, the lines become "jumpy" and pixellated:

    The sine curve, plotted using the png terminal

    However, there is a version of the png terminal that uses the Cairo libs for rendering, and that makes the output far more smooth and nicer. set term pngcairo gives this result:

    The sine curve, plotted using the pngcairo terminal

    You can use set terminal to check whether this terminal version is available for you. If it is, this should save you conversion work and also give better image quality than a JPG (which is not an ideal format for line art).

提交回复
热议问题