bugGNU Octave - Bugs: bug #32497, Matlab differences when using...

 
 

bug #32497: Matlab differences when using abbreviated PROPERTY names

Submitted by:  Thomas Dean <tomdean>
Submitted on:  Tue 15 Feb 2011 09:46:42 PM UTC  
 
Category:  Plotting Severity:  2 - Minor
Priority:  3 - Low Item Group:  Other
Status:  None Assigned to:  None
Originator Name:  Thomas Dean Open/Closed:  Open
Release:  dev Operating System:  Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

( Jump to the original submission)

Sat 19 Nov 2016 02:23:04 PM UTC, comment #8:

This issue seems to still be present in Octave 4.2.0. (The script from comment #7 still returns true.)

Hartmut <hardy>
Wed 10 Sep 2014 07:33:35 AM UTC, comment #7:

Maybe a reasonable solution for this bug would be to not allow the abbrev matching to search also for hidden properties names. A user can't know that a given pattern is ambiguous as long as the following test returns true:

Pantxo Diribarne <pantxo>
Project Member
Thu 07 Nov 2013 04:22:45 PM UTC, comment #6:

The solution is simple, don't use an ambiguous abbreviated property name. In this case, search for a line with 'horizontal' and replace the 'horizontal' with 'horizontalalignment'.

Rik <rik5>
Project Administrator
Thu 07 Nov 2013 02:46:38 PM UTC, comment #5:

Hello
I have repeated what Thomas Dean done on 15 Feb 2011 21:46:43 +0000
U
I downloaded the m_map Matlab application from
http://www.eos.ubc.ca/~rich/map.html

1. Start octave
2. cd to the m_map directory
3. addpath("private");
4. m_proj('oblique mercator'); m_coast;
5. m_grid;
error: get: ambiguous text property name horizontal; possible matches:

horizontalalignment horizontalalignmentmode

error: called from:
error: /usr/share/octave/3.6.4-rc0/m/plot/text.m at line 99, column 5
error: /home/users/dacosta/M_MAP/m_map/m_grid.m at line 345, column 4
error: _go_draw_axes_: gnuplot (as of v4.2) only supports 3D filled triangular patches
error: called from:
error: /usr/share/octave/3.6.4-rc0/m/plot/private/__go_draw_axes__.m at line 647, column 20
error: /usr/share/octave/3.6.4-rc0/m/plot/private/__go_draw_figure__.m at line 167, column 19
error: /usr/share/octave/3.6.4-rc0/m/plot/__gnuplot_drawnow__.m at line 86, column 5

Do you have any suggestion for avoiding this error ?

Thanks a lot in advance.

Ed.

Anonymous
Fri 10 Feb 2012 05:46:22 PM UTC, comment #4:

Re-titling report to reflect true issue.

Rik <rik5>
Project Administrator
Wed 16 Feb 2011 08:33:13 PM UTC, comment #3:

This seems like a lot of added complexity to solve a "problem" that can be avoided by using the full property names. Presumably, the list of properties in Matlab can also change over time, so which set of properties is Octave expected to conform to, and who maintains the list? I guess you would not want the list compiled in to Octave so that it could be easily updated without recompiling?

I would perhaps consider such a change, but I'm not going to volunteer to implement it myself.

John W. Eaton <jwe>
Project Administrator
Wed 16 Feb 2011 07:20:01 PM UTC, comment #2:

If we compile a list of property names that exist in Matlab, then perhaps in those cases that the abbreviation would be resolvable against the list of properties that Matlab supports, we can resolve it to the Matlab expansion and issue a warning instead of an error?

Rather than issuing an error that "horizontalalignment" and "horizontalalignmentmode" conflict and stopping execution when encountering "horizontal", octave could instead check the alternatives against the Matlab compatibility list and if a unique solution was found issue a warning and continue with the Matlab expansion.

So in this case "horizontalalignment" and "horizontalalignmentmode" would be searched and presumabley "horizontalalignment" would be found but "horizontalalignmentmode" would not. Octave would issue a warning asking the user to repair the code, and then continue while using the "horizontalalignment" property.

Thoughts?

Judd Storrs <judd>
Wed 16 Feb 2011 06:24:08 PM UTC, comment #1:

Apparently in this case, Matlab does not have a horizontalalignmentmode property, so horizontal is not ambiguous?

But what happens if they do add a new property that makes previously unique abbreviations ambiguous?

Should Octave not ever provide additional properties over what is provided in Matlab?

I don't know what the best solution is here, except to recommend that you not use abbreviated property names.

John W. Eaton <jwe>
Project Administrator
Tue 15 Feb 2011 09:46:42 PM UTC, original submission:

I downloaded the m_map Matlab application from
http://www.eos.ubc.ca/~rich/map.html

1. Start octave
2. cd to the m_map directory
3. addpath("private");
4. m_demo();

error: get: ambiguous text property name horizontal; possible matches:

horizontalalignment horizontalalignmentmode

error: called from:
error: /usr/local/share/octave/3.4.0/m/plot/text.m at line 78, column 18
error: /home/tomdean/Math/Octave/work/m_map/m_grid.m at line 345, column 4
error: /home/tomdean/Math/Octave/work/m_map/m_demo.m at line 40, column 5
error: _go_draw_axes_: gnuplot (as of v4.2) only supports 3D filled triangular patches
error: called from:
error: /usr/local/share/octave/3.4.0/m/plot/__go_draw_axes__.m at line 595, column 20
error: /usr/local/share/octave/3.4.0/m/plot/__go_draw_figure__.m at line 167, column 19
error: /usr/local/share/octave/3.4.0/m/plot/__gnuplot_drawnow__.m at line 86, column 5

Using m_demo(n) where 0<= n <= 13 shows some other incompatibilities.

Thomas Dean <tomdean>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by hardy (Posted a comment)
  • -email is unavailable- added by pantxo (Posted a comment)
  • -email is unavailable- added by mtmiller (Updated the item)
  • -email is unavailable- added by judd (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by tomdean (Submitted the item)
  •  

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

    Only project members can vote.

     

     

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-01-19 mtmiller CategoryNone => Plotting
        Release3.4.0 => dev
        Operating SystemGNU/Linux => Any
    2013-11-07 rik5 Carbon-CopyRemoved 72865 => -
    2012-02-10 rik5 Severity3 - Normal => 2 - Minor
        SummaryMatlab Incompatibilities => Matlab differences when using abbreviated PROPERTY names
    2011-02-21 rik5 Priority5 - Normal => 3 - Low

    Back to the top


    Powered by Savane 3.3