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: Thu, 16 May 2013 23:22:11 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:18.0) Gecko/20100101 Firefox/18.0 SeaMonkey/2.15

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

Oh, OK.  And I see there is a way to set defaults:


  void set (const caseless_str& name, const octave_value& value)
  {
    if (name.compare ("default", 7))
      // strip "default", pass rest to function that will
      // parse the remainder and add the element to the
      // default_properties map.
      default_properties.set (name.substr (7), value);
    else
      xproperties.set (name, value);


xproperties is the current properties for the figure, i.e., when a
conventional "set(gca, "linewidth", 2.3)" is done.

default_properties, I'm guessing, is supposed to be the default for a new
figure or the result of "reset".  It is controlled via "set(gca,
"defaultlinewidth", 2.3)", for example, and these might be commands in one's
.octaverc file, perhaps?

But maybe what is missing is a copy of factory settings into
"default_properties" at the very beginning, i.e., initialization of
root_figure.  I'm wondering if that is what reset_default_properties() was
intended to do.  But there would also need to be a "reset_properties ()" that
copies the "default_properties" into "xproperties" which is called when
someone creates a new plot or uses "reset".

So that would give the user the ability to create his or her own default
properties in .octaverc thereby overriding the factory defaults.

Should the following maybe be declared static?


private:
  property_list default_properties;


so that the default_properties do not change from new figure to new figure? 
(I realize you might not know how the answer to that.)  Otherwise when a new
figure is created there is no option but to get "default_properties" from the
factory defaults.  That doesn't save much work though because then the user
would have to do "set(gcf, "defaultXYZ", xyzval)" after every new figure, in
which case one might as well do "set(gcf, "XYZ", xyzval)" after every new
figure.

This was probably some loose end that was overlooked in some huge changeset.


    _______________________________________________________

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]