Path: csiph.com!feeder.erje.net!1.eu.feeder.erje.net!weretis.net!feeder4.news.weretis.net!feeder5.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Karl Ratzsch Newsgroups: comp.graphics.apps.gnuplot Subject: Re: space between sign and digit Date: Thu, 12 Jul 2018 06:53:12 +0200 Organization: solani.org Lines: 25 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: solani.org 1531371189 10470 127.0.0.43 (12 Jul 2018 04:53:09 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Thu, 12 Jul 2018 04:53:09 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 Cancel-Lock: sha1:MQxcaF5wUj0qEBRFwFwtfsNNTfw= Content-Language: de-DE-1901 X-User-ID: eJwFwQERADEIAzBLz1gLyFnh8C/hEziNHZfgxWLbn8ebKuJopDkTmeiUNs2IVlW27n47cv0t7xH9 In-Reply-To: Xref: csiph.com comp.graphics.apps.gnuplot:4001 Am 11.07.2018 um 20:06 schrieb Hans-Bernhard Bröker: > Am 11.07.2018 um 08:52 schrieb Jörg Buchholz: >> I would like to print a function in the key like this: >> >> f11(x) = -2.56·x - 103.63 >> >> I use the following code in the plot command for that: >> >> f11(x) lt 2 lw 4 dt 4 t sprintf("f11(x) =%6.2f·x%+7.2f",a,b11) >> >> That means, that I use the sign from the format specifier as plus >> sign >> or minus sing in the printed function. But than I don't have a >> space in >> front of the second number. The second number can be positive or >> negative. > > So what's so wrong with the simple > >     sprintf("f11(x) = %6.2f·x + % 7.2f",a,b11) >      > ?  Yes, that means for negative bl1 you'll get "+ -103.63", but is > that really such a problem? Probably a matter of taste. ;-)