would display slightly less than C<260-0.001> to slightly more than
C<260+0.001> (this feature was contributed by Sasha Mikheev).
+[B<-J>|B<--alt-autoscale-min>]
+
+Where C<--alt-autoscale> will modify both the absolute maximum AND minimum
+values, this option will only affect the minimum value. The maximum
+value, if not defined on the command line, will be 0. This option can
+be useful when graphing router traffic when the WAN line uses compression,
+and thus the throughput may be higher than the WAN line speed.
+
[B<-M>|B<--alt-autoscale-max>]
Where C<--alt-autoscale> will modify both the absolute maximum AND minimum
im->minval -= adj;
im->maxval += adj;
}
+ else if(im->extra_flags & ALTAUTOSCALE_MIN) {
+ /* measure the amplitude of the function. Make sure that
+ graph boundaries are slightly lower than min vals
+ so we can see amplitude on the graph */
+ adj = (im->maxval - im->minval) * 0.1;
+ im->minval -= adj;
+ }
else if(im->extra_flags & ALTAUTOSCALE_MAX) {
/* measure the amplitude of the function. Make sure that
graph boundaries are slightly higher than max vals
{"no-minor", no_argument, 0, 'I'},
{"slope-mode", no_argument, 0, 'E'},
{"alt-autoscale", no_argument, 0, 'A'},
+ {"alt-autoscale-min", no_argument, 0, 'J'},
{"alt-autoscale-max", no_argument, 0, 'M'},
{"no-gridfit", no_argument, 0, 'N'},
{"units-exponent",required_argument, 0, 'X'},
break;
case 'A':
im->extra_flags |= ALTAUTOSCALE;
+ break;
+ case 'J':
+ im->extra_flags |= ALTAUTOSCALE_MIN;
break;
case 'M':
im->extra_flags |= ALTAUTOSCALE_MAX;
#define ALTYGRID 0x01 /* use alternative y grid algorithm */
#define ALTAUTOSCALE 0x02 /* use alternative algorithm to find lower and upper bounds */
-#define ALTAUTOSCALE_MAX 0x04 /* use alternative algorithm to find upper bounds */
-#define NOLEGEND 0x08 /* use no legend */
-#define NOMINOR 0x10 /* Turn off minor gridlines */
-#define ONLY_GRAPH 0x20 /* use only graph */
-#define FORCE_RULES_LEGEND 0x40 /* force printing of HRULE and VRULE legend */
+#define ALTAUTOSCALE_MIN 0x04 /* use alternative algorithm to find lower bounds */
+#define ALTAUTOSCALE_MAX 0x08 /* use alternative algorithm to find upper bounds */
+#define NOLEGEND 0x10 /* use no legend */
+#define NOMINOR 0x20 /* Turn off minor gridlines */
+#define ONLY_GRAPH 0x40 /* use only graph */
+#define FORCE_RULES_LEGEND 0x80 /* force printing of HRULE and VRULE legend */
-#define FORCE_UNITS 0x80 /* mask for all FORCE_UNITS_* flags */
-#define FORCE_UNITS_SI 0x80 /* force use of SI units in Y axis (no effect in linear graph, SI instead of E in log graph) */
+#define FORCE_UNITS 0x100 /* mask for all FORCE_UNITS_* flags */
+#define FORCE_UNITS_SI 0x100 /* force use of SI units in Y axis (no effect in linear graph, SI instead of E in log graph) */
enum tmt_en {TMT_SECOND=0,TMT_MINUTE,TMT_HOUR,TMT_DAY,
TMT_WEEK,TMT_MONTH,TMT_YEAR};