Path: csiph.com!weretis.net!feeder4.news.weretis.net!feeder5.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Karl Ratzsch Newsgroups: comp.graphics.apps.gnuplot Subject: Re: can I fit two columns when I use timefmt Date: Wed, 25 Oct 2017 09:18:27 +0200 Organization: solani.org Lines: 35 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: solani.org 1508915905 11105 eJwVwokRwDAIA7CVSM0TxqGA9x+hV50MfrxD3VyNxvaUE8quTc68+KOvxCpGJm/CwK0Gn7L8ADF6Ecw= (25 Oct 2017 07:18:25 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Wed, 25 Oct 2017 07:18:25 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 In-Reply-To: X-NNTP-Posting-Host: eJwNxMEBwCAIA8CVEAjoOIhk/xHaexwsVnR6IBwEx/xqEhv1zlT+iQRMcRWPTja21GrOaR//ACN2EZw= X-User-ID: eJwNxskBwDAIA7CVoBhDxmk49h+h1UtuVFaATvj6PvNfksX7UtFHkQ4LK90Lyda5gT3wjjkrHwWPEII= Content-Language: en-GB Cancel-Lock: sha1:RJVpnnGTsOkZXM/vZ2fr+DgvYkg= Xref: csiph.com comp.graphics.apps.gnuplot:3803 Am 25.10.2017 um 08:10 schrieb Jean-Pierre Coulon: > On Tue, 24 Oct 2017, Karl Ratzsch wrote: > >> You have a datafile with columns t, p(t), q(t), right? > > My datafile contains these columns: 1: time in seconds, integer 2: > time in %y%m%d_%Hh%Mm%Ss format 3: p(t) 4: q(t) I am happy with my > plots using 2:3 or 2:4 with timefmt = this format. And I am able to > select an xrange by putting my 2 limits in this format in the set > xrange statement. > Ah. That's imo not what you initially described (see your first post). Nevermind. >> Now what does model(x) describe? > > p(t) = a*q(t) + b > > and it works if I say fit model(x) datafile using 4:3 via a b. > > How can I limit the range to the last two thirds of my datafile? My > columns 3 and 4 are not monotonic. So you want to correlate columns 3 and 4, but limit the range according to column 1 (or 2) ? Got it. You can fit model(x) dataf us 3:($1end?NaN:$4) via a,b , that just reads in NaN for any line where $1 is out of range. You might use "stats" to set the range limiters. Karl