Path: csiph.com!aioe.org!+8mPIB5KbEwMk3TfLZpgnQ.user.gioia.aioe.org.POSTED!not-for-mail From: Martin Brown <'''newspam'''@nonad.co.uk> Newsgroups: comp.graphics.apps.gnuplot Subject: Re: Escaping special characters into titles/axis labels Date: Sun, 21 Mar 2021 09:32:37 +0000 Organization: Aioe.org NNTP Server Lines: 37 Message-ID: References: NNTP-Posting-Host: +8mPIB5KbEwMk3TfLZpgnQ.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 X-Notice: Filtered by postfilter v. 0.9.2 Content-Language: en-GB Xref: csiph.com comp.graphics.apps.gnuplot:4397 On 19/03/2021 19:59, Karl Ratzsch wrote: > Am 19.03.2021 um 17:13 schrieb Martin Brown: >> I'm new to gnuplot and find it very powerful but there are a couple of >> fairly simple things that I just can't see how to do. >> >> One is to escape in the greek symbol 'alpha', 'beta','theta' or 'pi' >> or equivalently to tell the axis scaling logic that I would like an >> axis to scaled in fractions of pi. I can rename the variables but pi >> is well pi! > > > The most straightforward method is to set all tics explicitly > >     set xtics pi ('pi/2' pi/2, 'pi' pi, '3pi/2' 3*pi/2, \ >               '2pi' 2*pi, '5pi/2' 5*pi/2, '3pi' 3*pi) >     set grid >     plot [0:3*pi] sin(x) > > , you might use a "do for" loop to create the tics/labels as a macro > string. Alternatively you can just scale everything > >     set xtics .5 format '%hpi' >     set grid >     plot [0:3] sin(x*pi) title 'sin(x)' > > . It could be nice to be able to add a piece of math containing the axis > variable to the format string, like with gprintf(). You can post a > feature request on gnuplot.sf.net > > Use utf8 encoding ("set encoding utf8") to put in the pi symbol (copy > the greek symbols from a web page), or use one of the latex terminals. Thank you for your very helpful explanation of how to do it. -- Regards, Martin Brown