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

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

[Octave-bug-tracker] [bug #41770] Some factory defaults don't conform to


From: Pantxo Diribarne
Subject: [Octave-bug-tracker] [bug #41770] Some factory defaults don't conform to matlab values
Date: Wed, 26 Mar 2014 22:09:39 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:27.0) Gecko/20100101 Firefox/27.0

Follow-up Comment #4, bug #41770 (project octave):

cdata: should octave logo be loaded (and how) at run time or included from a
data header file at compile time?

color: 

get (0)   ## returns only root properties as in Octave
get (0, 'defaultlinecolor')  ## returns [0, 0, 0] as in octave but in ML it is
a default set at root level
get (0, 'factorylinecolor')  ## returns [1, 1, 1] contrary to octave
reset (0); ## this removes all non factory defaults defined at root level
get (0, 'defaultlinecolor')  ## now returns the factory default [1, 1, 1] 
line ();  ## now produces a white line  


AFAICS, octave and ML perform pretty much the same (see the diagram in [1]).
The thing is for lines ML has to change the line default at run time. Looks
like internal cuisine that leads to weird behavior after reset. If it as
acceptable to not have the same factory default here, I would not try to mimic
this ML behavior.

In ML you can retrieve root level (default && !factory) for a given graphic
object type using "get (0, 'defaultOBJTYPE')"   


>> get (0, 'defaultline')
ans = 
    defaultLineColor: [0 0 0]
>> get (0, 'defaultpatch')
ans = 
    defaultPatchFaceColor: [0 0 0]
    defaultPatchEdgeColor: [0 0 0]
>> get (0, 'defaultsurface')
ans = 
    defaultSurfaceEdgeColor: [0 0 0]
>> get (0, 'defaultimage')
ans = 
0x0 struct array with no fields.
>> get (0, 'defaulthggroup')
ans = 
0x0 struct array with no fields.


Now about "displayname", forget about it: the error message is the same with
or without the added property. I did not investigate but it looks like images
don't qualify as an "legendable" object. I would add the property, and file a
bug report for legend.

Finally, I'll have to rework the patch anyway as I just noticed it breaks
"surface ()" default behavior.

[1]
http://www.mathworks.fr/fr/help/matlab/creating_plots/setting-default-property-values.html

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?41770>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.gnu.org/




reply via email to

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