开发者

gnuplot png export

开发者 https://www.devze.com 2022-12-30 07:08 出处:网络
How to \"export\" a graph to png or something insertable in Word ? I know there are a doz开发者_如何学Pythonen tutorials for this on the \'net, but I\'m having trouble just finding a simple example.On

How to "export" a graph to png or something insertable in Word ? I know there are a doz开发者_如何学Pythonen tutorials for this on the 'net, but I'm having trouble just finding a simple example.


On windows, you can

set terminal windows

for the output to a window. Next for png output,

set terminal png

This should work on the native windows gnuplot binary.


Follow these;

Once you are happy with your plot, set your output terminal type to ``Postscript.''

gnuplot> set terminal postscript

Graphics will be written in Postscript format, the language understood by our printers, instead of the format understood by the windowing system. Then specify a file name for your postscript output.

gnuplot> set output 'myfile.ps'

Then write your plot to the file by replotting.

gnuplot> replot

To send your Postscript file to the printer, use the lpr shell command, (OPTIONAL)

$ lpr myfile.ps

If you would like to continue working with your plot in a graphics window, you will need to return the output and terminal settings to normal by typing

gnuplot> set terminal x11

gnuplot> set output

A great tutorial is here


Write

set terminal pngcairo
set output output.png

And gnuplot should write to a file called output.png.

0

精彩评论

暂无评论...
验证码 换一张
取 消