octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #57523] [Feature Request] legend should accept


From: Hartmut
Subject: [Octave-bug-tracker] [bug #57523] [Feature Request] legend should accept 2-letter abbreviations for "Location" property
Date: Sun, 16 May 2021 09:23:44 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0

Follow-up Comment #7, bug #57523 (project octave):

I think it would be well possible to list all valid acronyms for the location
property, if we limit ourself to the most useful acronyms and not try to
achieve perfect Matlab compatibility here.

This is my suggestion for a list of those "useful acronyms":


# assumption: capital letters converted to small letters anyways
# strategy: put spaces only between proper words 
# option: skip the "shortened" strings
strings_north = {"n", "north"};
strings_northoutside = {"no", "northoutside", "north outside", ...
   "northo", "northou", "northout", "northouts", "northoutsi", "northoutsid",
...    # <- skip those?
   "north o", "north ou", "north out", "north outs", "north outsi", "north
outsid"... # <- skip those?
   };
strings_northeast = {"ne", "northeast", "north east"};
strings_northeastoutside = {"neo", "northeastoutside", ...
    "north east outside", "northeast outside", "north eastoutside", ...
    "northeasto", "northeastou", "northeastout", "northeastouts",
"northeastoutsi", "northeastoutsid", ... # <- skip those?
    "north easto",  "north eastou", "north eastout", "north eastouts", "north
eastoutsi", "north eastoutsid", ... # <- skip those?
    "north east o",  "north east ou", "north east out", "north east outs",
"north east outsi", "north east outsid", ... # <- skip those?
    "northeast o",  "northeast ou", "northeast out", "northeast outs",
"northeast outsi", "northeast outsid", ... # <- skip those?
    };
strings_northwest = {"nw", "northwest", "north west"};
strings_northwestoutside = {"nwo", "northwestoutside", ...
    "north west outside", "northwest outside", "north westoutside", ...
    "northwesto", "northwestou", "northwestout", "northwestouts",
"northwestoutsi", "northwestoutsid", ... # <- skip those?
    "north westo",  "north westou", "north westout", "north westouts", "north
westoutsi", "north westoutsid", ... # <- skip those?
    "north west o",  "north west ou", "north west out", "north west outs",
"north west outsi", "north west outsid", ... # <- skip those?
    "northwest o",  "northwest ou", "northwest out", "northwest outs",
"northwest outsi", "northwest outsid", ... # <- skip those?
    };
#west
#westoutside
#east
#eastoutside
#south
#southoutside
#southeast
#southeastoutside
#southwest
#southwestoutside 
#best
#bestoutside
#none


questions:
* Do you think it is feasible to proceed with such a list of all acronym
strings that we want to support? (If yes, I can generate the full list.)
* What do you think of the "shortened versions", like "northeastou", are they
worth the effort of supporting them? (I tend to just skip them. They are
always "...outside" strings, this concept is not usable with most of the
strings anyways.)
* What would be the way to integrate this approach into the current input
parsing code of legend.m? We would eventually like the location property to be
"northwest", even when called via "nw" I assume. How should we do this?


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?57523>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]