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: Rescale axis after smooth Date: Wed, 26 Sep 2018 12:33:25 +0200 Organization: solani.org Lines: 34 Message-ID: References: <675230bb-3b05-4325-8020-ed5ec323b7ac@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: solani.org 1537958006 27884 127.0.0.43 (26 Sep 2018 10:33:26 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Wed, 26 Sep 2018 10:33:26 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 X-User-ID: eJwFwYEBwCAIA7CXBtgi5zAr/59ggqDx5CK4MBiZQjc+tZdPzvxT+yYPwgqppqnk1hmuffgALqwRcA== Content-Language: de-DE-1901 Cancel-Lock: sha1:/D2X9RYZ+s7359OphmYjzmp6H4U= In-Reply-To: <675230bb-3b05-4325-8020-ed5ec323b7ac@googlegroups.com> Xref: csiph.com comp.graphics.apps.gnuplot:4047 Am 26.09.2018 um 11:56 schrieb NeilB: > > I get a nice smoothed CPU graph but the y axis maximum is set to the max 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 using the MIN/MAX variables and replot i.e: > > plot "temp.csv" u 1:2 smooth sbezier lw 2 title 'cpu' > set yr [GPVAL_DATA_Y_MIN:GPVAL_DATA_Y_MAX] > replot > > ....but got the same result. > 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. I would do the following, first plotting to an inline named datablock, and then plotting that again. set table $sdat plot datafile smooth sbezier unset table plot $sdat The named datablock vanishes when you close gnuplot, so you don't have to clean up temporary files afterwards. You'll have to change the datafile separator in between, because gnuplot tabular output is always space separated. Best, Karl