problematic Moire pattern in image produced with gnuplot pm3d and pdf output

This is not supposed to be a solution, but rather an explanation and a possible, although ugly workaround. From time to time there are reports to the gnuplot mailinglists about this issue, but it seems to be related to the viewers. It has to do with the way gnuplot creates the surfaces plots. These are … Read more

Gnuplot plotting data from a file up to some row

It appears that the “every” command in gnuplot is what you’re looking for: plot “filename.txt” every ::1000::2000 using 1:2 with lines Alternatively, pre-process your file to select the rows in which you are interested. For example, using awk: awk “NR>=1000 && NR<=2000″ filename.txt > processed.txt Then use the resulting “processed.txt” in your existing gnuplot command/script.

How to make points one color when a third column equals zero, and another color otherwise, in Gnuplot?

This is probably close to what you want: set palette model RGB defined ( 0 ‘red’, 1 ‘green’ ) plot[0:5][0:6] “file.dat” u 1:2:( $3 == 0 ? 0 : 1 ) with points palette You could go one step further and remove the “noise”: unset key unset colorbox plot[0:5][0:6] “file.dat” u 1:2:( $3 == 0 … 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

Removing blank gap in gnuplot multiplot

Getting the margins right with multiplot is a bit tedious, especially when using set pm3d map, which has quite large margins. Since version 5.0 Since 5.0 version,multiplot has the options margins and spacing. margins takes four numbers set multiplot margins <left>,<right>,<bottom>,<top>, which give the fixed overall margins around the multiplot layout. spacing takes two number … Read more

Line plot in GnuPlot where line color is a third column in my data file?

This following works for me (gnuplot 4.4) plot “./file.dat” u 1:2:3 with lines palette Hope this helps. When I ran your code gnuplot couldn’t pass the “rgb” part. For an example of using the variable tag see the similar question: GNUPLOT: dot plot with data depending dot size with the useful examples found here: http://gnuplot.sourceforge.net/demo/pointsize.html … Read more

3d GNUPLOT Animation With Multiple Graphs

I needed to switch it to all within one splot command like so: # define fixed axis-ranges # filename and n=number of lines of your data filedata=”Sun_t_v_state.dat” filedata2 = ‘Mercury_v_state.dat’ filedata3 = ‘Venus_t_v_state.dat’ filedata4 = ‘Earth_t_v_state.dat’ filedata5 = ‘Mars_t_v_state.dat’ filedata6 = ‘Jupiter_t_v_state.dat’ filedata7 = ‘Saturn_t_v_state.dat’ filedata8 = ‘Uranus_t_v_state.dat’ filedata9 = ‘Neptune_t_v_state.dat’ filedata10 = ‘Pluto_t_v_state.dat’ n … 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