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


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

Re: variable in plot command and key

Path csiph.com!weretis.net!feeder4.news.weretis.net!feeder5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From Karl Ratzsch <mail.kfr@gmx.net>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: variable in plot command and key
Date Mon, 9 Jan 2017 23:50:19 +0100
Organization solani.org
Lines 18
Message-ID <o5143c$c45$1@solani.org> (permalink)
References <o50eue$pm6$1@dont-email.me>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 8bit
X-Trace solani.org 1484002220 12421 eJwNy8kBgAAIA7CZgFJhHLn2H0HzjxuF/YBO+PmtbreVyHKScyGMmsrEBuNi3jWDNvT0X/gAMMURSg== (9 Jan 2017 22:50:20 GMT)
X-Complaints-To abuse@news.solani.org
NNTP-Posting-Date Mon, 9 Jan 2017 22:50:20 +0000 (UTC)
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0
X-NNTP-Posting-Host eJwFwYEBgDAIA7CXZLRFzgEm/59gQpdpAqLA5W70eWyuYXaLusp8yxuYiU4Xj7oya7Aen/0oeRFr
In-Reply-To <o50eue$pm6$1@dont-email.me>
X-User-ID eJwNwokVADEEBcCWEMdXDrH6LyH7Zuw4+w11c7X9oTFMbahogRGWQuV+M47ayJLKgNzkoZ7zABZFEQs=
Cancel-Lock sha1:FZhUD9+vi4HGGPIsnBSNB49S1uI=
Xref csiph.com comp.graphics.apps.gnuplot:3520

Show key headers only | View raw


Am 09.01.2017 um 17:50 schrieb Jörg Buchholz:
> 
> 
> Is there a way to use a variable as data file name and have the default
> key entry?
> 

You mean you want to see the actual file name + the actual "using"
specifier"? I think not, at least not directly.

You could write the whole plot command into a string and execute it
with "evaluate"

  fname = "'test_1.dat'"
  eval "plot ".fname." us 1:2"


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


Thread

variable in plot command and key Jörg Buchholz <bookwood4new@freenet.de> - 2017-01-09 17:50 +0100
  Re: variable in plot command and key Karl Ratzsch <mail.kfr@gmx.net> - 2017-01-09 23:50 +0100
    Re: variable in plot command and key Ethan A Merritt <EAMerritt@gmail.com> - 2017-01-09 21:59 -0800
      Re: variable in plot command and key Jörg Buchholz <bookwood4new@freenet.de> - 2017-01-10 08:17 +0100
        Re: variable in plot command and key Ethan A Merritt <EAMerritt@gmail.com> - 2017-01-10 08:54 -0800
          Re: variable in plot command and key Jörg Buchholz <bookwood4new@freenet.de> - 2017-01-11 08:22 +0100

csiph-web