diff options
author | justanothercatgirl <sotov2070@gmail.com> | 2024-09-25 22:40:34 +0300 |
---|---|---|
committer | justanothercatgirl <sotov2070@gmail.com> | 2024-09-25 22:40:34 +0300 |
commit | 5e92ffa2eb629400b0edd43e6e2df9bd197aaeb6 (patch) | |
tree | b4afc47491122b1ac9da561f539ca1dff81e0699 | |
parent | 3b3907d9c00185d5c4920df586d14293a3589366 (diff) |
added terminal plot support
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | main_23.c | 3 |
2 files changed, 6 insertions, 0 deletions
@@ -8,6 +8,9 @@ ifneq ($(OS),Windows_NT) T2LINKS = -lm -ldl ifneq (, $(shell which gnuplot)) T2FLAGS += -DPIPE_GNUPLOT + ifeq (, ${DISPLAY}) + T2FLAGS += -DTERMINAL_PLOT + endif endif endif @@ -16,6 +16,9 @@ typedef double (*func_t)(double); void pipe_gnuplot(struct dval *table, long len) { FILE* gp = popen("gnuplot", "w"); if (!gp) return; +#ifdef TERMINAL_PLOT + fputs("set terminal block\n", gp); +#endif // TERMINAL_PLOT fputs("plot '-' with lines\n", gp); print_table(gp, table, len); fputs("e\n", gp); |