[rrd-users] Trend to show cloud height -Weather Station Application
Alex van den Bogaerdt
alex at vandenbogaerdt.nl
Sat Feb 19 09:13:41 CET 2011
> I want to create a trend which shows the height of clouds for my weather
> station. (Approx cloud height is a calculation from pressure and
> Instead of shading the area under graph value I want to shade above the
> value up to 100% of scale in a sky blue. I was going to simply use a CDEF
> to calculate the diff between actual value and 100% of scale and trend
> via a stack. My question is that the real value I want to be totally
> transparent so I only see the sky blue colour in the upper part of the
So you want transparent from the bottom upto the cloud base, and then draw
the cloud base to top of graph. It would be cool if you actually would be
able to draw the height of the clouds as well.
Draw the cloudbase as a line without a color. It won't show up, but you can
stack on it. Try if you can stack infinite on top of the cloudbase line.
(I choose grey, not blue, as sky is blue and clouds are not. You can change
It has been a while since I tried this. RRDtool used to be able to have
numbers instead of (C)DEFs, but I don't even know if it ever allowed INF.
If it doesn't work, just create a CDEF that holds nothing but INF, and stack
that on top of cloudbase. Do this by using a variable (cloudbase would be a
good choice) and replace that with INF values. For instance:
or whatever RPN constuction you can find which RRDtool does not barf on.
> Is there a hex colour value for totally transparent ?
It isn't needed (see above). If you need it elsewhere, use 4 groups of
digits, the last group is alpha value. Set to 0 for transparent, set to F or
FF for a solid color.
> It would be really cool if the upper "sky" blue area of the graph actually
> shows some random white clouds within this area so it really looks like
> I don't know if I could achieve this via a CDEF anybody have any idea's of
> how I could achieve a cloud shape object within this upper area randomly
> within the time line. I assume its again a stack command however really
> it as a random shape "cloud looking". An alternative maybe to simply
> generate the graph then use imagemagic to insert clouds within the upper
> graph area.
I don't think this will work. Cloud shapes will (in this picture anyway) not
have a relation to time. But you could try. Think of how an old printer with
moving printer head would draw it, line by line. Do the same using stacked
lines of blue and shades of grey. The only real difference is that printers
work left to right whereas with RRDtool you'd have to draw bottom to top.
How to accurately draw clouds is really off topic here IMHO.
More information about the rrd-users