JuanPi
2018-10-06 06:48:30 UTC
Hi all,
The following code
n = 10000;
for i=1:4
figure(i)
plot (randn(n,1), randn(n,1), '.')
endfor
for i=1:4
figure(i)
set (gcf, 'units', 'normalized', 'position', [0 0 0.9 0.9]);
drawnow
imwrite (frame2im (getframe (gcf)), sprintf("/tmp/tstfig-%d.png", i));
endfor
gives
warning: called from
getframe at line 102 column 11
warning: opengl_renderer: Error 'invalid value' (1281) occurred
drawing 'text' object
and the images are empty.
Any work around? Note that I need getframe because printing to file
takes forever (opengl or gnuplot))
The following code
n = 10000;
for i=1:4
figure(i)
plot (randn(n,1), randn(n,1), '.')
endfor
for i=1:4
figure(i)
set (gcf, 'units', 'normalized', 'position', [0 0 0.9 0.9]);
drawnow
imwrite (frame2im (getframe (gcf)), sprintf("/tmp/tstfig-%d.png", i));
endfor
gives
warning: called from
getframe at line 102 column 11
warning: opengl_renderer: Error 'invalid value' (1281) occurred
drawing 'text' object
and the images are empty.
Any work around? Note that I need getframe because printing to file
takes forever (opengl or gnuplot))
--
JuanPi Carbajal
https://goo.gl/ayiJzi
-----
“An article about computational result is advertising, not
scholarship. The actual scholarship is the full software environment,
code and data, that produced the result.
JuanPi Carbajal
https://goo.gl/ayiJzi
-----
“An article about computational result is advertising, not
scholarship. The actual scholarship is the full software environment,
code and data, that produced the result.