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


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

How to reset configurations to their defaults?

X-Received by 2002:ae9:c004:: with SMTP id u4-v6mr3726181qkk.40.1530126094629; Wed, 27 Jun 2018 12:01:34 -0700 (PDT)
X-Received by 2002:a37:21a4:: with SMTP id f36-v6mr373276qki.7.1530126094502; Wed, 27 Jun 2018 12:01:34 -0700 (PDT)
Path csiph.com!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!h2-v6no926782qtp.0!news-out.google.com!u13-v6ni391qtg.0!nntp.google.com!h2-v6no926776qtp.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.graphics.apps.gnuplot
Date Wed, 27 Jun 2018 12:01:34 -0700 (PDT)
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=46.189.28.234; posting-account=dOCFDgoAAADjxX1_Z07BOmxhzKhUF2Q5
NNTP-Posting-Host 46.189.28.234
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <cd0f19dc-36b6-4636-9101-1bd02a47062b@googlegroups.com> (permalink)
Subject How to reset configurations to their defaults?
From palme@kapott.org
Injection-Date Wed, 27 Jun 2018 19:01:34 +0000
Content-Type text/plain; charset="UTF-8"
Content-Transfer-Encoding quoted-printable
Lines 55
Xref csiph.com comp.graphics.apps.gnuplot:3977

Show key headers only | View raw


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.

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.

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 | NextNext 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