|
From: Kevin O. <rko...@gm...> - 2016-01-02 05:23:06
|
I am baffled by a failure I am having in attempting to generate a series of plots on a single image. The inputs are from stdin. I get only the first and last of the five plots, although the titles for all five are shown. No errors reported. I have recorded the stream sent to gnuplot and can see no problems, though I suspect I am missing a simpler way to do it. set term gif small size 800, 600 set grid xtics ytics;set xdata time set colors classic set timefmt "%H:%M";set xrange ["00:00":"23:45"] set title "Temperature" set format x "%H:%M" set output "/usr/local/www/data/rain.gif" set ylabel "Degrees Fahrenheit" plot "-" using 1:2 title "2016-01-01" with lines, "-" using 1:3 title "2015-12-31" with lines, "-" using 1:4 title "2015-12-30" with lists, "-" using 1:5 title "2015-12-29" with lists, "-" using 1:6 title "2015-12-28" with lists All lines are newline terminated and this is immediately followed by the data with the data for each plot. It's actually the same data five time with a different column used each time. Here is the final few lines of the 96 lines. 21:00 14.3 16.5 15.8 12.8 11.6 21:15 14.1 16.6 15.6 12.5 11.8 21:30 14.1 16.5 15.8 12.2 11.4 21:45 13.8 16.3 15.9 12.1 11.2 22:00 13.9 16.4 16.0 12.0 11.5 22:15 13.7 16.5 15.8 11.7 11.6 22:30 13.7 16.4 15.7 11.5 11.6 22:45 13.5 16.4 15.8 11.4 11.2 23:00 13.5 16.2 15.6 11.6 11.2 23:15 13.5 16.3 15.5 11.6 11.1 23:30 13.5 16.3 15.7 11.7 10.7 23:45 13.3 16.2 15.5 11.7 10.5 e 00:00 13.5 16.3 15.3 11.8 10.5 I m doing it this way because in some cases I include a date along with the time and it change for each plot. I can handle this with a simple substitution if the data array much more efficiently than I could re-write a file. Can anyone point out what I am doing wrong? -- Kevin Oberman, Part time kid herder and retired Network Engineer E-mail: rko...@gm... PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683 |
|
From: Thomas S. <t.s...@fz...> - 2016-01-02 10:23:32
|
Kevin Oberman <rkoberman <at> gmail.com> writes: > > I am baffled by a failure I am having in attempting to generate a series of > plots on a single image. The inputs are from stdin. I get only the first > and last of the five plots, although the titles for all five are shown. No > errors reported. > > I have recorded the stream sent to gnuplot and can see no problems, though > I suspect I am missing a simpler way to do it. > ... > plot "-" using 1:2 title "2016-01-01" with lines, "-" using 1:3 title > "2015-12-31" with lines, "-" using 1:4 title "2015-12-30" with lists, "-" > using 1:5 title "2015-12-29" with lists, "-" using 1:6 title "2015-12-28" > with lists > ... i would suspect that the 1st and the 2nd plot are working, the others cant't due to a syntax error. change "with lists" to "with lines" in the plot command. |
|
From: Kevin O. <rko...@gm...> - 2016-01-02 18:48:36
|
On Sat, Jan 2, 2016 at 2:23 AM, Thomas Sefzick <t.s...@fz...> wrote: > Kevin Oberman <rkoberman <at> gmail.com> writes: > > > > I am baffled by a failure I am having in attempting to generate a series > of > > plots on a single image. The inputs are from stdin. I get only the first > > and last of the five plots, although the titles for all five are shown. > No > > errors reported. > > > > I have recorded the stream sent to gnuplot and can see no problems, > though > > I suspect I am missing a simpler way to do it. > > ... > > plot "-" using 1:2 title "2016-01-01" with lines, "-" using 1:3 title > > "2015-12-31" with lines, "-" using 1:4 title "2015-12-30" with lists, "-" > > using 1:5 title "2015-12-29" with lists, "-" using 1:6 title "2015-12-28" > > with lists > > ... > > i would suspect that the 1st and the 2nd plot are working, > the others cant't due to a syntax error. > > change "with lists" to "with lines" in the plot command. > Thomas, Thanks so much for taking time to point out my really dumb error. Unfortunately, it was a cut and paste/editing error and was not in the actual raw capture. All three plots were actually "with lines". Since the full stream is rather long (almost 500 lines), I am not going to include the whole thing in this message. Instead I have put it on my server at/usr/local/www/data/FreeBSD/gnuplot.input.txt <http://ykoberman.dlinkddns.com/FreeBSD/gnuplot.input.txt> along with one of the output images at http://ykoberman.dlinkddns.com/FreeBSD/temp.gif -- Kevin Oberman, Part time kid herder and retired Network Engineer E-mail: rko...@gm... PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683 |
|
From: sfeam <sf...@us...> - 2016-01-02 19:24:29
|
On Saturday, 02 January 2016 10:48:28 AM Kevin Oberman wrote: > On Sat, Jan 2, 2016 at 2:23 AM, Thomas Sefzick <t.s...@fz...> > wrote: > > > Kevin Oberman <rkoberman <at> gmail.com> writes: > > > > > > I am baffled by a failure I am having in attempting to generate a series > > of > > > plots on a single image. The inputs are from stdin. I get only the first > > > and last of the five plots, although the titles for all five are shown. > > No > > > errors reported. The last 3 columns of your data are identical, so the corresponding plots lie exactly on top of each other. All are present in the graph. If you use an interactive terminal (qt wxt ...) you can toggle them individually to confirm they are present. > > > > > > I have recorded the stream sent to gnuplot and can see no problems, > > though > > > I suspect I am missing a simpler way to do it. $DATA << EOD ... 96 lines of input ... EOD set style data lines plot $DATA using 1:2 title "2016-01-02", $DATA using 1:3 title "2016-01-01", $DATA using 1:4 title "2015-12-31", $DATA using 1:5 title "2015-12-30", $DATA using 1:6 title "2015-12-29" > > > ... > > > plot "-" using 1:2 title "2016-01-01" with lines, "-" using 1:3 title > > > "2015-12-31" with lines, "-" using 1:4 title "2015-12-30" with lists, "-" > > > using 1:5 title "2015-12-29" with lists, "-" using 1:6 title "2015-12-28" > > > with lists > > > ... > > > > i would suspect that the 1st and the 2nd plot are working, > > the others cant't due to a syntax error. > > > > change "with lists" to "with lines" in the plot command. > > > > Thomas, > > Thanks so much for taking time to point out my really dumb error. > Unfortunately, it was a cut and paste/editing error and was not in the > actual raw capture. All three plots were actually "with lines". > > Since the full stream is rather long (almost 500 lines), I am not going to > include the whole thing in this message. Instead I have put it on my server > at/usr/local/www/data/FreeBSD/gnuplot.input.txt > <http://ykoberman.dlinkddns.com/FreeBSD/gnuplot.input.txt> along with one > of the output images at http://ykoberman.dlinkddns.com/FreeBSD/temp.gif > -- > Kevin Oberman, Part time kid herder and retired Network Engineer > E-mail: rko...@gm... > PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683 > ------------------------------------------------------------------------------ > _______________________________________________ > gnuplot-info mailing list > gnu...@li... > Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info |
|
From: Ethan A M. <eam...@gm...> - 2016-01-02 19:25:34
|
On Saturday, 02 January 2016 10:48:28 AM Kevin Oberman wrote: > On Sat, Jan 2, 2016 at 2:23 AM, Thomas Sefzick <t.s...@fz...> > wrote: > > > Kevin Oberman <rkoberman <at> gmail.com> writes: > > > > > > I am baffled by a failure I am having in attempting to generate a series > > of > > > plots on a single image. The inputs are from stdin. I get only the first > > > and last of the five plots, although the titles for all five are shown. > > No > > > errors reported. The last 3 columns of your data are identical, so the corresponding plots lie exactly on top of each other. All are present in the graph. If you use an interactive terminal (qt wxt ...) you can toggle them individually to confirm they are present. > > > > > > I have recorded the stream sent to gnuplot and can see no problems, > > though > > > I suspect I am missing a simpler way to do it. $DATA << EOD ... 96 lines of input ... EOD set style data lines plot $DATA using 1:2 title "2016-01-02", $DATA using 1:3 title "2016-01-01", $DATA using 1:4 title "2015-12-31", $DATA using 1:5 title "2015-12-30", $DATA using 1:6 title "2015-12-29" > > > ... > > > plot "-" using 1:2 title "2016-01-01" with lines, "-" using 1:3 title > > > "2015-12-31" with lines, "-" using 1:4 title "2015-12-30" with lists, "-" > > > using 1:5 title "2015-12-29" with lists, "-" using 1:6 title "2015-12-28" > > > with lists > > > ... > > > > i would suspect that the 1st and the 2nd plot are working, > > the others cant't due to a syntax error. > > > > change "with lists" to "with lines" in the plot command. > > > > Thomas, > > Thanks so much for taking time to point out my really dumb error. > Unfortunately, it was a cut and paste/editing error and was not in the > actual raw capture. All three plots were actually "with lines". > > Since the full stream is rather long (almost 500 lines), I am not going to > include the whole thing in this message. Instead I have put it on my server > at/usr/local/www/data/FreeBSD/gnuplot.input.txt > <http://ykoberman.dlinkddns.com/FreeBSD/gnuplot.input.txt> along with one > of the output images at http://ykoberman.dlinkddns.com/FreeBSD/temp.gif > -- > Kevin Oberman, Part time kid herder and retired Network Engineer > E-mail: rko...@gm... > PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683 > ------------------------------------------------------------------------------ > _______________________________________________ > gnuplot-info mailing list > gnu...@li... > Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info |
|
From: Kevin O. <rko...@gm...> - 2016-01-03 01:16:16
|
I knew this was going to be embarrassing! Why did I not notice that the columns after the first were all the same (and were the data from the last column. Thanks very much, Ethan! Now I just need to figure out why I am pulling the wrong data out of the DB.Other than keeping it in an array, it's the same code I used to write it to a temp file, so I am guessing that I am simply over-writing the prior data with the "new" data as I load the data going backwards. Thanks again! Kevin Oberman, Part time kid herder and retired Network Engineer E-mail: rko...@gm... PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683 On Sat, Jan 2, 2016 at 11:25 AM, Ethan A Merritt <eam...@gm...> wrote: > On Saturday, 02 January 2016 10:48:28 AM Kevin Oberman wrote: > > On Sat, Jan 2, 2016 at 2:23 AM, Thomas Sefzick <t.s...@fz...> > > wrote: > > > > > Kevin Oberman <rkoberman <at> gmail.com> writes: > > > > > > > > I am baffled by a failure I am having in attempting to generate a > series > > > of > > > > plots on a single image. The inputs are from stdin. I get only the > first > > > > and last of the five plots, although the titles for all five are > shown. > > > No > > > > errors reported. > > The last 3 columns of your data are identical, so the corresponding plots > lie exactly on top of each other. All are present in the graph. > If you use an interactive terminal (qt wxt ...) you can toggle them > individually to confirm they are present. > > > > > > > > > I have recorded the stream sent to gnuplot and can see no problems, > > > though > > > > I suspect I am missing a simpler way to do it. > > $DATA << EOD > ... 96 lines of input ... > EOD > > set style data lines > > plot $DATA using 1:2 title "2016-01-02", $DATA using 1:3 title > "2016-01-01", $DATA using 1:4 title "2015-12-31", $DATA using 1:5 title > "2015-12-30", $DATA using 1:6 title "2015-12-29" > > > > > > > ... > > > > plot "-" using 1:2 title "2016-01-01" with lines, "-" using 1:3 title > > > > "2015-12-31" with lines, "-" using 1:4 title "2015-12-30" with > lists, "-" > > > > using 1:5 title "2015-12-29" with lists, "-" using 1:6 title > "2015-12-28" > > > > with lists > > > > ... > > > > > > i would suspect that the 1st and the 2nd plot are working, > > > the others cant't due to a syntax error. > > > > > > change "with lists" to "with lines" in the plot command. > > > > > > > Thomas, > > > > Thanks so much for taking time to point out my really dumb error. > > Unfortunately, it was a cut and paste/editing error and was not in the > > actual raw capture. All three plots were actually "with lines". > > > > Since the full stream is rather long (almost 500 lines), I am not going > to > > include the whole thing in this message. Instead I have put it on my > server > > at/usr/local/www/data/FreeBSD/gnuplot.input.txt > > <http://ykoberman.dlinkddns.com/FreeBSD/gnuplot.input.txt> along with > one > > of the output images at http://ykoberman.dlinkddns.com/FreeBSD/temp.gif > > -- > > Kevin Oberman, Part time kid herder and retired Network Engineer > > E-mail: rko...@gm... > > PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683 > > > ------------------------------------------------------------------------------ > > _______________________________________________ > > gnuplot-info mailing list > > gnu...@li... > > Membership management via: > https://lists.sourceforge.net/lists/listinfo/gnuplot-info > |