|
From: Lars H. <la...@ho...> - 2006-11-14 11:08:56
|
On Tuesday November 14h, 2006, 04:04 doug bull wrote: > I have a data file that contains data separated by blank > lines as in the following "file": > > 1 2.2 > 2 2.4 > > 1 2.3 > 2 2.4 > > I do > > plot 'file' u 1:2 w l > > and all works well, except that the lines are the same > color. How do I get the lines to have > different symbols or different colors? I assume that you already know how to use the keyword "with" to choose your desired line and point style. gnuplot uses blank lines in datafiles as seperators between different datasets: _One_ blank line makes gnuplot "think" that there is only one datum missing. That's why gnuplot gives all points of your dataset the same line and color. One blank line seperates data blocks. But you may give every datablock its own characteristics by using the keyword every: plot 'file' every :1::1::1 with lines For more information use: help every _Two_ blank lines seperate datasets. gnuplot plots them as if they were split into different files, so every dataset gets its own line color and point symbol. The keyword to navigate through these datasets is "index" plot 'file' index 1:3:1 with lines index and every may be combined. For more information see: help index Hope that helps Lars |