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 : other Priority:  5 - Normal
Status:  None Privacy:  Public
Assigned to:  None Open/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>
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 Files:
   
   
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
  • -email is unavailable- added by lachlan (Posted a comment)
  • -email is unavailable- added by alwin (Submitted the item)
  • -email is 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 add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-07-07 lachlan CategoryNone => Core : other
    2016-05-30 alwin Attached File- => Added legend.m, #37310
        Attached File- => Added legend_original.m, #37311
        Carbon-Copy- => Added -email is unavailable-

    Back to the top


    Powered by Savane 3.3