2

I am using gnuplot and it gives perfect result. It is a great plot on screen (wxt).

I can also set terminal to png jpeg or something. But when I set the size of the plot, I realized that the font, line width, point size, the key..., everything must be changed.

Is there a way of creating a high resolution plot by just scale it? I mean when one preview a 640x480 plot, what command one should use to make it into a high-resolution (1920x1440) plot easily? Or which terminal works?

4

1 回答 1

3

There is not a good way (that I know) to scale everything in a raster (.jpg, .png) format within gnuplot.

My favorite workaround is to use a vector terminal (e.g. pdfcairo) and then use imagemagick to convert the vector format to a .png:

./myGnuplot.plt # makes a .pdf
convert myPlot.pdf -density 150 myPlot.png

The -density flag controls the sampling density. This way you can create a .pdf with the relative scaling you like, then control the resolution of the raster version with -density.

(Side note: I encourage using vector formats when possible--they can save a lot of space relative to high-res vector images depending on where you are using them.)

于 2014-11-11T00:55:34.907 回答