Cacti (home)ForumsDocumentation

Differences

This shows you the differences between two versions of the page.

manual:087:7_examples [2010/02/21 12:45]
gandalf continued
manual:087:7_examples [2010/02/21 12:59] (current)
gandalf continued
Line 108: Line 108:
  
 ===== Graphing Data with a Small Standard Deviation ===== ===== Graphing Data with a Small Standard Deviation =====
 +
 +Sometimes, the automatic scaling of y-axis fails.
 +
 +**Example:**
 +<code>/usr/bin/rrdtool graph - \
 +--imgformat=PNG \
 +--end=now \
 +--start=end-150000 \
 +--title="Small Standarddeviation" \
 +--slope-mode \
 +DEF:a="test.rrd":test:AVERAGE \
 +CDEF:sine=a,POP,NOW,TIME,-,10000,/,SIN,1000,+ \
 +LINE1:sine#0000ff:sine</code>
 +
 +{{:manual:087:small-stddev.png|Small Standarddeviation using defaults}}
 +
 +==== Using --alt-autoscale ====
 +
 +In this case, using --alt-autoscale helps:
 +**Example:**
 +<code>/usr/bin/rrdtool graph - \
 +--imgformat=PNG \
 +--end=now \
 +--start=end-150000 \
 +--title="Small Standarddeviation using Autoscale" \
 +--alt-autoscale \
 +--slope-mode \
 +DEF:a="test.rrd":test:AVERAGE \
 +CDEF:sine=a,POP,NOW,TIME,-,10000,/,SIN,1000,+ \
 +LINE1:sine#0000ff:sine</code>
 +
 +{{:manual:087:small-stddev-autoscale.png|Small Standarddeviation using --alt-autoscale}}
 +
 +That indeed looks better. But you can't judge from this graph, how big the amplitude of the sine is.
 +
 +==== Using --alt-autoscale and --alt-y-grid ====
 +
 +Using the alternate grid (--alt-y-grid) solves this problem.
 +
 +**Example:**
 +<code>/usr/bin/rrdtool graph - \
 +--imgformat=PNG \
 +--end=now \
 +--start=end-150000 \
 +--title="Small Stddev using Autoscale and --alt-y-grid" \
 +--alt-autoscale \
 +--alt-y-grid \
 +--slope-mode \
 +DEF:a="test.rrd":test:AVERAGE \
 +CDEF:sine=a,POP,NOW,TIME,-,10000,/,SIN,1000,+ \
 +LINE1:sine#0000ff:sine</code>
 +
 +{{:manual:087:small-stddev-autoscale-alt-y-grid.png|Using --alt-y-grid to adjust y-axis}}





Personal Tools