ttyplot

Realtime terminal plotter
git clone git://git.sgregoratto.me/ttyplot
Log | Files | Refs | README | LICENSE

commit 5ac4a0606483020498fa944a1213a9b596585e8e
parent 5e7a190a80c6a678b44a231513302d40fe990ca9
Author: Antoni Sawicki <tenox@google.com>
Date:   Mon, 29 Apr 2019 01:05:40 -0700

fixed usage description for exceed hardmax

Diffstat:
Mttyplot.c | 7+------
1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/ttyplot.c b/ttyplot.c @@ -35,7 +35,7 @@ void usage() { "-2 read two values and draw two plots, the second one is in reverse video\n\n" "-r calculate counter rate and divide by measured sample interval\n\n" "-c character to use for plot line, eg @ # %% . etc\n\n" - "-C character to use for plot line when value exceeds max (default: x)\n\n" + "-C character to use for plot line when value exceeds hardmax (default: x)\n\n" "-s softmax is an initial maximum value that can grow if data input has larger value\n\n" "-m hardmax is a hard maximum value that can never grow, \n" " if data input has larger value the plot line will not be drawn\n\n" @@ -66,7 +66,6 @@ void getminmax(int pw, int n, double *values, double *min, double *max, double * *avg=tot/pw; } - void draw_axes(int h, int w, int ph, int pw, double max, char *unit) { mvhline(h-3, 2, T_HLINE, pw); mvaddch(h-3, 2+pw, T_RARR); @@ -107,7 +106,6 @@ void draw_line(int ph, int l1, int l2, int x, chtype plotchar, chtype clipchar) } - void draw_values(int h, int w, int ph, int pw, double *v1, double *v2, double max, int n, chtype plotchar, chtype clipchar) { int i; int x=3; @@ -164,7 +162,6 @@ int main(int argc, char *argv[]) { int rate=0; int two=0; - opterr=0; while((c=getopt(argc, argv, "2rc:C:s:m:t:u:")) != -1) switch(c) { @@ -269,7 +266,6 @@ int main(int argc, char *argv[]) { if(plotwidth>=(sizeof(values1)/sizeof(double))-1) return 0; - getminmax(plotwidth, n, values1, &min1, &max1, &avg1); getminmax(plotwidth, n, values2, &min2, &max2, &avg2); @@ -305,7 +301,6 @@ int main(int argc, char *argv[]) { mvprintw(0, (width/2)-(strlen(title)/2), "%s", title); - if(n<(plotwidth)-1) n++; else