|
From: tmacchant <tma...@ya...> - 2016-09-11 07:31:14
|
Use sort command but not gnuplot. Tatsuro -- View this message in context: http://gnuplot.10905.n7.nabble.com/Sorting-tp20351p20352.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |
|
From: Tatsuro M. <tma...@ya...> - 2016-09-11 13:47:43
|
--- tmacchant wrote: > Use sort command but not gnuplot. > > Tatsuro Search on web browser by keywords "gnuplot sort". If you cannot get good solution, ask again with showing what you really want to do using gnuplot. Tatsuro |
|
From: Tatsuro M. <tma...@ya...> - 2016-09-11 21:33:07
|
The original question was made in the Nabble but has not been approved yet. Here I write it. ********************* Hi I am new in gnuplot. I have a file as follows: 1 11 2 12 3 13 4 14 5 15 and I want to sort it like : 5 15 4 14 3 13 2 12 1 11 I appreciate any help **************** Tatsuro --- Tatsuro MATSUOKA wrote: > --- tmacchant wrote: > > Use sort command but not gnuplot. > > > > Tatsuro > > Search on web browser by keywords "gnuplot sort". If you cannot get good solution, ask again with showing what you really want to do using gnuplot. > > Tatsuro > |
|
From: Cédric O. <ced...@un...> - 2016-09-12 07:55:37
|
Hello, The following link http://folk.uio.no/hpl/scripting/doc/gnuplot/Kawano/datafile3-e.html shows how to use unix commands like sort within gnuplot. For your example, you can also use the 'tac' command instead of 'sort'. 'tac' reverses the content of a file (cat <-> tac). CO Le 11/09/2016 à 23:32, Tatsuro MATSUOKA a écrit : > The original question was made in the Nabble but has not been approved yet. > > Here I write it. > ********************* > Hi > I am new in gnuplot. I have a file as follows: > 1 11 > 2 12 > 3 13 > 4 14 > 5 15 > and I want to sort it like : > 5 15 > 4 14 > 3 13 > 2 12 > 1 11 > I appreciate any help > **************** > > Tatsuro > > --- Tatsuro MATSUOKA wrote: >> --- tmacchant wrote: >>> Use sort command but not gnuplot. >>> >>> Tatsuro >> Search on web browser by keywords "gnuplot sort". If you cannot get good solution, ask again with showing what you really want to do using gnuplot. >> >> Tatsuro >> > ------------------------------------------------------------------------------ > _______________________________________________ > gnuplot-info mailing list > gnu...@li... > Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info > -- -------------- 02 98 49 86 04 |
|
From: tmacchant <tma...@ya...> - 2016-09-14 06:59:14
|
This post has NOT been accepted by the mailing list yet. This post was updated on Sep 13, 2016; 1:37am. *********************************************************** Thank y'all for your responses. Let me clear my question. Lets say I have this file: -0.00512366 0.0156186 -0.00510697 0.0154651 -0.00509028 0.015312 -0.00507359 0.0151593 -0.0050569 0.0150072 -0.00504021 0.0148556 And I want to move my last row to the top of my data file and so on. so I could have : -0.00504021 0.0148556 -0.0050569 0.0150072 -0.00507359 0.0151593 -0.00509028 0.015312 -0.00510697 0.0154651 -0.00512366 0.0156186 I know that I could use "set xrange [* : *] reverse" command to do that when I am plotting it but I want to save the change in my data file. Thank you ******************************************************************************* set xrange [* : *] reverse set table 'data.txt' plot (datafilename) unset table But this add 'i' to the third column. See the output the below command or gnuplot manual [1] gnuplot> help table [1] http://gnuplot.sourceforge.net/docs_5.0/gnuplot.pdf Tatsuro -- View this message in context: http://gnuplot.10905.n7.nabble.com/Sorting-tp20351p20358.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |
|
From: Tatsuro M. <tma...@ya...> - 2016-09-14 07:17:11
|
----- Original Message ----- > From: tmacchant > To: gnuplot-info> Cc: > Date: 2016/9/14, Wed 14:39 > Subject: Re: [Gnuplot-info] Sorting > > This post has NOT been accepted by the mailing list yet. > This post was updated on Sep 13, 2016; 1:37am. > *********************************************************** > Thank y'all for your responses. Let me clear my question. Lets say I have > this file: > > -0.00512366 0.0156186 > -0.00510697 0.0154651 > -0.00509028 0.015312 > -0.00507359 0.0151593 > -0.0050569 0.0150072 > -0.00504021 0.0148556 > > And I want to move my last row to the top of my data file and so on. so I > could have : > > -0.00504021 0.0148556 > -0.0050569 0.0150072 > -0.00507359 0.0151593 > -0.00509028 0.015312 > -0.00510697 0.0154651 > -0.00512366 0.0156186 > > I know that I could use "set xrange [* : *] reverse" command to do > that when > I am plotting it but I want to save the change in my data file. > > Thank you > ******************************************************************************* > > set xrange [* : *] reverse > set table 'data.txt' > plot (datafilename) > unset table > > But this add 'i' to the third column. > > See the output the below command or gnuplot manual [1] > gnuplot> help table > > [1] http://gnuplot.sourceforge.net/docs_5.0/gnuplot.pdf > > Tatsuro Sorry the above does not make sense. Tatsuro |
|
From: Tatsuro M. <tma...@ya...> - 2016-09-14 08:30:33
|
----- Original Message ----- > From: Tatsuro MATSUOKA > To: tmacchant3; gnuplot-info > Cc: > Date: 2016/9/14, Wed 16:17 > Subject: Re: [Gnuplot-info] Sorting > > ----- Original Message ----- > >> From: tmacchant >> To: gnuplot-info> Cc: >> Date: 2016/9/14, Wed 14:39 >> Subject: Re: [Gnuplot-info] Sorting >> >> This post has NOT been accepted by the mailing list yet. >> This post was updated on Sep 13, 2016; 1:37am. >> *********************************************************** >> Thank y'all for your responses. Let me clear my question. Lets say I > have >> this file: >> >> -0.00512366 0.0156186 >> -0.00510697 0.0154651 >> -0.00509028 0.015312 >> -0.00507359 0.0151593 >> -0.0050569 0.0150072 >> -0.00504021 0.0148556 >> >> And I want to move my last row to the top of my data file and so on. so I >> could have : >> >> -0.00504021 0.0148556 >> -0.0050569 0.0150072 >> -0.00507359 0.0151593 >> -0.00509028 0.015312 >> -0.00510697 0.0154651 >> -0.00512366 0.0156186 >> >> I know that I could use "set xrange [* : *] reverse" command to > do >> that when >> I am plotting it but I want to save the change in my data file. >> >> Thank you >> > ******************************************************************************* >> >> set xrange [* : *] reverse >> set table 'data.txt' >> plot (datafilename) >> unset table >> >> But this add 'i' to the third column. >> >> See the output the below command or gnuplot manual [1] >> gnuplot> help table >> >> [1] http://gnuplot.sourceforge.net/docs_5.0/gnuplot.pdf >> >> Tatsuro > > Sorry the above does not make sense. > > Tatsuro Keep in mind that gnuplot is a plotting software and is not indented for data processing. There is limitation of data processing facility of gnuplot. In your case, as some people wrote, sort command is useful tool. Tatsuro |
|
From: Peter S. <p.s...@me...> - 2016-09-27 06:11:59
|
Hi Tatsuro Here are a range of options outside of gnuplot in a linux/unix/BSD shell that should work: http://stackoverflow.com/questions/742466/how-can-i-reverse-the-order-of-lines-in-a-file you can call a shell command from within gnuplot to do that if necessary. Read the manual for how to do that. Peter -----Ursprüngliche Nachricht----- Von: Tatsuro MATSUOKA [mailto:tma...@ya...] Gesendet: Mittwoch, 14. September 2016 10:30 An: tma...@ya...; gnu...@li... Betreff: Re: [Gnuplot-info] Sorting ----- Original Message ----- > From: Tatsuro MATSUOKA > To: tmacchant3; gnuplot-info > Cc: > Date: 2016/9/14, Wed 16:17 > Subject: Re: [Gnuplot-info] Sorting > > ----- Original Message ----- > >> From: tmacchant >> To: gnuplot-info> Cc: >> Date: 2016/9/14, Wed 14:39 >> Subject: Re: [Gnuplot-info] Sorting >> >> This post has NOT been accepted by the mailing list yet. >> This post was updated on Sep 13, 2016; 1:37am. >> *********************************************************** >> Thank y'all for your responses. Let me clear my question. Lets say I > have >> this file: >> >> -0.00512366 0.0156186 >> -0.00510697 0.0154651 >> -0.00509028 0.015312 >> -0.00507359 0.0151593 >> -0.0050569 0.0150072 >> -0.00504021 0.0148556 >> >> And I want to move my last row to the top of my data file and so on. >> so I could have : >> >> -0.00504021 0.0148556 >> -0.0050569 0.0150072 >> -0.00507359 0.0151593 >> -0.00509028 0.015312 >> -0.00510697 0.0154651 >> -0.00512366 0.0156186 >> >> I know that I could use "set xrange [* : *] reverse" command to > do >> that when >> I am plotting it but I want to save the change in my data file. >> >> Thank you >> > ********************************************************************** > ********* >> >> set xrange [* : *] reverse >> set table 'data.txt' >> plot (datafilename) >> unset table >> >> But this add 'i' to the third column. >> >> See the output the below command or gnuplot manual [1] gnuplot> >> help table >> >> [1] http://gnuplot.sourceforge.net/docs_5.0/gnuplot.pdf >> >> Tatsuro > > Sorry the above does not make sense. > > Tatsuro Keep in mind that gnuplot is a plotting software and is not indented for data processing. There is limitation of data processing facility of gnuplot. In your case, as some people wrote, sort command is useful tool. Tatsuro ------------------------------------------------------------------------------ _______________________________________________ gnuplot-info mailing list gnu...@li... Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info |
|
From: Stephen W. <ste...@in...> - 2016-09-11 12:15:44
|
Please the question in your response. Thanks, ----- Original Message ----- > From: "tmacchant" <tma...@ya...> > To: gnu...@li... > Sent: Sunday, September 11, 2016 8:11:35 AM > Subject: Re: [Gnuplot-info] Sorting > > Use sort command but not gnuplot. > > Tatsuro > > > > -- > View this message in context: > http://gnuplot.10905.n7.nabble.com/Sorting-tp20351p20352.html > Sent from the Gnuplot - User mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > _______________________________________________ > gnuplot-info mailing list > gnu...@li... > Membership management via: > https://lists.sourceforge.net/lists/listinfo/gnuplot-info > |