Gnuplot line types

Until version 4.6 The dash type of a linestyle is given by the linetype, which does also select the line color unless you explicitely set an other one with linecolor. However, the support for dashed lines depends on the selected terminal: Some terminals don’t support dashed lines, like png (uses libgd) Other terminals, like pngcairo, … Read more

How do I plot list of tuples in Python?

If I get your question correctly, you could do something like this. >>> import matplotlib.pyplot as plt >>> testList =[(0, 6.0705199999997801e-08), (1, 2.1015700100300739e-08), (2, 7.6280656623374823e-09), (3, 5.7348209304555086e-09), (4, 3.6812203579604238e-09), (5, 4.1572516753310418e-09)] >>> from math import log >>> testList2 = [(elem1, log(elem2)) for elem1, elem2 in testList] >>> testList2 [(0, -16.617236475334405), (1, -17.67799605473062), (2, -18.691431541177973), (3, … Read more

gnuplot : plotting data from multiple input files in a single graph

You’re so close! Change plot “print_1012720” using 1:2 title “Flow 1”, \ plot “print_1058167” using 1:2 title “Flow 2”, \ plot “print_193548” using 1:2 title “Flow 3”, \ plot “print_401125” using 1:2 title “Flow 4”, \ plot “print_401275” using 1:2 title “Flow 5”, \ plot “print_401276” using 1:2 title “Flow 6” to plot “print_1012720” using … Read more

Loop structure inside gnuplot?

There sure is (in gnuplot 4.4+): plot for [i=1:1000] ‘data’.i.’.txt’ using 1:2 title ‘Flow ‘.i The variable i can be interpreted as a variable or a string, so you could do something like plot for [i=1:1000] ‘data’.i.’.txt’ using 1:($2+i) title ‘Flow ‘.i if you want to have lines offset from each other. Type help iteration … Read more

How to pass command line argument to gnuplot?

You can input variables via switch -e $ gnuplot -e “filename=”foo.data”” foo.plg In foo.plg you can then use that variable $ cat foo.plg plot filename pause -1 To make “foo.plg” a bit more generic, use a conditional: if (!exists(“filename”)) filename=”default.dat” plot filename pause -1 Note that -e has to precede the filename otherwise the file … Read more