[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Silent plot(x,y) (3.2 or later bug?)
From: |
Ben Abbott |
Subject: |
Re: Silent plot(x,y) (3.2 or later bug?) |
Date: |
Fri, 16 Oct 2009 07:10:15 -0400 |
On Oct 16, 2009, at 6:14 AM, Tatsuro MATSUOKA wrote:
Hello
I have looked at codes of gnuplot_drawnow.m and print.m.
Initialization of __pixels_per_inch__ is executed in print.m
I think that this is a bug.
Tentatively, this bug(?) can be avoided by dummy print once for
octave 3.2 or later.
plot (1:10);print ('dummy.png','-dpng');clf;
x=[0:1];
for i=[0:100]
plot(x,x*i);
filename=sprintf("%02d.png",i);
drawnow('png',filename);
end
close;unlink('dummy.png');
Side effect: An empty plow window is open during print :-(, but it
is no relation for speed
please forgive the bug will be fixed.
Tatsuro
Regards
Tatsuro
Yes, it is a bug.
To be consistent with Matlab the default output size is specified in
inches. When the output is a bitmap, __pixels_per_inch__ is used to do
the units conversion.
A fix is to edit gnuplot_drawnow.m and replace ...
## Convert to inches using the property set by print().
gnuplot_size = gnuplot_size * get (h, "__pixels_per_inch__");
with ...
## Convert to inches using the property set by print().
try
gnuplot_size = gnuplot_size * get (h, "__pixels_per_inch__");
catch
gnuplot_size = gnuplot_size * get (0, "screenpixelsperinch");
end_try_catch
This would produce an output in the same size as seen on the screen.
Comments?
Ben
- Silent plot(x,y), Karol Krizka, 2009/10/15
- Re: Silent plot(x,y) (3.2 or later bug?), Tatsuro MATSUOKA, 2009/10/15
- Re: Silent plot(x,y) (3.2 or later bug?), Karol Krizka, 2009/10/15
- Re: Silent plot(x,y) (3.2 or later bug?), Carlo de Falco, 2009/10/16
- Re: Silent plot(x,y) (3.2 or later bug?), Tatsuro MATSUOKA, 2009/10/16
- Re: Silent plot(x,y) (3.2 or later bug?),
Ben Abbott <=
- Re: Silent plot(x,y) (3.2 or later bug?), Ben Abbott, 2009/10/16
- Re: Silent plot(x,y) (3.2 or later bug?), Tatsuro MATSUOKA, 2009/10/17
- Re: Silent plot(x,y) (3.2 or later bug?), Karol Krizka, 2009/10/18
Re: Silent plot(x,y), Thomas Weber, 2009/10/16
Silent plot(x,y), John W. Eaton, 2009/10/23