[rrd-users] Re: [rrd-developers] Image clipping/stacking wanted in 1.1.x (Was: "Re:

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Mon Mar 5 14:44:37 MET 2001

Jakob Ilves wrote:
> I would like rrdtool 1.1.x to support that images generated consists of partial
> graphs.  A partial graph could be a graphic consisting solely of a timescale
> X-axis.  Another partial graph could be just the graphed curves and areas
> themselves (with X- and Y-axis graphics, paddings, legends etc. clipped away ).

I think you present a solution to a problem here.  Maybe there is more
than one solution so please present the problem only, not the solution.

> If someone using rrdtool 1.0.x as of today and tries to get a "minimal" image,
> the following is the result:
>[snip picture]
> As we see here, 1.0.x rrdtool makes the padding on all sides as well as the Y and
> X axis mandatory.  The image cannot be generated without them.  (Not obvious from
> my "image" is the fact that also the beveled frame around the image as well as
> the right most logo also are included in all images).

This is a problem.  This should (IMHO) be solved but it can be solved
by other means than you suggest.

> A user should be able to control what is included in the generated image.  For
> example, if a X-axis and a graph with curves is all that is needed, then the user
> should be able to specify just those two components on the command line or in the
> Perl interface.

Sounds resonable.  However:
- you can already leave out the title
- you can already leave out the vertical label
- you can already leave out the x-axis
- you can already leave out the y-axis
- it makes no sense to leave out the canvas (where the graph is)
This leaves you with some whitespace that could (and IMHO should) be
removed, and with a copyright notice that shouldn't be easy to remove.

When the excess whitespace is removed, I think you have what you need?

As a side note: I do think we need a way to specify the width and height
of the total graph, not just the canvas.

> But to make these things even hairier, I would like rrdtool to support multiple
> graphs to be created and stacked on top of each other.  For example, what about
> several graphs with a X-axis at the bottom?  Below is an example of three graphs
> with an X-axis.
> +----------------------------+
> | Graph with curves          |
> | and areas.                 |
> +----------------------------+
> | Graph with curves          |
> | and areas.                 |
> +----------------------------+
> | Graph with curves          |
> | and areas.                 |
> +----------------------------+
>        X-axis

Interesting.  How should the user interface look?  Read the bottom
paragraphs first before you answer this as it might be sufficient.

> The graphs I have in mind are "threshold graphs".  A threshold graph isn't like
> the normal graphs which take a 400x150 area and draw one or more curves/areas on
> the graph.  The threshold graph has normal width, but is much lower, perhaps 10
> pixels so it forms a "bar".  The bar's graphics show wether or not a certain
> threshold condition has been met.  The graph might be green for points in time
> when the value is below a certain threshold and it might be red for values
> violating the threshold.  (You might also consider multiple colors and levels)

If all unnecessary whitespace is eliminated, this can be done with RRDtool.
Use --height 10, use AREA with a CDEF returning 0 or 10, use --x-axis none.
When there is no whitespace to display, you can just stack the graphs on top
as you suggested and have in fact what you asked for.

Another approach (bit of a workaround though) is to use the negative side
of the y-axis.


Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

More information about the rrd-users mailing list