|
From: Hans-Bernhard B. <br...@ph...> - 2005-08-01 18:19:00
|
Ethan Merritt wrote:
> In what way do you see this as different from the notion of
> `reset, then apply explicit changes` ?
Not a lot. But that's partly missing the point: the concept of
"explicit changes" currently simply doesn't exist anywhere in save.c,
except your recent modification. It might be a good idea to keep in
mind should we ever want to re-write save_set() almost from scratch, but
for now, the strategy is: save all settings in a way that overwrites
whatever previous settings there were.
> While we're on the topic, I have a related problem that I really don't
> know how best to deal with. The "datastrings" and "histograms" modules
> make heavy use of the ability to read tic-labels and key-titles from a
> data file. Internally, these label structures are fed into the same
> data structures that are loaded by explicit user commands like
> set xtics ("foo" 1, "bar" 2, "etc" 3)
>
> But this means that when you `save` the current state, you get a dump
> of the most recent tic labels read from a data file. This is really
> annoying if you don't remember to wipe the xtic entries clear, either
> before saving or after restoring. What are your thoughts on this
> issue?
I see two major possibilities:
1) handle it the same way it's done for other things that change
dynamically during a plot, most notably the ranges: duplicate the key
data structures, prefix one with "set_", and copy the set_ versions into
the un-prefixed instance in axis.h:AXIS_INIT{2,3}D
2) move the labels found in the data file to some other place, and
change gen_tics and/or xtick{2,3}d_callback to use that instead of
normal ones.
|