From af60e41db4e57c66f18cb373739fa59d36ae470e Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Fri, 14 Aug 2026 11:39:08 +0200 Subject: [PATCH] enable arrowplot (not yet arrows, but vertical lines from bottom up to value). --- src/frontend/plotting/pyplot.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/frontend/plotting/pyplot.c b/src/frontend/plotting/pyplot.c index 61394d852..022be718b 100644 --- a/src/frontend/plotting/pyplot.c +++ b/src/frontend/plotting/pyplot.c @@ -249,8 +249,11 @@ void ft_pyplot(double *xlims, double *ylims, fprintf(file, "step(d[:, %d], d[:, %d], where='mid', %s", col, col + 1, lwarg); else if (impulses) fprintf(file, "stem(d[:, %d], d[:, %d], markerfmt=' ', %s", col, col + 1, lwarg); - else if (arrows) - fprintf(file, "stem(d[:, %d], d[:, %d], markerfmt=' ', %s", col, col + 1, lwarg); + else if (arrows) { + double extrange = (ylims[1] - ylims[0]) * 0.005; + fprintf(file, "vlines(x = d[:, %d], ymin = %e, ymax = d[:, %d], colors = \"blue\", %s ", + col, ylims[0] - extrange, col + 1, lwarg); + } else if (markers) fprintf(file, "plot(d[:, %d], d[:, %d], marker='.', linestyle='None', ", col, col + 1);