Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #3979

Re: How to reset configurations to their defaults?

From Ethan Merritt <eamerritt@gmail.com>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: How to reset configurations to their defaults?
Date 2018-06-28 04:36 +0000
Organization A noiseless patient Spider
Message-ID <ph1okb$7m0$2@dont-email.me> (permalink)
References <cd0f19dc-36b6-4636-9101-1bd02a47062b@googlegroups.com>

Show all headers | View raw


On Wed, 27 Jun 2018 12:01:34 -0700, palme wrote:

> Hi all,
> 
> I have something like the following:
> 
>  set multiplot layout 2,2 # first graph set xlabel "foo" font "serif,10"
>  set xtics format "%0.2f"
>  plot ...
>  # second graph set xlabel "bar"
>  set xtics 0,1,10 plot ...
>  # etc. etc.
>  unset multiplot
> 
> The problem with this approach is that for example, the second "set
> xlabel" uses the same font setting as the first one, although I want to
> use the DEFAULT font instead.

   unset xtics; set xtics

will restore the default font and most other properties.
 
> Similarily, the second "set xtics" command uses the same format string
> as the first one, although I want the second one to use the DEFAULT
> format string.

  set format 
pr
  set format x

will restore the default format.

[FYI: "set xtics format foo" was a recently added alias for
"set format x foo", which is why neither "set xtics" or "unset xtics"
clears it.  That was maybe an oversight.]

	Ethan
   

 
> Currently I see the following (ugly) solutions for this:
> 
> - For all settings always specify all parameters explicitly, i.e. in the
> example above, add an explicit 'font whatever-the-default-is' respective
> 'format "whatever-the-defaultis"' to the set commands. You already see
> that this would require me to know all default values, and it would make
> the commands stupidly long
> 
> - For some settings there is a way to reset them to their default values
> (e.g. "unset samples" or "set key default"), so that I thought about
> using the unset command just before the set command, to always start
> over from the default values. However, this does not work for all
> settings, e.g. "unset xtics; set xtics" does NOT return all values to
> their defaults (see https://sourceforge.net/p/gnuplot/bugs/2061/ ).
> Similar issue with "set grid" and other settings, for which I did not
> find a way to reset them to their default values. So this is also not a
> generic solution.
> 
> - Using "reset" just before calling all the "set" commands would work in
> general - except in this case where I am in a multiplot context, because
> the "reset" command will also destroy my multiplot context.
> 
> Maybe it's worth mentioning that I am working on a tool which creates
> gnuplot command files on the fly, based on some database content, user
> input, stuff like that. So I cannot "fine tune" the resulting gnuplot
> files by hand, but need a generic way to ensure that each plot (in a
> multiplot environment) looks exactly as given in the configuration, and
> does not "inherit" configuration settings from the previous plot.
> 
> Any hints/tips/tricks for how to solve this?
> 
> Thanks and regards -stefan-

Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

How to reset configurations to their defaults? palme@kapott.org - 2018-06-27 12:01 -0700
  Re: How to reset configurations to their defaults? Ethan Merritt <eamerritt@gmail.com> - 2018-06-28 04:36 +0000
  Re: How to reset configurations to their defaults? palme@kapott.org - 2018-06-27 22:07 -0700
    Re: How to reset configurations to their defaults? palme@kapott.org - 2018-06-27 22:26 -0700
      Re: How to reset configurations to their defaults? palme@kapott.org - 2018-06-27 23:01 -0700
        Re: How to reset configurations to their defaults? Ethan Merritt <sfeam@users.sf.net> - 2018-06-28 19:32 +0000
          Re: How to reset configurations to their defaults? palme@kapott.org - 2018-06-28 13:14 -0700
            Re: How to reset configurations to their defaults? palme@kapott.org - 2018-06-28 13:22 -0700
              Re: How to reset configurations to their defaults? Karl Ratzsch <mail.kfr@gmx.net> - 2018-06-29 01:57 +0200
                Re: How to reset configurations to their defaults? palme@kapott.org - 2018-06-28 21:32 -0700
                Re: How to reset configurations to their defaults? Ethan Merritt <eamerritt@gmail.com> - 2018-06-29 05:37 +0000
                Re: How to reset configurations to their defaults? palme@kapott.org - 2018-06-29 00:27 -0700
                Re: How to reset configurations to their defaults? Ethan Merritt <eamerritt@gmail.com> - 2018-06-29 21:04 +0000

csiph-web