|
From: Jon <dev...@gm...> - 2009-02-05 02:36:13
|
I have a data file organized as the following d channel ... k = 1 0.34 0.89 0.99 0.23 0.67 0.02 0.65 0.99 0.45 k=2 0.45 0.78 0.99 0.23 0.78 0.86 0.12 0.43 0.23 ... m channel ... k=1 ... I need to skip the first 3 lines then splot the first set of data forming 3 by 3 matrix, and then skip a line, splot the second set of data forming 3 by 3 matrix again ... How can I do that? If I use splot 'file' ev 4:6 matrix , then it complains that Matrix does not represent a grid, Can anybody explain where the above command goes wrong? Thank you very much!! |
|
From: bsmile <dev...@gm...> - 2009-02-06 02:05:23
|
Please help! Thanks, bsmile wrote: > > I have a data file organized as the following > > d channel ... > > k = 1 > 0.34 0.89 0.99 > 0.23 0.67 0.02 > 0.65 0.99 0.45 > k=2 > 0.45 0.78 0.99 > 0.23 0.78 0.86 > 0.12 0.43 0.23 > ... > > m channel ... > > k=1 > ... > > I need to skip the first 3 lines then splot the first set of data forming > 3 > by 3 matrix, and then skip a line, splot the second set of data forming 3 > by > 3 matrix again ... How can I do that? > > If I use splot 'file' ev 4:6 matrix , then it complains that > Matrix does not represent a grid, > > Can anybody explain where the above command goes wrong? > > Thank you very much!! > > ------------------------------------------------------------------------------ > Create and Deploy Rich Internet Apps outside the browser with > Adobe(R)AIR(TM) > software. With Adobe AIR, Ajax developers can use existing skills and code > to > build responsive, highly engaging applications that combine the power of > local > resources and data with the reach of the web. Download the Adobe AIR SDK > and > Ajax docs to start building applications > today-http://p.sf.net/sfu/adobe-com > _______________________________________________ > Gnuplot-info mailing list > Gnu...@li... > https://lists.sourceforge.net/lists/listinfo/gnuplot-info > > -- View this message in context: http://www.nabble.com/special-plot-need----splot-matrix-from-not-that-regularly-organized-data-file-tp21844277p21865036.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |
|
From: Thomas S. <t.s...@fz...> - 2009-02-06 14:40:38
|
turn all non-data lines into comments by adding a '#' in front
and plot with
splot 'file' matrix ind 0 w l, '' matrix ind 1 w l, ...
otherwise, you need gnuplot 4.3-cvs.
the first plot goes into a table:
set table
set out 'table'
splot 'file' every 2:1:1:1:3:1, '' every 2:1:5:1:8:1, ...
set out
see 'help every', the 1st block ('d channel') in your
data file is empty, the 2nd contains the data from 'k=1'
to 'k=whatever', the 3rd ('m channel') is empty, the
4th contains data, that's why we take every 2nd
block.
inside one block data lines are selected from 1 to 3,
5 to 8, a.s.o.
and this table is then read in again:
set xrange [0:2]
splot 'table' matrix ind 0, '' matrix ind 1, ...
the warnings are due to the 'i' at the end of each data line
in 'table'.
bsmile wrote:
>
> I have a data file organized as the following
>
> d channel ...
>
> k = 1
> 0.34 0.89 0.99
> 0.23 0.67 0.02
> 0.65 0.99 0.45
> k=2
> 0.45 0.78 0.99
> 0.23 0.78 0.86
> 0.12 0.43 0.23
> ...
>
> m channel ...
>
> k=1
> ...
>
> I need to skip the first 3 lines then splot the first set of data forming
> 3
> by 3 matrix, and then skip a line, splot the second set of data forming 3
> by
> 3 matrix again ... How can I do that?
>
> If I use splot 'file' ev 4:6 matrix , then it complains that
> Matrix does not represent a grid,
>
> Can anybody explain where the above command goes wrong?
>
> Thank you very much!!
>
> ------------------------------------------------------------------------------
> Create and Deploy Rich Internet Apps outside the browser with
> Adobe(R)AIR(TM)
> software. With Adobe AIR, Ajax developers can use existing skills and code
> to
> build responsive, highly engaging applications that combine the power of
> local
> resources and data with the reach of the web. Download the Adobe AIR SDK
> and
> Ajax docs to start building applications
> today-http://p.sf.net/sfu/adobe-com
> _______________________________________________
> Gnuplot-info mailing list
> Gnu...@li...
> https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>
>
--
View this message in context: http://www.nabble.com/special-plot-need----splot-matrix-from-not-that-regularly-organized-data-file-tp21844277p21873706.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
|
|
From: Jon <dev...@gm...> - 2009-02-06 17:04:30
|
Thanks all for your great help, the modification into comments is trivial
and I will do that!
So actually the problem boils down to how gnuplot see a data file. In my
naive imagination, it recognizes line separators(if there exists this in
linux), and thus it could count how many lines it is instructed to read in
and how the readin data should be organized and displayed. Following this
logic, it seems to me not a big problem to splot continuously the data file
I presented. But it does not work out as I expected, can anybody clarify
this for me?
On Fri, Feb 6, 2009 at 9:40 AM, Thomas Sefzick <t.s...@fz...>wrote:
>
> turn all non-data lines into comments by adding a '#' in front
> and plot with
>
> splot 'file' matrix ind 0 w l, '' matrix ind 1 w l, ...
>
>
> otherwise, you need gnuplot 4.3-cvs.
> the first plot goes into a table:
>
> set table
> set out 'table'
> splot 'file' every 2:1:1:1:3:1, '' every 2:1:5:1:8:1, ...
> set out
>
> see 'help every', the 1st block ('d channel') in your
> data file is empty, the 2nd contains the data from 'k=1'
> to 'k=whatever', the 3rd ('m channel') is empty, the
> 4th contains data, that's why we take every 2nd
> block.
> inside one block data lines are selected from 1 to 3,
> 5 to 8, a.s.o.
>
> and this table is then read in again:
>
> set xrange [0:2]
> splot 'table' matrix ind 0, '' matrix ind 1, ...
>
> the warnings are due to the 'i' at the end of each data line
> in 'table'.
>
>
> bsmile wrote:
> >
> > I have a data file organized as the following
> >
> > d channel ...
> >
> > k = 1
> > 0.34 0.89 0.99
> > 0.23 0.67 0.02
> > 0.65 0.99 0.45
> > k=2
> > 0.45 0.78 0.99
> > 0.23 0.78 0.86
> > 0.12 0.43 0.23
> > ...
> >
> > m channel ...
> >
> > k=1
> > ...
> >
> > I need to skip the first 3 lines then splot the first set of data forming
> > 3
> > by 3 matrix, and then skip a line, splot the second set of data forming 3
> > by
> > 3 matrix again ... How can I do that?
> >
> > If I use splot 'file' ev 4:6 matrix , then it complains that
> > Matrix does not represent a grid,
> >
> > Can anybody explain where the above command goes wrong?
> >
> > Thank you very much!!
> >
> >
> ------------------------------------------------------------------------------
> > Create and Deploy Rich Internet Apps outside the browser with
> > Adobe(R)AIR(TM)
> > software. With Adobe AIR, Ajax developers can use existing skills and
> code
> > to
> > build responsive, highly engaging applications that combine the power of
> > local
> > resources and data with the reach of the web. Download the Adobe AIR SDK
> > and
> > Ajax docs to start building applications
> > today-http://p.sf.net/sfu/adobe-com
> > _______________________________________________
> > Gnuplot-info mailing list
> > Gnu...@li...
> > https://lists.sourceforge.net/lists/listinfo/gnuplot-info
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/special-plot-need----splot-matrix-from-not-that-regularly-organized-data-file-tp21844277p21873706.html
> Sent from the Gnuplot - User mailing list archive at Nabble.com.
>
>
>
> ------------------------------------------------------------------------------
> Create and Deploy Rich Internet Apps outside the browser with
> Adobe(R)AIR(TM)
> software. With Adobe AIR, Ajax developers can use existing skills and code
> to
> build responsive, highly engaging applications that combine the power of
> local
> resources and data with the reach of the web. Download the Adobe AIR SDK
> and
> Ajax docs to start building applications today-
> http://p.sf.net/sfu/adobe-com
> _______________________________________________
> Gnuplot-info mailing list
> Gnu...@li...
> https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>
|
|
From: Thomas S. <t.s...@fz...> - 2009-02-09 08:33:39
|
if you would do a normal 'splot', selection of data section using 'every'
would work, but with 'matrix' gnuplot tries to figure out what the
dimensions
of the matrix are, and there it fails due to those non-data lines (e.g. 'k =
1').
bsmile wrote:
>
> Thanks all for your great help, the modification into comments is trivial
> and I will do that!
>
> So actually the problem boils down to how gnuplot see a data file. In my
> naive imagination, it recognizes line separators(if there exists this in
> linux), and thus it could count how many lines it is instructed to read in
> and how the readin data should be organized and displayed. Following this
> logic, it seems to me not a big problem to splot continuously the data
> file
> I presented. But it does not work out as I expected, can anybody clarify
> this for me?
>
>
> On Fri, Feb 6, 2009 at 9:40 AM, Thomas Sefzick
> <t.s...@fz...>wrote:
>
>>
>> turn all non-data lines into comments by adding a '#' in front
>> and plot with
>>
>> splot 'file' matrix ind 0 w l, '' matrix ind 1 w l, ...
>>
>>
>> otherwise, you need gnuplot 4.3-cvs.
>> the first plot goes into a table:
>>
>> set table
>> set out 'table'
>> splot 'file' every 2:1:1:1:3:1, '' every 2:1:5:1:8:1, ...
>> set out
>>
>> see 'help every', the 1st block ('d channel') in your
>> data file is empty, the 2nd contains the data from 'k=1'
>> to 'k=whatever', the 3rd ('m channel') is empty, the
>> 4th contains data, that's why we take every 2nd
>> block.
>> inside one block data lines are selected from 1 to 3,
>> 5 to 8, a.s.o.
>>
>> and this table is then read in again:
>>
>> set xrange [0:2]
>> splot 'table' matrix ind 0, '' matrix ind 1, ...
>>
>> the warnings are due to the 'i' at the end of each data line
>> in 'table'.
>>
>>
>> bsmile wrote:
>> >
>> > I have a data file organized as the following
>> >
>> > d channel ...
>> >
>> > k = 1
>> > 0.34 0.89 0.99
>> > 0.23 0.67 0.02
>> > 0.65 0.99 0.45
>> > k=2
>> > 0.45 0.78 0.99
>> > 0.23 0.78 0.86
>> > 0.12 0.43 0.23
>> > ...
>> >
>> > m channel ...
>> >
>> > k=1
>> > ...
>> >
>> > I need to skip the first 3 lines then splot the first set of data
>> forming
>> > 3
>> > by 3 matrix, and then skip a line, splot the second set of data forming
>> 3
>> > by
>> > 3 matrix again ... How can I do that?
>> >
>> > If I use splot 'file' ev 4:6 matrix , then it complains that
>> > Matrix does not represent a grid,
>> >
>> > Can anybody explain where the above command goes wrong?
>> >
>> > Thank you very much!!
>> >
>> >
>> ------------------------------------------------------------------------------
>> > Create and Deploy Rich Internet Apps outside the browser with
>> > Adobe(R)AIR(TM)
>> > software. With Adobe AIR, Ajax developers can use existing skills and
>> code
>> > to
>> > build responsive, highly engaging applications that combine the power
>> of
>> > local
>> > resources and data with the reach of the web. Download the Adobe AIR
>> SDK
>> > and
>> > Ajax docs to start building applications
>> > today-http://p.sf.net/sfu/adobe-com
>> > _______________________________________________
>> > Gnuplot-info mailing list
>> > Gnu...@li...
>> > https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/special-plot-need----splot-matrix-from-not-that-regularly-organized-data-file-tp21844277p21873706.html
>> Sent from the Gnuplot - User mailing list archive at Nabble.com.
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Create and Deploy Rich Internet Apps outside the browser with
>> Adobe(R)AIR(TM)
>> software. With Adobe AIR, Ajax developers can use existing skills and
>> code
>> to
>> build responsive, highly engaging applications that combine the power of
>> local
>> resources and data with the reach of the web. Download the Adobe AIR SDK
>> and
>> Ajax docs to start building applications today-
>> http://p.sf.net/sfu/adobe-com
>> _______________________________________________
>> Gnuplot-info mailing list
>> Gnu...@li...
>> https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>>
>
> ------------------------------------------------------------------------------
> Create and Deploy Rich Internet Apps outside the browser with
> Adobe(R)AIR(TM)
> software. With Adobe AIR, Ajax developers can use existing skills and code
> to
> build responsive, highly engaging applications that combine the power of
> local
> resources and data with the reach of the web. Download the Adobe AIR SDK
> and
> Ajax docs to start building applications
> today-http://p.sf.net/sfu/adobe-com
> _______________________________________________
> Gnuplot-info mailing list
> Gnu...@li...
> https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>
>
--
View this message in context: http://www.nabble.com/special-plot-need----splot-matrix-from-not-that-regularly-organized-data-file-tp21844277p21908774.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
|