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: PlottingSeverity: 2 - Minor
Priority: 3 - LowItem Group: Other
Status: NoneAssigned to: None
Originator Name: Thomas DeanOpen/Closed: Open
Release: devOperating 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 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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by hardy (Posted a comment)
  • -unavailable- added by pantxo (Posted a comment)
  • -unavailable- added by mtmiller (Updated the item)
  • -unavailable- added by judd (Posted a comment)
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by tomdean (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
    Sun 19 Jan 2014 11:56:45 PM UTCmtmillerCategoryNone=>Plotting
      Release3.4.0=>dev
      Operating SystemGNU/Linux=>Any
    Thu 07 Nov 2013 04:25:37 PM UTCrik5Carbon-CopyRemoved 72865=>-
    Fri 10 Feb 2012 05:46:22 PM UTCrik5Severity3 - Normal=>2 - Minor
      SummaryMatlab Incompatibilities=>Matlab differences when using abbreviated PROPERTY names
    Mon 21 Feb 2011 03:44:50 AM UTCrik5Priority5 - Normal=>3 - Low

    Back to the top


    Powered by Savane 3.1-cleanup1