Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #4352

Re: plotting 2 files with 2 different datafile separators

From Jörg Buchholz <bookwood4new@freenet.de>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: plotting 2 files with 2 different datafile separators
Date 2020-06-11 07:11 +0200
Organization A noiseless patient Spider
Message-ID <rbsedn$7pn$1@dont-email.me> (permalink)
References <alpine.WNT.2.21.999.2006101302220.10568@dhcp3-6> <rbqi5n$eui$1@dont-email.me> <alpine.WNT.2.21.999.2006101536390.10568@dhcp3-6>

Show all headers | View raw


On 10.06.2020 15:43, Jean-Pierre Coulon wrote:
> On Wed, 10 Jun 2020, Jörg Buchholz wrote:
> 
>> Here the default "whitespace" works with both separators (Tabulator and
>> Space).
>>
>> set datafile separator whitespace
> 
> In my second file I have: set timefmt "%d/%m/%Y %H:%M:%S" and now when I
> plot the second file using 1:2 gnuplot believes the hour field is my
> second column. Same with 1:3.
> 
> I know how to workaround with multiplot but I thought it could be simpler.
> 

There will be more than one solution. My solution is, bring both files
to the same separator. With "sytem" you can do it from inside gnuplot.


system "sed -i 's/\ /\t/g' sep_space.dat"
set datafile separator "\t"
plot 'sep_tab.dat' u 1:2 w lp, 'sep_space.dat' u 1:2 w lp



This "sed -i 's/\ /\t/g' sep_space.dat" convert the space into a
tabulator, in the file "sep_space.dat".

Jörg




Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

plotting 2 files with 2 different datafile separators Jean-Pierre Coulon <coulon@cacas.pam.obs-nice.fr> - 2020-06-10 13:07 +0200
  Re: plotting 2 files with 2 different datafile separators Olaf Schultz <o.schultz@enhydralutris.de> - 2020-06-10 13:55 +0200
  Re: plotting 2 files with 2 different datafile separators Jörg Buchholz <bookwood4new@freenet.de> - 2020-06-10 14:03 +0200
    Re: plotting 2 files with 2 different datafile separators Jean-Pierre Coulon <coulon@cacas.pam.obs-nice.fr> - 2020-06-10 15:43 +0200
      Re: plotting 2 files with 2 different datafile separators Jörg Buchholz <bookwood4new@freenet.de> - 2020-06-11 07:11 +0200
        Re: plotting 2 files with 2 different datafile separators Jean-Pierre Coulon <coulon@cacas.pam.obs-nice.fr> - 2020-06-11 08:21 +0200
          Re: plotting 2 files with 2 different datafile separators Olaf Schultz <o.schultz@enhydralutris.de> - 2020-06-11 09:18 +0200
            Re: plotting 2 files with 2 different datafile separators Jörg Buchholz <bookwood4new@freenet.de> - 2020-06-11 11:37 +0200
      Re: plotting 2 files with 2 different datafile separators Karl Ratzsch <mail.kfr@gmx.net> - 2020-06-11 21:24 +0200
        Re: plotting 2 files with 2 different datafile separators Jörg Buchholz <bookwood4new@freenet.de> - 2020-06-13 20:59 +0200

csiph-web