patchGNU Octave - Patches: patch #9012, Abbreviations as Location input...

 
 

patch #9012: Abbreviations as Location input for the legend() command

Submitted by:  Alwin Brettschneider <alwin>
Submitted on:  Mon 30 May 2016 02:43:21 PM UTC  
 
Category: Core : otherPriority: 5 - Normal
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Wed 06 Jul 2016 11:49:48 AM UTC, comment #1:

Thanks, Alwin.

Could you please submit a patch (unified diff)?

Lachlan Andrew <lachlan>
Project Member
Mon 30 May 2016 02:43:21 PM UTC, original submission:

Dear Octave team,

This is an adjustment that improves the compatibility of Octave with Matlab syntax.

I made an adjustment to the legend() command. In Matlab it is possible to specify the Location of the legend using only an abbreviation. For example: NorthEast may be abbreviated as NE. This optional notation is clearly mentioned in the Matlab help text for the legend() command, but I noticed today that this optional notation is not possible in Octave. I use this syntax rather often, therefor I made a relatively simple adjustment to allow this input in the legend.m file in lines 244-289.

I checked if the function works.

Example test of the new code:
x=0:0.1:10;
y1=x;
y2=x.^2;
figure;
plot(x,y1,x,y2)
legend('y1','y2','Location','NW')

I attached the original legend.m file as well a my adjusted version.

regards,
Alwin Brettschneider

Alwin Brettschneider <alwin>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #37310:  legend.m added by alwin (57KiB - application/octet-stream)
file #37311:  legend_original.m added by alwin (56KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by lachlan (Posted a comment)
  • -unavailable- added by alwin (Submitted the item)
  • -unavailable- added by alwin (I would like to hear what happens with my adjustment :))
  •  

    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 logged-in users can vote.

     

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

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 07 Jul 2016 01:39:28 AM UTClachlanCategoryNone=>Core : other
    Mon 30 May 2016 02:43:21 PM UTCalwinAttached File-=>Added legend.m, #37310
      Attached File-=>Added legend_original.m, #37311
      Carbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1