changeset 28354:b55dd2734aeb

Fix warning when plotting tick marks which exceed integer range with gnuplot (bug #58419) * __gnuplot_draw_axes__.m (do_tics_1): Use fprintf format "%.15f" instead of "%.15g" so that exponential notation is always used if number grows large.
author Rik <rik@octave.org>
date Sat, 23 May 2020 08:05:20 -0700
parents ec764709312e
children 3da71c0527a1
files scripts/plot/util/private/__gnuplot_draw_axes__.m
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/util/private/__gnuplot_draw_axes__.m	Sat May 23 07:53:51 2020 -0400
+++ b/scripts/plot/util/private/__gnuplot_draw_axes__.m	Sat May 23 08:05:20 2020 -0700
@@ -2296,7 +2296,7 @@
              tickdir, ticklength, axispos, mirror);
     labels = strrep (labels, "%", "%%");
     for i = 1:ntics
-      fprintf (plot_stream, ' "%s" %.15g', labels{k++}, tics(i));
+      fprintf (plot_stream, ' "%s" %.15f', labels{k++}, tics(i));
       if (i < ntics)
         fputs (plot_stream, ", ");
       endif