diff --git a/ttyplot.c b/ttyplot.c index 5ff9b92..c1e23ec 100644 --- a/ttyplot.c +++ b/ttyplot.c @@ -134,20 +134,13 @@ void draw_line(int x, int ph, int l1, int l2, chtype c1, chtype c2, chtype hce, } void plot_values(int ph, int pw, double *v1, double *v2, double max, double min, int n, chtype pc, chtype hce, chtype lce, double hm) { - int i; - int x=3; + const int first_col=3; + int i=(n+1)%pw; + int x; max-=min; - for(i=n+1; ihm) ? ph : (v1[i]hm) ? ph : (v2[i]hm) ? hce : (v1[i]hm) ? hce : (v2[i]hm) ? ph : (v1[i]hm) ? ph : (v2[i]hm) ? hce : (v1[i]