comparison scripts/plot/gnuplot_drawnow.m @ 9334:4f96a7770492

print.m: properly render mono figures, and favor cairo terminals.
author Ben Abbott <bpabbott@mac.com>
date Thu, 11 Jun 2009 07:23:32 -0400
parents 470af0f93ca9
children d6c99b2ee941
comparison
equal deleted inserted replaced
9333:3930f8ce6430 9334:4f96a7770492
321 endif 321 endif
322 if (nargin < 1) 322 if (nargin < 1)
323 ## Determine the default gnuplot terminal. 323 ## Determine the default gnuplot terminal.
324 term = gnuplot_default_term (); 324 term = gnuplot_default_term ();
325 endif 325 endif
326 have_enhanced = false; 326 have_enhanced = any (strncmp (enhanced_terminals, term, min (numel (term), 3)));
327 for n = 1 : length (enhanced_terminals)
328 t = enhanced_terminals{n};
329 if (strncmp (term, t, min (length (term), length (t))))
330 have_enhanced = true;
331 break;
332 endif
333 endfor
334 endfunction 327 endfunction
335 328
336 function ret = output_to_screen (term) 329 function ret = output_to_screen (term)
337 ret = any (strcmpi ({"aqua", "wxt", "x11", "windows", "pm"}, term)); 330 ret = any (strcmpi ({"aqua", "wxt", "x11", "windows", "pm"}, term));
338 endfunction 331 endfunction
339 332
340 function ret = term_units_are_pixels (term) 333 function ret = term_units_are_pixels (term)
341 ret = any (strcmpi ({"emf", "gif", "jpeg", "pbm", "png", "svg"}, term)); 334 ret = any (strncmpi ({"emf", "gif", "jpeg", "pbm", "png", "svg"}, term, 3));
342 endfunction 335 endfunction
343 336
344 function [fig_size, fig_pos] = get_figsize (h) 337 function [fig_size, fig_pos] = get_figsize (h)
345 ## Determine the size of the figure in pixels. 338 ## Determine the size of the figure in pixels.
346 position = get (h, "position"); 339 position = get (h, "position");