Gnuplot tips: Difference between revisions

From Octave
Jump to navigation Jump to search
m (Siko1056 moved page Enable "linestyle" functionality for Gnuplot's x11 terminal to Gnuplot tips: Two pages, little content, better to have them merged.)
(Some formatting.)
Line 1: Line 1:
== Enable "linestyle" functionality for Gnuplot's x11 terminal ==
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.
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.
To enable support for the various linestyles, add the lines below to your {{Path|~/.Xdefaults}}.
To enable support for the various linestyles, add the lines below to your {{Path|~/.Xdefaults}}.


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


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>
  xrdb -merge .Xdefaults
xrdb -merge .Xdefaults
</syntaxhighlight>


To avoid having to type this command repeatedly, the command may be placed in your shell script resource file {{Path|~/.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:Tutorials]]
[[Category:Tutorials]]

Revision as of 22:01, 13 June 2019

Enable "linestyle" functionality for Gnuplot's x11 terminal

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.