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


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

Re: Rescale axis after smooth

Newsgroups comp.graphics.apps.gnuplot
Date 2018-09-26 03:50 -0700
References <675230bb-3b05-4325-8020-ed5ec323b7ac@googlegroups.com> <pofn9m$r7c$1@solani.org>
Message-ID <3e19b2f8-d693-47f8-9471-6ae589eeab98@googlegroups.com> (permalink)
Subject Re: Rescale axis after smooth
From NeilB <neil@moogsoft.com>

Show all headers | View raw


On Wednesday, September 26, 2018 at 11:33:27 AM UTC+1, Karl Ratzsch wrote:
> 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

Thank you very much - I'll give it a spin.

Neil

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


Thread

Rescale axis after smooth NeilB <neil@moogsoft.com> - 2018-09-26 02:56 -0700
  Re: Rescale axis after smooth Karl Ratzsch <mail.kfr@gmx.net> - 2018-09-26 12:33 +0200
    Re: Rescale axis after smooth NeilB <neil@moogsoft.com> - 2018-09-26 03:50 -0700

csiph-web