Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: =?UTF-8?Q?J=c3=b6rg_Buchholz?= Newsgroups: comp.graphics.apps.gnuplot Subject: Re: plotting 2 files with 2 different datafile separators Date: Thu, 11 Jun 2020 07:11:22 +0200 Organization: A noiseless patient Spider Lines: 34 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Thu, 11 Jun 2020 05:11:19 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="ab090448d6e126b69430b67afbfdb132"; logging-data="7991"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19aEfpxapFdpay4OFhDwuizLqxHV5pWPp0=" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 Cancel-Lock: sha1:t30RahLZHFV538IrY9ow82DgiK0= In-Reply-To: Content-Language: en-GB Xref: csiph.com comp.graphics.apps.gnuplot:4352 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