X-Received: by 2002:a6b:e503:: with SMTP id y3-v6mr3743644ioc.32.1537959047064; Wed, 26 Sep 2018 03:50:47 -0700 (PDT) X-Received: by 2002:a9d:798a:: with SMTP id h10-v6mr79531otm.4.1537959046927; Wed, 26 Sep 2018 03:50:46 -0700 (PDT) Path: csiph.com!xmission!news.snarked.org!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!j6-v6no65926ith.0!news-out.google.com!z5-v6ni72ite.0!nntp.google.com!x188-v6no65055ite.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.graphics.apps.gnuplot Date: Wed, 26 Sep 2018 03:50:46 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=88.151.157.78; posting-account=c7EUmQoAAAAw8hXP5LHJuxidZPywl80a NNTP-Posting-Host: 88.151.157.78 References: <675230bb-3b05-4325-8020-ed5ec323b7ac@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <3e19b2f8-d693-47f8-9471-6ae589eeab98@googlegroups.com> Subject: Re: Rescale axis after smooth From: NeilB Injection-Date: Wed, 26 Sep 2018 10:50:47 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Lines: 41 Xref: csiph.com comp.graphics.apps.gnuplot:4048 On Wednesday, September 26, 2018 at 11:33:27 AM UTC+1, Karl Ratzsch wrote: > Am 26.09.2018 um 11:56 schrieb NeilB: >=20 > >=20 > > I get a nice smoothed CPU graph but the y axis maximum is set to the ma= x of the csv data i.e. 854 so the curve is very low in the plot. I want to = set the y axis maximum to be the max of the smoothed data and have tried us= ing the MIN/MAX variables and replot i.e: > >=20 > > plot "temp.csv" u 1:2 smooth sbezier lw 2 title 'cpu' > > set yr [GPVAL_DATA_Y_MIN:GPVAL_DATA_Y_MAX] > > replot > >=20 > > ....but got the same result. > >=20 >=20 > There is no gnuplot status variable which returns the max value of the > smoothed data. GPVAL_DATA_ always contains the max values from the input > file. >=20 > I would do the following, first plotting to an inline named datablock, > and then plotting that again. >=20 > set table $sdat > plot datafile smooth sbezier > unset table >=20 > plot $sdat >=20 > The named datablock vanishes when you close gnuplot, so you don't have > to clean up temporary files afterwards. >=20 > You'll have to change the datafile separator in between, because gnuplot > tabular output is always space separated. >=20 >=20 >=20 > Best, Karl Thank you very much - I'll give it a spin. Neil