# HG changeset patch # User John W. Eaton # Date 1317243664 14400 # Node ID 105c72254967107e7252b9fe23c56d0825594862 # Parent 2a8dcb5b3a0097ffaa2b39404d24a098b7d99721 avoid gnuplot error when figure name includes " characters __gnuplot_drawnow__.m (gnuplot_set_term): Quote " characters in figure name. diff --git a/scripts/plot/__gnuplot_drawnow__.m b/scripts/plot/__gnuplot_drawnow__.m --- a/scripts/plot/__gnuplot_drawnow__.m +++ b/scripts/plot/__gnuplot_drawnow__.m @@ -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