changeset 26234:23b56a61c918

Force line() with a single point to display '.' (bug #38825). * __line__.m: If line has only a single point then force a marker style of '.'.
author Rik <rik@octave.org>
date Thu, 13 Dec 2018 23:23:54 -0800
parents 59bc720d1bf9
children 00924e6e513e
files scripts/plot/draw/private/__line__.m
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/draw/private/__line__.m	Thu Dec 13 22:58:37 2018 -0800
+++ b/scripts/plot/draw/private/__line__.m	Thu Dec 13 23:23:54 2018 -0800
@@ -115,7 +115,7 @@
       endif
 
       ## Convert logical or complex inputs
-      if (islogical (tmpdata))
+    if (islogical (tmpdata))
         tmpdata = uint8 (tmpdata);
       elseif (iscomplex (tmpdata))
         tmpdata = real (tmpdata);
@@ -140,6 +140,11 @@
       ##        or linestyle.  The plot will be made correctly, but the next
       ##        call to line may not use the correct value.
       [linestyle, marker] = __next_line_style__ ();
+      if (nr == 1)
+        ## Marker for a single point is always '.' (bug #38825).
+        marker = '.';
+      endif
+      keyboard;
       color = __next_line_color__ ();
 
       handles(i) = __go_line__ (hp, data_args{:},