blob: 09a79968c68686d7ecf37f59347a12aa8ffbe9c3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
% Copyright David Rowe 2009
% This program is distributed under the terms of the GNU General Public License
% Version 2
%
% Replot current plot as a png, generates small and large versions
function png(pngname)
% small image
__gnuplot_set__ terminal png size 420,300
ss = sprintf("__gnuplot_set__ output \"%s.png\"", pngname);
eval(ss)
replot;
% larger image
__gnuplot_set__ terminal png size 800,600
ss = sprintf("__gnuplot_set__ output \"%s_large.png\"", pngname);
eval(ss)
replot;
% for some reason I need this to stop large plot getting wiped
__gnuplot_set__ output "/dev/null"
endfunction
|