changeset 13242:105c72254967

avoid gnuplot error when figure name includes " characters __gnuplot_drawnow__.m (gnuplot_set_term): Quote " characters in figure name.
author John W. Eaton <jwe@octave.org>
date Wed, 28 Sep 2011 17:01:04 -0400
parents 2a8dcb5b3a00
children f9aec0bcf826
files scripts/plot/__gnuplot_drawnow__.m
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/__gnuplot_drawnow__.m	Wed Sep 28 16:45:21 2011 -0400
+++ b/scripts/plot/__gnuplot_drawnow__.m	Wed Sep 28 17:01:04 2011 -0400
@@ -149,7 +149,7 @@
       ## Generate gnuplot title string for plot windows.
       if (output_to_screen (term) && ~strcmp (term, "dumb"))
         fig.numbertitle = get (h, "numbertitle");
-        fig.name = get (h, "name");
+        fig.name = strrep ("\"", "\\\"", get (h, "name"));
         if (strcmpi (get (h, "numbertitle"), "on"))
           title_str = sprintf ("Figure %d", h);
         else