BorisL
Joined: 31 Mar 2007 Posts: 30
|
Posted: Mon May 07, 2007 12:30 pm Post subject: [SOLVED] UnInformative Y-grid lables |
|
|
| Code: | /usr/local/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title=" - BGP - Imported Routes - " \
--base=1000 \
--height=150 \
--width=600 \
--alt-autoscale \
--vertical-label="routes" \
--slope-mode \
DEF:a="/usr/local/share/cacti/rra/routes_3736.rrd":routes:AVERAGE \
AREA:a#FF6044:"routes" \
GPRINT:a:LAST:"Current\:%8.2lf %s" \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:a:MAX:"Maximum\:%8.2lf %s" \
GPRINT:a:MIN:"Minimum\:%8.2lf %s\n" |
It seems that Using "--alt-autoscale" must involve adding '--alt-y-grid' to solve this.
| Quote: |
[-Y|--alt-y-grid]
Place the Y grid dynamically based on the graph's Y range. The
algorithm ensures that you always have a grid, that there are
enough but not too many grid lines, and that the grid is met-
ric. That is the grid lines are placed every 1, 2, 5 or 10
units. This parameter will also ensure that you get enough dec-
imals displayed even if your graph goes from 69.998 to 70.001.
(contributed by Sasha Mikheev).
|
patch:
| Code: | >diff -au rrd.php~ rrd.php
--- rrd.php~ Mon May 7 21:39:14 2007
+++ rrd.php Mon May 7 21:39:14 2007
@@ -584,7 +584,7 @@
if ($graph["auto_scale"] == "on") {
if ($graph["auto_scale_opts"] == "1") {
- $scale = "--alt-autoscale" . RRD_NL;
+ $scale = "--alt-autoscale --alt-y-grid" . RRD_NL;
}elseif ($graph["auto_scale_opts"] == "2") {
$scale = "--alt-autoscale-max" . RRD_NL;
$scale .= "--lower-limit=" . $graph["lower_limit"] . RRD_NL;
|
| Description: |
|
| Filesize: |
7.09 KB |
| Viewed: |
1559 Time(s) |

|
| Description: |
|
| Filesize: |
7.7 KB |
| Viewed: |
1563 Time(s) |

|
|
|