Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

tilde on a symbol

2,149 views
Skip to first unread message

Bart Vandewoestyne

unread,
Nov 21, 2007, 7:21:35 AM11/21/07
to
Using gnuplot 4.2 patchlevel 0 on Linux, I am trying to create an
N with a tilde on it. I tried it with

set xlabel '~N{.6\~}'

But there seems to be something weird happening... If i try the
above in the following simple example:

set terminal postscript eps enhanced
set xlabel '~N{.6\~}'
set out "N_tilde.eps"
plot (x)

Then the N with tht tilde just doesn't seem to be appear in the
resulting .eps file. The N_tilde.eps that I get is online at

http://users.telenet.be/vandewoestyne/bart/N_tilde.eps

Notice there is no xlabel :-(

What am I doing wrong?

Thanks,
Bart

--
"Share what you know. Learn what you don't."

Bart Vandewoestyne

unread,
Nov 21, 2007, 7:42:47 AM11/21/07
to
On 2007-11-21, Bart Vandewoestyne <MyFirstName...@telenet.be> wrote:
> Using gnuplot 4.2 patchlevel 0 on Linux, I am trying to create an
> N with a tilde on it. I tried it with
>
> set xlabel '~N{.6\~}'
>
> But there seems to be something weird happening... If i try the
> above in the following simple example:
>
> set terminal postscript eps enhanced
> set xlabel '~N{.6\~}'
> set out "N_tilde.eps"
> plot (x)
>
> Then the N with tht tilde just doesn't seem to be appear in the
> resulting .eps file. The N_tilde.eps that I get is online at
>
> http://users.telenet.be/vandewoestyne/bart/N_tilde.eps
>
> Notice there is no xlabel :-(

I've just tested this with gnuplot 4.2 patchlevel 2 but the
problem is still there.

Is this a bug or am I doing something wrong?

Bart Vandewoestyne

unread,
Nov 21, 2007, 7:52:06 AM11/21/07
to
On 2007-11-21, Bart Vandewoestyne <MyFirstName...@telenet.be> wrote:
> Using gnuplot 4.2 patchlevel 0 on Linux, I am trying to create an
> N with a tilde on it. I tried it with
>
> set xlabel '~N{.6\~}'

Apparently, the first (leftmost) tilde in the above command is
causing the trouble. If I do

set xlabel 'NA'

then this works.

If I do

set xlabel '~NA'

Then I don't get an xlabel anymore.

How to overcome this?

Peter Weilbacher

unread,
Nov 21, 2007, 8:40:39 AM11/21/07
to
On 21.11.2007 13:52, Bart Vandewoestyne wrote:
> On 2007-11-21, Bart Vandewoestyne <MyFirstName...@telenet.be> wrote:
>> Using gnuplot 4.2 patchlevel 0 on Linux, I am trying to create an
>> N with a tilde on it. I tried it with
>>
>> set xlabel '~N{.6\~}'
>
> Apparently, the first (leftmost) tilde in the above command is
> causing the trouble. If I do

Obviously, the tilde cannot be used as a diacritic in this way. Don't know
why not.
But instead you can look up the character you want in an encoding table,
such as iso8859-1, and then use its octal number to specify it in
gnuplot. Like this

set encoding iso_8859_1
set xlabel '\321{.6\~}'

I guess it's easier if you can directly enter one of the gnuplot-supported
encodings in your terminal/editor.

Cheers,
Peter.

Ethan Merritt

unread,
Nov 21, 2007, 11:27:25 AM11/21/07
to
In article <jpV0j.217930$Op5.12...@phobos.telenet-ops.be>,

Bart Vandewoestyne <MyFirstName...@telenet.be> wrote:
>Using gnuplot 4.2 patchlevel 0 on Linux, I am trying to create an
>N with a tilde on it. I tried it with
>
>set xlabel '~N{.6\~}'
>
>But there seems to be something weird happening... If i try the
>above in the following simple example:
>
>set terminal postscript eps enhanced
>set xlabel '~N{.6\~}'
>set out "N_tilde.eps"
>plot (x)
>
>Then the N with tht tilde just doesn't seem to be appear in the
>resulting .eps file. The N_tilde.eps that I get is online at
>
>http://users.telenet.be/vandewoestyne/bart/N_tilde.eps
>
>Notice there is no xlabel :-(

Yes there is. However, you don't see it because the margin at the
bottom of the plot is too small. If you view your *.eps file
without clipping to the bounding box then you will see it.

I'm not sure why this particular character sequence causes the
program to mis-estimate the size of the required margin.
But several trivial fixes are available.

Here are two options:
set bmargin 3 (explicitly reserve space under the plot)
set xlabel ' ~N{.6\~}' (extra space before the tilde)

Also note that Ñ (capital N + tilde) is available as a normal
character in Latin1 encoding and many other encodings. It is
unicode code point 0x00D1.
--
Ethan A Merritt

Bart Vandewoestyne

unread,
Nov 21, 2007, 11:30:55 AM11/21/07
to
On 2007-11-21, Ethan Merritt <mer...@u.washington.edu> wrote:
>
> Yes there is. However, you don't see it because the margin at the
> bottom of the plot is too small. If you view your *.eps file
> without clipping to the bounding box then you will see it.
>
> I'm not sure why this particular character sequence causes the
> program to mis-estimate the size of the required margin.
> But several trivial fixes are available.
>
> Here are two options:
> set bmargin 3 (explicitly reserve space under the plot)
> set xlabel ' ~N{.6\~}' (extra space before the tilde)

Thanks! I like the trick with the extra space the most :-)

Regards,

0 new messages