Changing the language used for labels [new]

The most recent version of gnuplot provides several new internationalization features. If you are plotting date/time data and set the format to display the month abbreviation rather than the number of the month, gnuplot can use the abbreviations appropriate to any language installed on your system. The following figure repeats the previous plot using month abbreviations and the Spanish language:

Changing the language used for labels [new]

Note that the month names are not capitalized, which is the convention in Spanish.

How to do it…

In the following script, the addition of one line translates our plot to Spanish:

set xdata time
set locale "es_ES.utf8" ...

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.