Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set a line style as default for multiple plots in Gnuplot?

Tags:

gnuplot

I would like to create plot using gnuplot. The line width should be 3 in all plots. If I do it for one plot only this is done by:

set style line 1 linewidth 3

Is there any way how to do it globally as default?

like image 387
Tomas Avatar asked Feb 17 '13 17:02

Tomas


People also ask

Does gnuplot support multiple Y axes on a single plot?

5.9 Does gnuplot support multiple y-axes on a single plot? Yes.

What is LC in gnuplot?

[New in 4.2] In gnuplot-4.2, we can specify lt (line type) and lc (line color) separately.

How do I save a plot in gnuplot?

There are two ways to save your work in gnuplot: you can save the gnuplot commands used to generate a plot, so that you can regenerate the plot at a later time. Or you can export the graph to a file in a standard graphics file format, so that you can print it or include it in web pages, documents, or presentations.

What is gnuplot command?

Gnuplot is a free, command-driven, interactive, function and data plotting program. Pre-compiled executeables and source code for Gnuplot 4.2. 4 may be downloaded for OS X, Windows, OS2, DOS, and Linux. The enhancements provided by version 4.2 are described here.


1 Answers

You can specify

set terminal <terminal> linewidth 3

This will change the default linewidth for all lines in the plot, including the plot borders.

If that's not what you want, you can specify all the lines in a loop (gnuplot 4.6+), where n is the number of lines you are plotting:

do for [i=1:n] {
    set style line i linewidth 3
}
like image 184
andyras Avatar answered Sep 21 '22 04:09

andyras