Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: =?UTF-8?Q?J=c3=b6rg_Buchholz?= Newsgroups: comp.graphics.apps.gnuplot Subject: Re: linecolor and fillcolor as stringvariable Date: Tue, 3 Sep 2019 14:38:58 +0200 Organization: A noiseless patient Spider Lines: 27 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Tue, 3 Sep 2019 12:38:59 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="a715b7968ec4d934128585f9ef9e8222"; logging-data="7756"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/wDKrbP6ga4eLwnRP84aTPUrAEybC1iTc=" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 Cancel-Lock: sha1:aURf4BkU3jcdd9EiIscFuBnMo44= In-Reply-To: Content-Language: en-GB Xref: csiph.com comp.graphics.apps.gnuplot:4220 On 03.09.2019 14:03, Jörg Buchholz wrote: > Hello, > > for me string variables being hard. I can't found a way to set "lc" and > "fc" as string variables. > > example: > > color1 = "red" > color2 = "green" > set obj 1 rect from 0,0 to 5,5 fc color1 > set obj 2 rect from 0,0 to 5,-5 fc color2 > plot sin(x) w l lc color1, cos(x) w l lc color2 > > How must I define the variables? > OK. I found a way. color1 = "'red'" color2 = "'green'" set obj 1 rect from 0,0 to 5,5 fc @color1 set obj 2 rect from 0,0 to 5,-5 fc @color2 plot sin(x) w l lc @color1, cos(x) w l lc @color2 Jörg