Difference between revisions of "Enable UTF-8 text support for Gnuplot's x11 terminal"

From Octave
Jump to navigation Jump to search
Line 2: Line 2:
 
To enable support for UTF-8, add the lines below to your {{Path|~/.Xdefaults}}.
 
To enable support for UTF-8, add the lines below to your {{Path|~/.Xdefaults}}.
  
<syntaxhighlight>
+
<syntaxhighlight lang="text">
 
  ! gnuplot settings
 
  ! gnuplot settings
 
  gnuplot*font: mbfont:-misc-fixed-medium-r-normal-*-*-*-100-100-*-*-iso10646-*
 
  gnuplot*font: mbfont:-misc-fixed-medium-r-normal-*-*-*-100-100-*-*-iso10646-*
Line 10: Line 10:
 
To enable these settings, type the following command at the shell prompt.
 
To enable these settings, type the following command at the shell prompt.
  
<syntaxhighlight>
+
<syntaxhighlight lang="text">
 
  xrdb -merge .Xdefaults
 
  xrdb -merge .Xdefaults
 
</syntaxhighlight>
 
</syntaxhighlight>

Revision as of 13:57, 13 June 2019

By default, Gnuplot's X11 terminal does not support UTF-8 characters when displaying text labels or setting plot titles. To enable support for UTF-8, add the lines below to your ~/.Xdefaults.

 ! gnuplot settings
 gnuplot*font: mbfont:-misc-fixed-medium-r-normal-*-*-*-100-100-*-*-iso10646-*
 gnuplot*encoding: utf-8

To enable these settings, type the following command at the shell prompt.

 xrdb -merge .Xdefaults

To avoid having to type this command repeatedly, the command may be placed in your shell script resource file, ~/.profile for example.