[rrd-users] Fill color for unknown data
rhett.hooper at usurf.usu.edu
Wed Jul 2 23:27:10 MEST 2003
I have written a Perl script that uses rrdtool to graph weather station
data, (visible at http://gifts.sdl.usu.edu/blo/weather/) and I am having
some problems with a couple of the graphs. (See
We lost some data around the middle of last December, and our data only
goes back for a little under 3 years. As you can see in the above
graphs, I have tried blacking out the unknown data so that it is obvious
that data is missing. The problem is that when the values drop below
zero so that negative numbers show up on the y-axis, the blacked out
sections are exactly opposite of what I expected.
An example snippet of Perl that I use to create the 1 year Celsius
"--title=Bear Lake Observatory - Temperature (Last 1 year)",
Upon closer reading of the rrdgraph(1) man page, I see that AREA
"between 0 and the graph will be filled with the color specified"
instead of the area between the bottom of the graph and the graph being
I tried coming up with some CDEF, AREA, and SPAN statements that would
make it work the way I want, but haven't been successful. One that
seems like it should work tried STACKing to INF on top of NEGINF:
rrdtool graph blo-temp_c-1year.png \
--imgformat=PNG --interlaced \
--width=700 --height=300 \
--title="Bear Lake Observatory - Temperature (Last 1 year)" \
--vertical-label="Degrees Celsius" \
If I put a color on the AREA:base, I can see it coloring below 0, but
the STACK doesn't create anything visible. If I change the NEGINF in
the CDEF:base line to a negative number (like -20 which was the lowest
label on the y-axis before), then STACK works as expected and draws
black to the top of the graph. The problem with this workaround is that
I don't know what the low y-axis value is that rrdtool would have
picked, and if I specify one, it could change the range of the y-axis.
I thought that NEGINF should be that value.
It would be nice if STACK was able to color between NEGINF and INF, or
if there was a FILL function that could be used to color the whole
vertical portion of a graph for unknown values.
Does anyone see something I'm missing, or have other workarounds to suggest?
PS. I created the RRD using using the following command:
rrdtool create blo.rrd --start 968400000 --step 3600 \
J. Rhett Hooper <rhett.hooper at sdl.usu.edu>
USU Research Foundation / Space Dynamics Laboratory
GPG Public Key 0x9049E3BC available at http://www.keyserver.net/
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-users-request at list.ee.ethz.ch?subject=help
More information about the rrd-users