'paperpositionmode' change to rid gnuplot_set_term: size is zero
Ben Abbott
bpabbott at mac.com
Sat Jan 3 17:13:10 CST 2009
On Jan 3, 2009, at 5:07 PM, Michael Goffioul wrote:
> On Sat, Jan 3, 2009 at 9:38 PM, Ben Abbott <bpabbott at mac.com> wrote:
>> In a nutshell ... I'd like to be able to set the default values for
>> properties representing vectors. For example, figure.paperposition
>> where
>> we'd like the default to be [0.25, 2.5, 8, 6]. I don't see how this
>> can be
>> done. In graphics.h.in I can set each element to the same value
>> (all zeros
>> for example), but I don't see how to set the default to a vector with
>> differing values.
>
> You can't. To achieve that, you have to use an indirect way. See for
> instance what I did to set the default figure position in
> graphics.h.in.
> Another way would be to have a utility function like
>
> Matrix make_vector(int n, ...)
>
> that you could use in graphics.h.in to initialize properties with
> predefined vector. The implementation of such function would use
> stdargs.h or varargs.h.
>
>> Then there is the problem that the defaults are set after the
>> callbacks are
>> in place, which changes some of the defaults. As you point out this
>> can be
>> easily fixed, but I'd think it more proper to set the defaults
>> prior to
>> setting up the callbacks.
>
> I'm not sure what's the best in this specific case. If you want to
> force a default value for xtick, then it makes sense to also have
> xtickmode set to manual, otherwise your default xtick value would
> be useless and immediately overwritten by the system as xtickmode
> would be auto. Could anybody check what happens under Matlab:
>
> close all
> set(0, 'defaultaxesxtick', [0:1:10])
> get(gca, 'xtick')
> get(gca, 'xtickmode')
>
> Michael.
Excellent point!
>> close all
>> set(0, 'defaultaxesxtick', [0:1:10])
>> get(gca, 'xtick')
>> get(gca, 'xtickmode')
ans = 0 1 2 3 4 5 6 7 8 9 10
ans = manual
Thanks for the guidance.
Ben
More information about the Octave-maintainers
mailing list