Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #4046
| Newsgroups | comp.graphics.apps.gnuplot |
|---|---|
| Date | 2018-09-26 02:56 -0700 |
| Message-ID | <675230bb-3b05-4325-8020-ed5ec323b7ac@googlegroups.com> (permalink) |
| Subject | Rescale axis after smooth |
| From | NeilB <neil@moogsoft.com> |
Hi there, I'm having problems rescaling an axis with smoothed data. My csv data is a capture of cpu usage for a process and its generally quite low numbers but with occasional very large spikes e.g: Time,CPU 0,3 1,5 2,4 3,8 4,5 5,10 6,2 7,5 8,10 9,854 10,12 11,4 12,5 13,8 14,7 15,10 16,5 17,7 18,153 19,3 20,6 If I plot this using: set datafile separator "," set terminal png size 1000,500 set title "CPU vs Time" set ylabel "CPU (%)" set xlabel "Time (s)" set key outside; set key right center; set grid plot "temp.csv" u 1:2 smooth sbezier lw 2 title 'cpu' 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: set datafile separator "," set terminal png size 1000,500 set title "CPU vs Time" set ylabel "CPU (%)" set xlabel "Time (s)" set key outside; set key right center; set grid 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. Is this doable? Can anyone help? many thanks, Neil
Back to comp.graphics.apps.gnuplot | Previous | Next — Next in thread | Find similar
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