14.10.2014 Views

gnuplot documentation

gnuplot documentation

gnuplot documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

70 SET-SHOW <strong>gnuplot</strong> 4.3 133<br />

plot f1(x), f2(x), f3(x), f4(x)<br />

should plot functions f1, f2, f4 in your 3 newly defined line styles. If a user-defined line style is not found<br />

then the corresponding default linetype is used instead. E.g. in the example above, f3(x) will be plotted<br />

using the default linetype 3.<br />

70.59.6 Set style line<br />

Each terminal has a default set of line and point types, which can be seen by using the command test.<br />

set style line defines a set of line types and widths and point types and sizes so that you can refer to<br />

them later by an index instead of repeating all the information at each invocation.<br />

Syntax:<br />

set style line default<br />

set style line {{linetype<br />

unset style line<br />

show style line<br />

| lt} | }<br />

{{linecolor | lc} }<br />

{{linewidth | lw} }<br />

{{pointtype | pt} }<br />

{{pointsize | ps} }<br />

{palette}<br />

If default is given all line style parameters are set to their default values.<br />

If the linestyle already exists, only the given parameters are changed while all others are<br />

preserved. If not, all undefined values are set to the default values.<br />

The line and point types are taken from the default types for the terminal currently in use. The line<br />

width and point size are multipliers for the default width and size (but note that here is<br />

unaffected by the multiplier given on set pointsize).<br />

The defaults for the line and point types is the index. The defaults for the width and size are both unity.<br />

Linestyles created by this mechanism do not replace the default linetype styles; both may be used. If<br />

you want plots to use the defined styles in preference to the default linetypes, please see set style<br />

increment (p. 132).<br />

Not all terminals support the linewidth and pointsize features; if not supported, the option will be<br />

ignored.<br />

Terminal-independent colors may be assigned using either linecolor or linetype<br />

, abbreviated lc or lt. This requires giving a RGB color triple, a known palette color<br />

name, a fractional index into the current palette, or a constant value from the current mapping of the<br />

palette onto cbrange. See colors (p. 31), colorspec (p. 32), set palette (p. 122), colornames<br />

(p. 126), cbrange (p. 149).<br />

set style line linetype will set both a terminal-dependent dot/dash pattern and color. The<br />

commandsset style line linecolor or set style line linetype <br />

will set a new line color while leaving the existing dot-dash pattern unchanged.<br />

In 3d mode (splot command), the special keyword palette is allowed as a shorthand for "linetype<br />

palette z". The color value corresponds to the z-value (elevation) of the splot, and varies smoothly along<br />

a line or surface.<br />

Examples: Suppose that the default lines for indices 1, 2, and 3 are red, green, and blue, respectively,<br />

and the default point shapes for the same indices are a square, a cross, and a triangle, respectively. Then<br />

set style line 1 lt 2 lw 2 pt 3 ps 0.5<br />

defines a new linestyle that is green and twice the default width and a new pointstyle that is a half-sized<br />

triangle. The commands<br />

set style function lines<br />

plot f(x) lt 3, g(x) ls 1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!