In case of zero span data supress the histogram plot.

This commit is contained in:
Poul-Henning Kamp 2003-08-18 11:13:19 +00:00
parent 962eaaf9d6
commit a21af19141
2 changed files with 12 additions and 0 deletions

View File

@ -328,6 +328,8 @@ PlotSet(struct dataset *ds, int val)
int i, j, m, x;
pl = &plot;
if (pl->span == 0)
return;
m = 1;
i = -1;
j = 0;
@ -380,6 +382,10 @@ DumpPlot(void)
int i, j, k;
pl = &plot;
if (pl->span == 0) {
printf("[no plot, span is zero width]\n");
return;
}
putchar('+');
for (i = 0; i < pl->width; i++)

View File

@ -328,6 +328,8 @@ PlotSet(struct dataset *ds, int val)
int i, j, m, x;
pl = &plot;
if (pl->span == 0)
return;
m = 1;
i = -1;
j = 0;
@ -380,6 +382,10 @@ DumpPlot(void)
int i, j, k;
pl = &plot;
if (pl->span == 0) {
printf("[no plot, span is zero width]\n");
return;
}
putchar('+');
for (i = 0; i < pl->width; i++)