|
From: horatiu <cl...@ya...> - 2006-08-04 03:59:12
|
Hi there. I just started to use Gnuplot. I read some tutorials and I understand a little how it works. But in real world it's more complicated. I want to plot some data gives by a machine. The data that I have has a format like this (5 columns separated by comma) , .5,-1.3016, 0, 0 , 1,-1.3006, 0, 0 , 1.5,-1.2996, 0, 0 , 2,-1.2986, 0, 0 , 2.5,-1.2976, 0, 0 , 3,-1.2966, 0, 0 , 3.5,-1.2956, 0, 0 , 4,-1.2946, 0, 0 , 4.5,-1.2936, 0, 0 the first column is empty and the second contains data like .5 it means 0.5. set datafile separator "," plot "CV.dat" index 2:3 but it gives me error How can I plot X=column 3 vs Y=column 4 ? Thanx a lot -- View this message in context: http://www.nabble.com/plot-data-tf2049191.html#a5644384 Sent from the Gnuplot - User forum at Nabble.com. |
|
From: <br...@ph...> - 2006-08-04 17:33:03
|
horatiu wrote: > set datafile separator "," > plot "CV.dat" index 2:3 You almost certainly don't want to use the "index" option here. Read the docs again, especially "help plot datafile" and "help using", which the former points to. > but it gives me error And what error might that be? |
|
From: horatiu <cl...@ya...> - 2006-08-07 06:11:01
|
I succeeded my firs =E2=80=9Cserious=E2=80=9D graph with gnuplot, but I'm = far from what I really want. I still don't understand how to use =E2=80=9Cset data separato= r=E2=80=9D command. Like I said my data comes like this: , 191,-.92, .133333333333333,-6900 , 191.5,-.919066666666667, .133333333333333,-6893 , 192,-.918, .133333333333333,-6885 , 192.5,-.917066666666667, .133333333333333,-6878 , 193,-.916133333333333, 6.66666666666667E-02,-13742 , 193.5,-.915066666666667, .133333333333333,-6863 , 194,-.914066666666667, .2,-4570.33333333333 I tried: set datafile separator "," plot "CV2.dat" using 2:3 the graph isn't good =E2=80=93 the shape is far from reality I succeeded by replacing =E2=80=9C,=E2=80=9D with 2 blanks, but I prefer to= don't modify the datafile. Thanks --=20 View this message in context: http://www.nabble.com/plot-data-tf2049191.htm= l#a5679958 Sent from the Gnuplot - User forum at Nabble.com. |
|
From: Tammo H. <Tam...@ie...> - 2006-08-07 11:16:54
|
> I succeeded my firs "serious" graph with gnuplot, but I'm far from what= I > really want. I still don't understand how to use "set data separator" > command. Like I said my data comes like this: > > , 191,-.92, .133333333333333,-6900 > , 191.5,-.919066666666667, .133333333333333,-6893 > , 192,-.918, .133333333333333,-6885 > , 192.5,-.917066666666667, .133333333333333,-6878 > , 193,-.916133333333333, 6.66666666666667E-02,-13742 > , 193.5,-.915066666666667, .133333333333333,-6863 > , 194,-.914066666666667, .2,-4570.33333333333 > > I tried: > > set datafile separator "," > plot "CV2.dat" using 2:3 > > the graph isn't good - the shape is far from reality You will need to be more specific in what is wrong with it? Does gnuplot p= lot the data correctly? Maybe you should post the core of your plotfile. > I succeeded by replacing "," with 2 blanks, but I prefer to don't modify= the > datafile. > Thanks -- Tammo Heeren, Ph.D mailto: Tam...@ie... |
|
From: <br...@ph...> - 2006-08-07 19:44:18
|
horatiu wrote: > I succeeded my firs =E2=80=9Cserious=E2=80=9D graph with gnuplot, = but I'm far from what I > really want. I still don't understand how to use =E2=80=9Cset data = separator=E2=80=9D > command. Like I said my data comes like this: >=20 > , 191,-.92, .133333333333333,-6900 The fact that there's a non-existing firs column may disrupt things= =20 here. gnuplot wouldn't consider a leading blank an indicator that= =20 there's an empty first column. I think it was meant to do so for= =20 non-blank separators, but in case of doubt, that's one of the things = I'd=20 be wary of. > the graph isn't good =E2=80=93 the shape is far from reality Please do be more specific. What *is* the shape, and what is "realit= y",=20 and what's different between those? |
|
From: Stein <hr....@ho...> - 2006-08-18 10:52:48
|
plot '<sed "s/,/0 /g" yourdatafile' using 2:3 w l horatiu wrote: > > (5 columns separated by comma) > > , .5,-1.3016, 0, 0 > , 1,-1.3006, 0, 0 > , 1.5,-1.2996, 0, 0 > , 2,-1.2986, 0, 0 > , 2.5,-1.2976, 0, 0 > , 3,-1.2966, 0, 0 > , 3.5,-1.2956, 0, 0 > , 4,-1.2946, 0, 0 > , 4.5,-1.2936, 0, 0 > > Thanx a lot > -- View this message in context: http://www.nabble.com/plot-data-tf2049191.html#a5867579 Sent from the Gnuplot - User forum at Nabble.com. |