[ref] move title to the bottom - ploot - simple plotting tools
(HTM) git clone git://bitreich.org/ploot git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/ploot
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Tags
(DIR) README
(DIR) LICENSE
---
(DIR) commit f9cd66a8878f2119e06cb341850048f8cb70315d
(DIR) parent 8f05e8625d7d5a684fba3ab97c911d3b98e1ecdd
(HTM) Author: Josuah Demangeon <mail@josuah.net>
Date: Wed, 14 Feb 2018 20:33:51 +0100
[ref] move title to the bottom
Diffstat:
M ploot.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
(DIR) diff --git a/ploot.c b/ploot.c
@@ -4,6 +4,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <time.h>
#include "config.h"
@@ -158,8 +159,6 @@ plot(double *beg, double *end, int height, char *str, time_t start)
int h;
putchar('\n');
- if (str != NULL)
- title(str, end - beg);
max = maxdv(beg, end);
for (h = height + height % 2; h > 0; h -= 2) {
@@ -169,8 +168,12 @@ plot(double *beg, double *end, int height, char *str, time_t start)
vaxis(top, h);
line(beg, end, top, bot);
}
+
haxis(beg, end, start);
+ if (str != NULL)
+ title(str, end - beg);
+
putchar('\n');
}