Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #3260
| From | Joe <joe@invalid.invalid> |
|---|---|
| Newsgroups | comp.graphics.apps.gnuplot |
| Subject | Histograms series overlap |
| Date | 2016-03-16 15:21 +0000 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <ncbtlu$14fm$1@gioia.aioe.org> (permalink) |
I have following data files (eg. two files one for each serie).
I'm referring to hourly measure records from two stations.
St1.dat
------------------------
2015/03/16 00:00 10
2015/03/16 01:00 25
2015/03/16 02:00 15
------------------------
St2.dat
------------------------
2015/03/16 00:00 5
2015/03/16 01:00 30
2015/03/16 02:00 20
------------------------
I just want one plot with above two series.
X axis will report first colum (date and time)
Y axis second comlumn (measured value)
For each hour I want a "box" with the low part filled with
color of station that reports lower value. And upper part
filled with colour of station that reports higher value.
Let's say we assign color "blu" to Station-1 and "red" to
station-2.
. First hour station1_value > station2_value (10 > 5)
So my box will be "red" in the lower part from 0 to 5 and
"blu" in the upper one, from 5 to 10.
. Second hour station1_value < station2_value (25 < 30)
So my box will be "blu" in the lower part from 0 to 25 and
"red" in the upper one, from 25 to 30.
. Third hour station1_value < station2_value (15 < 20)
So my box will be "blu" in the lower part from 0 to 15 and
"red" in the upper one, from 15 to 20.
Can I obtain a plot like that?
In my tries I noticed an issue: first data series is overlapped
by the last data series I try to plot...
1) First attempt
plot \
'st1.dat' using 1:3 w boxes lc rgb '#0000aa' title 'st. 1' ,\
'st2.dat' using 1:3 w boxes lc rgb '#aa0000' title 'st. 2'
In this case "station 2" is placed in foreground and is plotted over
"station 1" graph. So that I cant see station1 values relative to 2nd
and 3rd hour, because those values are less than 2nd and 3rd hour
"station 2" value.
2) Second attempt
plot \
'st2.dat' using 1:3 w boxes lc rgb '#aa0000' title 'st. 2' ,\
'st1.dat' using 1:3 w boxes lc rgb '#0000aa' title 'st. 1'
The opposite as explained above.. In this case, when station1 data
values are grater than station2 ones, the latter are hidden..
Can I obtain a plot like I've explained above?
Thanks in advance, hope my question is clear enough...
Back to comp.graphics.apps.gnuplot | Previous | Next — Next in thread | Find similar
Histograms series overlap Joe <joe@invalid.invalid> - 2016-03-16 15:21 +0000
Re: Histograms series overlap Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2016-03-16 17:02 +0100
Re: Histograms series overlap Joe <joe@invalid.invalid> - 2016-03-16 17:52 +0000
csiph-web