pipe plot data to gnuplot script

If you are on a Unix system (i.e. not Windows) you can use ‘<cat’ instead of ‘-‘ to read from stdin: plot ‘<cat’ using … Then you can do cat data.txt | gnuplot script.gp. However, in the specific case you mention in your question, with the plot in the for loop, you read the input … Read more

Gnuplot x-axis resolution

If you want to increase the resolution try set samples <X> where <X> is an integer. Per default this integer is set to 100. Increase that number to your needs. Though, the higher the integer is chosen the longer it will take gnuplot to plot the graph.

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.

Gnuplot date/time in x axis

Gnuplot doesn’t actually expect time data to be in quotes, so you have to tell it: set timefmt ‘”%Y-%m-%d %H:%M:%S”‘ You can put the double quotes inside single quotes as I did here, or escape the quotes: set timefmt “\”%Y-%m-%d %H:%M:%S\”” the same applies to your xrange specification: set xrange [‘”2013-07-21 16:00″‘:'”2013-07-22 16:00″‘] If you … Read more

gnuplot legend overlaps graph

If you want to turn it off altogether: gnuplot> set nokey If you want to move the legend, you can do this with gnuplot> set key left top to move it to the top left. If you want to give the lines more meaningful names in the legend, use the title keyword when generating the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)