GNUplot - plot data file (simple X and Y columns) - setting suitable color and scale on a figure

Viewed 20097

I have a simple file with two columns:

1 0.005467
2 0.005333
3 0.005467
4 0.005467
5 0.005600
6 0.005600
7 0.005467
8 0.005467

In the first column I have the x-axis values, while on the second column I have y-axis values. I would like to plot a figure of this data. I wrote a gnuplot script for this:

#!/usr/bin/gnuplot

set xlabel "test"
set ylabel "value"
set grid ytics lt 0 lw 1 lc rgb "#bbbbbb"
set grid xtics lt 0 lw 1 lc rgb "#bbbbbb"
set autoscale
set terminal postscript portrait enhanced mono dashed lw 1 'Helvetica' 14
set style line 1 lt 1 lw 3 pt 3 linecolor rgb "red"
set output 'out.eps'
plot 'data.txt' using 2:1 w points title "tests"

And, the output:

enter image description here

But of course, as a newbie in gnuplot, I have some troubles:

  1. How to change the crosses on the fingure into dots?
  2. How to change the color of the dots, to let's say, red? ( my command in my gnuplotscript seems not to work at all ...)
  3. For the first test the adequate, accurate, exact value is 0.005467 but on my figure it doesnt look like so... I would like to place the dot on my figure for the first, second, third, (so on) test on the exact place, where is appropriate value.
  4. How to add a grid to my figure? - SOLVED
  5. How to get rid of the ugly text: 'data.txt' using 1:2 and replace it with a legend? - SOLVED

EDIT (SOLVED ISSUE NO 5)

plot 'data.txt' using 1:2 w points title "tests"

EDIT (SOLVED ISSUE NO 4)

set grid ytics lt 0 lw 1 lc rgb "#bbbbbb"
set grid xtics lt 0 lw 1 lc rgb "#bbbbbb"
1 Answers
Related