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

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

[Octave-bug-tracker] [bug #37290] gnuplot / demo plotyy followed by somb


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #37290] gnuplot / demo plotyy followed by sombrero errors out
Date: Fri, 17 May 2013 04:02:46 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:18.0) Gecko/20100101 Firefox/18.0 SeaMonkey/2.15

Follow-up Comment #31, bug #37290 (project octave):

Well, I'm not sure I've accomplished much other than fixing that small bug
with setting defaults.  I.e., this result:


>> set(gca, "defaultlinewidth", 2.3)

error: invalid line property 'width'


The attached patch will clear this error, but it's too simple and I'm not sure
it agrees with what you are describing Ben.  Here is a sample of what it
produces:


>> haxis = gca
haxis = -6.8962
>> get(haxis, "default")
ans =

  scalar structure containing the fields:


>> set(haxis, "defaultlinewidth", 5)
>> get(haxis, "default")
ans =

  scalar structure containing the fields:

    defaultaxeslinewidth =  5

>> reset(haxis)
>> get(haxis, "default")
ans =

  scalar structure containing the fields:


>>


So, it sort of behaves the way defaults should, but notice the "axes" probably
should not be in the name in this case, i.e., it should read
"defaultlinewidth", not "defaultaxeslinewidth".  Now this might be a fairly
cosmetic thing, but one has to think of where to handle that: in the map
itself (i.e., the property is placed in the defaults map as
"defaultlinewidth"), or when the map is displayed (i.e., the property name is
parsed and "axes" extracted).

Before going that route, I think it might be good to think about this for a
few days.  It's probably the case there is too much to tackle in the time
frame of a GUI release, and in fact this might make a good Google Summer
project with a mercurial branch.  I can't quite understand it all right now. 
The root_figure seems solid--at the 0 level is defined all these factory
settings, every property and value is there.  And the macros contain all
information about possible properties and their possible settings.  But at the
other end the properties are gotten via simple functions that return values. 
But if I try to use, say "defaultlinelinewidth" at the "axes" level to set
that child property value I'm not sure if the user has set that property value
directly.  Going backward through the parents seems easier, i.e., if linewidth
not mapped, look to parent and if defaultaxeslinewidth not mapped, look to
parent and if defaultfigureaxeslinewidth not mapped, look to
factoryfigureaxeslinewidth.  But that too I'm not sure about.

I'm going to hold off for a few days, but what I might try for is just setting
the property values back to the root_figure factory/default when a
"reset(obj)" is done.  For the next release, two ends of the hierarchy sort of
working correctly is probably better than having an intermediate level
overriding something it shouldn't.

(file #28098)
    _______________________________________________________

Additional Item Attachment:

File name: bad_attempt_for_defaults_2013may16.diff Size:2 KB


    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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