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 correct decimal separator for the locale specified. We can also select any symbol here explicitly. If we would like a vertical bar to stand in for the decimal point, for example, we can say set decimalsign "|". These customizations only affect the output on the graph.

Tip

Changing the decimalsign does not change what gnuplot will be expecting when it reads your input data.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.16.76.237