Using European-style decimals [new]

Another new internationalization feature in gnuplot 4.4 is the ability to set the character used for the decimal point to be correct for the locale in use. In most European countries the comma is used, whereas in the U.S. the period is conventional.

How to do it…

The following script produces the graph that follows it:

set decimalsign locale "es_ES.utf8"
plot [0:1] x**3
How to do it…

Note that the periods used for decimal points that we've seen in all the examples until now have become commas, because gnuplot knows that that is the convention when using the Spanish language.

How it works…

The new command set decimalsign selects the ...

Get gnuplot Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.