Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: =?UTF-8?Q?J=c3=b6rg_Buchholz?= Newsgroups: comp.graphics.apps.gnuplot Subject: variable in plot command and key Date: Mon, 9 Jan 2017 17:50:51 +0100 Organization: A noiseless patient Spider Lines: 37 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Mon, 9 Jan 2017 16:49:18 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="e37dff959fc0ccff056cab386792ff70"; logging-data="26310"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18LxIsOcGaoffqOT7GUvKHt1Xyp5Z1j+jY=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.5.1 X-Mozilla-News-Host: news://news.eternal-september.org:119 Cancel-Lock: sha1:yVUpaTbVQl0CRp7O4tSqHYT43xw= Xref: csiph.com comp.graphics.apps.gnuplot:3519 Hello, how can I use a string variable as "plot data" and in the key, with a underline in the variable and the default key entry? example: the plot data are in the file "test_test.dat". If I use the plot command plot 'test_test.dat' u 1:2 gnuplot gives a correct plot with the key entry "'test_test.dat' u 1:2" to me, it is the default key entry. Now I want to have the name of the file as a variable, for example "data" data = 'test_test.dat' plot data u 1:2 The plot is correct but the key entry is "data u 1:2" instead "'test_test.dat' u 1:2". Next thing I have tried is: data = 'test_test.dat' plot data u 1:2 t data The plot is correct but in the key there is a problem with the "_" and the "u 1:2" is missing. Is there a way to use a variable as data file name and have the default key entry? Jörg