comment out header line for gnuplot #13

Closed
wants to merge 1 commit into
from

Projects

None yet

3 participants

@pushcx
pushcx commented Oct 3, 2015

Without this #, gnuplot produces a graph that has no data on it. With it, it produces a graph with lines for battery info.

@pushcx pushcx comment out header line for gnuplot
Without this `#`, gnuplot produces a graph that has no data on it. With it, it produces a graph with lines for battery info.
07250a4
@petterreinholdtsen

[Peter Harkins]

Without this #, gnuplot produces a graph that has no data on
it. With it, it produces a graph with lines for battery info.

How strange. My gnuplot produces a graph with data in it, without the
hash character in front of the header. Any idea why your gnuplot do
not? Are you using the battery-status-graph script or doing it some
other way?

Happy hacking
Petter Reinholdtsen

@murinicanor

hi, just to let you know: i have the same problem on debian stretch with gnuplot 4.6.6-3 (using the /usr/sbin/battery-status-graph shell script)

@petterreinholdtsen

[Muri Nicanor]

hi, just to let you know: i have the same problem on debian stretch
with gnuplot 4.6.6-3 (using the /usr/sbin/battery-status-graph shell
script)

How strange. My understanding of the CSV format (See
<URL: https://en.wikipedia.org/wiki/Comma-separated_values >) is that
such '# character' is both unusual and unwanted. See also the RFC
specification <URL: https://tools.ietf.org/html/rfc4180 >. Is gnuplot
expecting some other format?

Happy hacking
Petter Reinholdtsen

@pushcx
pushcx commented Oct 31, 2015

Here's an example of the graph I get without the # in the first line. gnuplot --version says "gnuplot 5.0 patchlevel 1". Now that I've been running longer and have enough data to see a gray line on the right, perhaps it's trying to convert the first time of the first line to integer, failing because it's a word, using 0, and thus the whole plot is kinda useless because of over-broad x axis.

battery-graph

I wondered if the first line was screwing it up and so deleted the first line. It worked, so then I tried commenting out and # is just the first thing that came to mind from shell scripting and my work as a Ruby dev.

With the comment, I get a correct plot:
battery-graph

@petterreinholdtsen

[Peter Harkins]

Here's an example of the graph I get without the # in the first line.
gnuplot --version says "gnuplot 5.0 patchlevel 1".

I use gnuplot 4.6.6-2 in Debian Stable. Perhaps something changed in the CSV
reader in gnuplot 5?

Happy hacking
Petter Reinholdtsen

@petterreinholdtsen

I'm merging this project with the battery-stats project, and suggest you check it out.

As for this pull request, it need to be changed to ensure the file stay a valid CSV file while getting it to work with more versions of gnuplot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment