changeset 19458:e23aedcc70a7

Fix using '@' character in gnuplot text strings (bug #35363). * __go_draw_axes__.m: Search and replace instances of '@' with escaped '\@'.
author Rik <rik@octave.org>
date Tue, 23 Dec 2014 15:43:48 -0800
parents 8b785ca93de7
children eee9f111c164
files scripts/plot/util/private/__go_draw_axes__.m
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/util/private/__go_draw_axes__.m	Sun Dec 21 19:50:40 2014 -0500
+++ b/scripts/plot/util/private/__go_draw_axes__.m	Tue Dec 23 15:43:48 2014 -0800
@@ -2285,7 +2285,7 @@
     bld = false;
   endif
 
-  ## The text object maybe multiline, and may be of any class
+  ## The text object may be multiline, and may be of any class
   str = getfield (obj, fld);
   if (ischar (str) && rows (str) > 1)
     str = cellstr (str);
@@ -2302,6 +2302,10 @@
   endif
 
   if (enhanced)
+    str = regexprep (str, '(?<!\\)@', '\@');
+  endif
+
+  if (enhanced)
     if (strcmpi (obj.interpreter, "tex"))
       if (iscellstr (str))
         for n = 1:numel (str)