# HG changeset patch # User Rik # Date 1626961997 25200 # Node ID 4f51ea7a510a238909f1e363aa0bf74b8cc458a3 # Parent ef865fcd4611ed354bcc60910dcc21aa6924434e Suppress incorrect warning in semilog[xy]err plots (bug #60959). * __errplot__.m (__do_errplot__): When creating the line objects that form the plot use initial "xdata", "ydata" of [1,1]. The default data for the plot system is [0, 1], [0, 1] and the point (0,0) causes an warning about non-positive data on log-axis plots. diff -r ef865fcd4611 -r 4f51ea7a510a scripts/plot/draw/private/__errplot__.m --- a/scripts/plot/draw/private/__errplot__.m Wed Jul 21 13:25:46 2021 -0400 +++ b/scripts/plot/draw/private/__errplot__.m Thu Jul 22 06:53:17 2021 -0700 @@ -126,8 +126,12 @@ args = __add_datasource__ ("__do_errplot__", hg, {"x", "y", "l", "u", "xl", "xu"}); - hl = [(__line__ (hg, "color", lc, "linestyle", "-", "marker", "none")), - (__line__ (hg, "color", lc, "linestyle", ls, "marker", mk))]; + ## Use a single data point for line rather than default data of [0, 1]. + ## The real data will be applied to the line object later. See bug #60959. + hl = [__line__(hg, "xdata", 1, "ydata", 1, + "color", lc, "linestyle", "-", "marker", "none"), + __line__(hg, "xdata", 1, "ydata", 1, + "color", lc, "linestyle", ls, "marker", mk)]; switch (numel (varargin)) case 2