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


Groups > comp.graphics.apps.gnuplot > #4161

Re: Version 5.2 patchlevel 6

From Chris Elvidge <chris@mshome.net>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: Version 5.2 patchlevel 6
Date 2019-02-23 11:42 +0000
Organization A noiseless patient Spider
Message-ID <q4rbk3$s0p$1@dont-email.me> (permalink)
References <q4p50u$v7o$1@dont-email.me> <59f7fec7-639d-4faa-9274-7b809594e1e8@googlegroups.com> <q4qnp8$k3h$1@dont-email.me>

Show all headers | View raw


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

Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

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

csiph-web