Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #3723
| Newsgroups | comp.graphics.apps.gnuplot |
|---|---|
| Date | 2017-08-22 08:08 -0700 |
| Message-ID | <15f57c17-f08d-48d3-824a-854ecd0ef05e@googlegroups.com> (permalink) |
| Subject | Filter timeformat by month |
| From | Raoul Abrutat <raoul.abrutat@bigpond.com> |
[gnuplot 5.1 patchlevel 0 last modified 2017-02-24, win 32 XP sp3]
How can one “filter” data - by month - given the timeformat in column (1) of the annual time series?:
"%d/%m/%Y"
# Plot the datum in column 2 against the datum in column 3,
# only if the datum in column 1 is January, February, ..., December
#
set multiplot layout 4, 3
set datafile separator comma
do for [n = 1 : 12 :1] {
plot [5:25] [0:360] 'datafile.dat' using (column(2)) : ((column(1))==n ? (column(3)) : NaN) with points
}
unset multiplot
datafile.dat:
01/01/2010, 19.9, 137
01/01/2010, 19.8, 134
01/02/2010, 9.7, 130
01/02/2010, 9.6, 130
01/03/2010, 14.8, 69
01/03/2010, 15.2, 69
01/04/2010, 18.0, 90
01/04/2010, 17.1, 95
01/05/2010, 7.4, 34
01/05/2010, 7.5, 35
01/06/2010, 11.8, 247
01/06/2010, 11.7, 246
01/07/2010, 11.5, 111
01/07/2010, 11.1, 112
01/08/2010, 7.0, 113
01/08/2010, 7.0, 106
01/09/2010, 13.4, 94
01/09/2010, 14.1, 94
01/10/2010, 14.0, 69
01/10/2010, 14.1, 71
01/11/2010, 15.8, 46
Back to comp.graphics.apps.gnuplot | Previous | Next — Next in thread | Find similar
Filter timeformat by month Raoul Abrutat <raoul.abrutat@bigpond.com> - 2017-08-22 08:08 -0700
Re: Filter timeformat by month Karl Ratzsch <mail.kfr@gmx.net> - 2017-08-22 19:25 +0200
Re: Filter timeformat by month Raoul Abrutat <raoul.abrutat@bigpond.com> - 2017-08-23 08:02 -0700
csiph-web