Some days ago I decided that it was about time I put some errorbars on the experimental values in my graphs (this is something that is pretty important in physics, and should be in all subjects that handle measured data) so I calculated my standard deviation from some fits I made and used them as my errors.
Now to plot them. Hmmm .. how do I do that?
Well, if you have a datafile called "data" and in it you have 3 columns, the first column representing the x-axis, the second column the data (the y-axis) and the 3 column the +/- error values on the data values in the second column then you just give the command
plot "data" using 1:2:3 with yerrorbars
and you get the data values with the errorbars set correctly.
Except it didn't really plot well for me. The lines that made up the errorbars were dashed in stead of solid when I printed them out into a eps file and if I wanted to have different colors, if they were all red like the default is then there was no problem, but having one data set green and another blue and a function that was supposed to be compared to the data as red, then I had problems.
I wondered a lot about that, tried several other plotting utilities (gees those graphical utilities are bad ... not intuitive at all I think) and went no where. I asked the nice people on the news group comp.graphics.apps.gnuplot and there I was just told to either use the candlesticks mode or define the color by using the linetype option.
So I tried and tried with no luck.
Until finally I came across one sentence there that said in plain text to my question about why the error bars were dashed
That would be because your terminal setting has patterned linetypes (no "solid" option to the postscript driver)
and then it continued on to answer some more questions so this part did not register with me by some reason the first time I read this.
It seems that the default of gnuplot is to set the dash option with the postscript driver when you issue
set terminal postscript eps
So to get a solid line with your error bars in your eps files you have to issue
set terminal postscript eps solid
Took me quite a time to figure this little thing out but should have taken me a lot less time if I had read better what was written to me in that post :-)
Lesson of the day, read what is written for you :-)