Gnuplot tips: Difference between revisions

From Octave
Jump to navigation Jump to search
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
When using the X11 server's default settings, Gnuplot's X11 terminal does not support different linestyles.  Thus, all line plots have solid line types, independent of the "linestyle" specified.
== Enable "linestyle" functionality for Gnuplot's x11 terminal ==
To enable support for the various linestyles, add the lines below to your {{Codeline|~/.Xdefaults}}.


<code>
When using the X11 server's default settings, Gnuplot's X11 terminal does not support different linestyles.  Thus, all line plots have solid line types, independent of the <code>"linestyle"</code> specified.
! gnuplot settings
To enable support for the various linestyles, add the lines below to your {{Path|~/.Xdefaults}}.
gnuplot*dashed: on
 
gnuplot*borderDashes:  0
  ! gnuplot settings
gnuplot*axisDashes:    16
  gnuplot*dashed: on
gnuplot*line1Dashes:    0
  gnuplot*borderDashes:  0
gnuplot*line2Dashes:  42
  gnuplot*axisDashes:    16
gnuplot*line3Dashes:  13
  gnuplot*line1Dashes:    0
gnuplot*line4Dashes:  44
  gnuplot*line2Dashes:  42
gnuplot*line5Dashes:  15
  gnuplot*line3Dashes:  13
gnuplot*line6Dashes: 4441
  gnuplot*line4Dashes:  44
gnuplot*line7Dashes:  42
  gnuplot*line5Dashes:  15
gnuplot*line8Dashes:  13
  gnuplot*line6Dashes: 4441
</code>
  gnuplot*line7Dashes:  42
  gnuplot*line8Dashes:  13
 
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 {{Path|~/.profile}} for example.
 
 
== Enable UTF-8 text support for Gnuplot's x11 terminal ==
 
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 {{Path|~/.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.
To enable these settings, type the following command at the shell prompt.


<code>
  xrdb -merge .Xdefaults
xrdb -merge .Xdefaults
</code>


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


[[Category:Plotting tutorials]]
[[Category:Tips and tricks]]

Latest revision as of 05:02, 10 October 2020

Enable "linestyle" functionality for Gnuplot's x11 terminal[edit]

When using the X11 server's default settings, Gnuplot's X11 terminal does not support different linestyles. Thus, all line plots have solid line types, independent of the "linestyle" specified. To enable support for the various linestyles, add the lines below to your ~/.Xdefaults.

 ! gnuplot settings
 gnuplot*dashed: on
 gnuplot*borderDashes:   0
 gnuplot*axisDashes:    16
 gnuplot*line1Dashes:    0
 gnuplot*line2Dashes:   42
 gnuplot*line3Dashes:   13
 gnuplot*line4Dashes:   44
 gnuplot*line5Dashes:   15
 gnuplot*line6Dashes: 4441
 gnuplot*line7Dashes:   42
 gnuplot*line8Dashes:   13

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.


Enable UTF-8 text support for Gnuplot's x11 terminal[edit]

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.