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

ytics with thousand separator

1,271 views
Skip to first unread message

jack

unread,
Jul 9, 2010, 10:10:41 AM7/9/10
to
Hi all,

it is possible to have ytics printed with thousand separator?

Thanks :)

sfeam

unread,
Jul 9, 2010, 10:47:56 AM7/9/10
to
jack wrote:

> Hi all,
>
> it is possible to have ytics printed with thousand separator?

If your local glibc and LC_NUMERIC locale settings support it.


gnuplot> set decimal locale
decimal_sign in locale is .
gnuplot> show locale

gnuplot LC_CTYPE en_US.UTF-8
gnuplot encoding default
gnuplot LC_TIME en_US.UTF-8
gnuplot LC_NUMERIC en_US.UTF-8

gnuplot> print sprintf("%'g",12345.678)
12,345.7
gnuplot> set format y "%'g"

jack

unread,
Jul 9, 2010, 11:02:40 AM7/9/10
to

it works wery well...tanks a lot :)

Badraig

unread,
Jul 24, 2010, 5:30:47 PM7/24/10
to

Does not work for me. I have

gnuplot> show locale

gnuplot LC_CTYPE C
gnuplot encoding default
gnuplot LC_TIME C
gnuplot LC_NUMERIC C

gnuplot> print sprintf("%'g",12345.678)

12345.7

Is there any way for me to fix this? Thanks!

Hans-Bernhard Bröker

unread,
Jul 24, 2010, 6:09:21 PM7/24/10
to
On 24.07.2010 23:30, wrote Badraig:

> gnuplot> show locale
>
> gnuplot LC_CTYPE C
> gnuplot encoding default
> gnuplot LC_TIME C
> gnuplot LC_NUMERIC C

That means your locale is set to the international default, called "C"
in this context. Among other things that implies '.' as the decimal
separator.

> Is there any way for me to fix this? Thanks!

Read the fine manual. What does it say about 'set decimalsign locale',
and about its optional argument?

0 new messages