bugGNU Octave - Bugs: bug #35363, fplot key messed up

 
 

bug #35363: fplot key messed up

Submitted by:  Dmitri A. Sergatskov <dasergatskov>
Submitted on:  Tue 24 Jan 2012 08:43:55 PM UTC  
 
Category: Plotting with gnuplotSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: FixedAssigned to: None
Originator Name: Dmitri A. SergatskovOpen/Closed: Closed
Release: 3.6.0Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 23 Dec 2014 11:46:22 PM UTC, comment #3:

I fixed this in this changest (http://hg.savannah.gnu.org/hgweb/octave/rev/e23aedcc70a7).

for loops are very slow in any interpreted language so I changed the patch to use regexprep. This has the added benefit of working on cell array of strings which is possible if users have multi-line text blocks.

Closing report.

Rik <rik5>
Project Administrator
Tue 23 Dec 2014 10:30:39 PM UTC, comment #2:

HI,

Here is a small patch the add \ before @.

attached _go_draw_axes_.patch & _go_draw_axes_.m

Please review.

Avinoam

(file #32705, file #32706)

Avinoam Kalma <avinoam>
Project Member
Sat 28 Jan 2012 05:42:53 PM UTC, comment #1:

This bug is confirmed. It is a problem with all text output to gnuplot. For example, the following also shows the issue.

The issue is gnuplot's extended interpretation of text strings. Most of the time this is good because '^' is very naturally interpreted as a superscript and '_' is interpreted as a subscript. The issues is that '@' is a special character indicating that a zero-width box should surround the next bit of text.

As an immediate workaround, you can escape the special character with a '\'. The following will work.

The longer term fix is to get Octave's backend to do the same work of escaping special characters in user strings. I'm adding Ben Abbott to the CC list for this bug since he specializes in this part of Octave.

Rik <rik5>
Project Administrator
Tue 24 Jan 2012 08:43:55 PM UTC, original submission:

With gnuplot (3.4.4) backend on octave 3.6.0 fplot
messes up the key label if the function defined through "@"
mechanism:

E.g.:

fun = @(t) sin(t);
fplot(fun, [-5,5])

That works fine with fltk backend.

Note that Matlab does not put key at all -- but
perhaps this is a separate issue.

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #32705:  __go_draw_axes__.m added by avinoam (89KiB - application/octet-stream)
file #32706:  __go_draw_axes__.patch added by avinoam (602B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by avinoam (Updated the item)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by rik5
  • -unavailable- added by jordigh (Updated the item)
  • -unavailable- added by dasergatskov (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 23 Dec 2014 11:46:22 PM UTCrik5StatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Tue 23 Dec 2014 10:30:39 PM UTCavinoamAttached File-=>Added _go_draw_axes_.m, #32705
      Attached File-=>Added _go_draw_axes_.patch, #32706
    Sat 28 Jan 2012 05:42:53 PM UTCrik5StatusNone=>Confirmed
      Carbon-Copy-=>Added bpabbott
    Tue 24 Jan 2012 08:58:02 PM UTCjordighReleasedev=>3.6.0

    Back to the top


    Powered by Savane 3.1-cleanup1