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


Groups > comp.graphics.apps.gnuplot > #4157 > unrolled thread

Version 5.2 patchlevel 6

Started byChris Elvidge <chris@mshome.net>
First post2019-02-22 15:38 +0000
Last post2019-02-23 15:39 +0000
Articles 6 — 3 participants

Back to article view | Back to comp.graphics.apps.gnuplot


Contents

  Version 5.2 patchlevel 6 Chris Elvidge <chris@mshome.net> - 2019-02-22 15:38 +0000
    Re: Version 5.2 patchlevel 6 Savin Beniwal <darshanbeniwal11@gmail.com> - 2019-02-22 21:34 -0800
      Re: Version 5.2 patchlevel 6 Ethan Merritt <eamerritt@gmail.com> - 2019-02-23 06:04 +0000
        Re: Version 5.2 patchlevel 6 Savin Beniwal <darshanbeniwal11@gmail.com> - 2019-02-22 22:22 -0800
        Re: Version 5.2 patchlevel 6 Chris Elvidge <chris@mshome.net> - 2019-02-23 11:42 +0000
          Re: Version 5.2 patchlevel 6 Chris Elvidge <chris@mshome.net> - 2019-02-23 15:39 +0000

#4157 — Version 5.2 patchlevel 6

FromChris Elvidge <chris@mshome.net>
Date2019-02-22 15:38 +0000
SubjectVersion 5.2 patchlevel 6
Message-ID<q4p50u$v7o$1@dont-email.me>
Hi all.

Does anyone know how to get a degree sign (°) on svg enhanced terminal, 
output file.svg

I have

NT=temperature (a float, for use later, say 75.4456789)
dg=system("/usr/bin/printf \\\\0B00")
dg=" ".dg."C"

print dg here prints " °C"

nt=sprintf("%.1f",NT)
nt=nt.dg

print nt prints "75.4 °C"

However, after plotting to the output file, the ° sign disappears, even 
at the command line.

Thanks

-- 

Chris Elvidge, England

[toc] | [next] | [standalone]


#4158

FromSavin Beniwal <darshanbeniwal11@gmail.com>
Date2019-02-22 21:34 -0800
Message-ID<59f7fec7-639d-4faa-9274-7b809594e1e8@googlegroups.com>
In reply to#4157
On Friday, 22 February 2019 21:08:08 UTC+5:30, Chris Elvidge  wrote:
> Hi all.
> 
> Does anyone know how to get a degree sign (°) on svg enhanced terminal, 
> output file.svg
> 
> I have
> 
> NT=temperature (a float, for use later, say 75.4456789)
> dg=system("/usr/bin/printf \\\\0B00")
> dg=" ".dg."C"
> 
> print dg here prints " °C"
> 
> nt=sprintf("%.1f",NT)
> nt=nt.dg
> 
> print nt prints "75.4 °C"
> 
> However, after plotting to the output file, the ° sign disappears, even 
> at the command line.
> 
> Thanks
> 
> -- 
> 
> Chris Elvidge, England

Dear Chris!!!
Have you tried with  {/Symbol \260} ? I think it works well. 
And you may follow this link -----> http://ayapin-film.sakura.ne.jp/Gnuplot/Docs/ps_guide.pdf

With Regards!!!!
----------
Savin 

[toc] | [prev] | [next] | [standalone]


#4159

FromEthan Merritt <eamerritt@gmail.com>
Date2019-02-23 06:04 +0000
Message-ID<q4qnp8$k3h$1@dont-email.me>
In reply to#4158
On Fri, 22 Feb 2019 21:34:37 -0800, Savin Beniwal wrote:

> On Friday, 22 February 2019 21:08:08 UTC+5:30, Chris Elvidge  wrote:
>> Hi all.
>> 
>> Does anyone know how to get a degree sign (°) on svg enhanced terminal, 
>> output file.svg

SVG is natively in UTF-8 encoding.
You should set gnuplot to match.
(Actually you should set gnuplot to use UTF8 always unless there
 is some special reason not to).

gnuplot> set encoding utf8
gnuplot> show decimal
        decimalsign for input is  . 
        decimalsign for output has default value (normally '.')
        degree sign for output is ° 


> Dear Chris!!!
> Have you tried with  {/Symbol \260} ? I think it works well. 
> Savin

No, sorry. That won't work.
Symbol \260 assumes the encoding is Adobe Special Symbol,
which is basically only preferred for PostScript output.
I don't think you can get SVG to use that encoding.


	cheers

		Ethan

[toc] | [prev] | [next] | [standalone]


#4160

FromSavin Beniwal <darshanbeniwal11@gmail.com>
Date2019-02-22 22:22 -0800
Message-ID<62abbaa2-a003-4f7c-816d-e07a5ea86182@googlegroups.com>
In reply to#4159
On Saturday, 23 February 2019 11:34:25 UTC+5:30, Ethan Merritt  wrote:
> On Fri, 22 Feb 2019 21:34:37 -0800, Savin Beniwal wrote:
> 
> > On Friday, 22 February 2019 21:08:08 UTC+5:30, Chris Elvidge  wrote:
> >> Hi all.
> >> 
> >> Does anyone know how to get a degree sign (°) on svg enhanced terminal, 
> >> output file.svg
> 
> SVG is natively in UTF-8 encoding.
> You should set gnuplot to match.
> (Actually you should set gnuplot to use UTF8 always unless there
>  is some special reason not to).
> 
> gnuplot> set encoding utf8
> gnuplot> show decimal
>         decimalsign for input is  . 
>         decimalsign for output has default value (normally '.')
>         degree sign for output is ° 
> 
> 
> > Dear Chris!!!
> > Have you tried with  {/Symbol \260} ? I think it works well. 
> > Savin
> 
> No, sorry. That won't work.
> Symbol \260 assumes the encoding is Adobe Special Symbol,
> which is basically only preferred for PostScript output.
> I don't think you can get SVG to use that encoding.
> 
> 
> 	cheers
> 
> 		Ethan

Oh, then at this point I don't know the solution of your query Chris.!!!
Thank you Ethan. 

With Regards!!1

[toc] | [prev] | [next] | [standalone]


#4161

FromChris Elvidge <chris@mshome.net>
Date2019-02-23 11:42 +0000
Message-ID<q4rbk3$s0p$1@dont-email.me>
In reply to#4159
On 23/02/2019 06:04, Ethan Merritt wrote:
> On Fri, 22 Feb 2019 21:34:37 -0800, Savin Beniwal wrote:
> 
>> On Friday, 22 February 2019 21:08:08 UTC+5:30, Chris Elvidge  wrote:
>>> Hi all.
>>>
>>> Does anyone know how to get a degree sign (°) on svg enhanced terminal,
>>> output file.svg
> 
> SVG is natively in UTF-8 encoding.
> You should set gnuplot to match.
> (Actually you should set gnuplot to use UTF8 always unless there
>   is some special reason not to).
> 
> gnuplot> set encoding utf8
> gnuplot> show decimal
>          decimalsign for input is  .
>          decimalsign for output has default value (normally '.')
>          degree sign for output is °
> 
> 
>> Dear Chris!!!
>> Have you tried with  {/Symbol \260} ? I think it works well.
>> Savin
> 
> No, sorry. That won't work.
> Symbol \260 assumes the encoding is Adobe Special Symbol,
> which is basically only preferred for PostScript output.
> I don't think you can get SVG to use that encoding.
> 
> 
> 	cheers
> 
> 		Ethan
> 

Thanks Ethan. I (now) have:

(I thought that Verdana might be causing a problem, so I put in the full 
path; and I've changed the definition of dg to
dg=" `/usr/bin/printf "\u00B0"`C")

gnuplot> load 'gpts/gnuplot_temp_24.gpt'
gnuplot> show term

    terminal type is svg size 1100,500 dynamic enhanced font 
'/usr/share/fonts/microsoft/verdana,12' butt dashlength 1.0

gnuplot> show encoding

         nominal character encoding is utf8
         however LC_CTYPE in current locale is en_GB.UTF-8

gnuplot> show decimal

         decimalsign for input is  .
         decimalsign for output has default value (normally '.')
         degree sign for output is °

gnuplot> print nt
74.7 ଀C
gnuplot> print NT
74.65
gnuplot> nt=sprintf("%.1f",NT)." `/usr/bin/printf "\u00B0"`C"
gnuplot> print nt
74.7 °C

So the degree sign somehow disappears during plotting.
On the plot that small square thing is there, too.
At least now I get something instead of nothing.
Is this a good thing?

But, how do I get the degree sign to stick? Or how do I set it in a 
format string? Or how do I print it?

Thanks
Cheers


-- 

Chris Elvidge, England

[toc] | [prev] | [next] | [standalone]


#4162

FromChris Elvidge <chris@mshome.net>
Date2019-02-23 15:39 +0000
Message-ID<q4rpg0$f84$1@dont-email.me>
In reply to#4161
On 23/02/2019 11:42, Chris Elvidge wrote:
> On 23/02/2019 06:04, Ethan Merritt wrote:
>> On Fri, 22 Feb 2019 21:34:37 -0800, Savin Beniwal wrote:
>>
>>> On Friday, 22 February 2019 21:08:08 UTC+5:30, Chris Elvidge  wrote:
>>>> Hi all.
>>>>
>>>> Does anyone know how to get a degree sign (°) on svg enhanced terminal,
>>>> output file.svg
>>
>> SVG is natively in UTF-8 encoding.
>> You should set gnuplot to match.
>> (Actually you should set gnuplot to use UTF8 always unless there
>>   is some special reason not to).
>>
>> gnuplot> set encoding utf8
>> gnuplot> show decimal
>>          decimalsign for input is  .
>>          decimalsign for output has default value (normally '.')
>>          degree sign for output is °
>>
>>
>>> Dear Chris!!!
>>> Have you tried with  {/Symbol \260} ? I think it works well.
>>> Savin
>>
>> No, sorry. That won't work.
>> Symbol \260 assumes the encoding is Adobe Special Symbol,
>> which is basically only preferred for PostScript output.
>> I don't think you can get SVG to use that encoding.
>>
>>
>>     cheers
>>
>>         Ethan
>>
> 
> Thanks Ethan. I (now) have:
> 
> (I thought that Verdana might be causing a problem, so I put in the full 
> path; and I've changed the definition of dg to
> dg=" `/usr/bin/printf "\u00B0"`C")
> 
> gnuplot> load 'gpts/gnuplot_temp_24.gpt'
> gnuplot> show term
> 
>     terminal type is svg size 1100,500 dynamic enhanced font 
> '/usr/share/fonts/microsoft/verdana,12' butt dashlength 1.0
> 
> gnuplot> show encoding
> 
>          nominal character encoding is utf8
>          however LC_CTYPE in current locale is en_GB.UTF-8
> 
> gnuplot> show decimal
> 
>          decimalsign for input is  .
>          decimalsign for output has default value (normally '.')
>          degree sign for output is °
> 
> gnuplot> print nt
> 74.7 ଀C
> gnuplot> print NT
> 74.65
> gnuplot> nt=sprintf("%.1f",NT)." `/usr/bin/printf "\u00B0"`C"
> gnuplot> print nt
> 74.7 °C
> 
> So the degree sign somehow disappears during plotting.
> On the plot that small square thing is there, too.
> At least now I get something instead of nothing.
> Is this a good thing?
> 
> But, how do I get the degree sign to stick? Or how do I set it in a 
> format string? Or how do I print it?
> 
> Thanks
> Cheers
> 
> 
I know I shouldn't reply to myself, but I just managed this:

set ylabel "Temperature (`/usr/bin/printf "\u00B0"`C)"
actually gives me:
Temperature (°C)

-- 

Chris Elvidge, England

[toc] | [prev] | [standalone]


Back to top | Article view | comp.graphics.apps.gnuplot


csiph-web