Mercurial > hg > octave-lyh
changeset 16857:804d26cf8e5b
__plt__.m: Plot a point marker for a scalar input such as plot(0,0) (bug #38825).
* scripts/plot/private/__plt__.m(__plt2ss__): If no style is specifed then
use '.' for marker.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 27 Jun 2013 10:46:14 -0700 |
parents | 787de2f144d9 |
children | cd29604214c5 |
files | scripts/plot/private/__plt__.m |
diffstat | 1 files changed, 4 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/plot/private/__plt__.m +++ b/scripts/plot/private/__plt__.m @@ -389,14 +389,13 @@ options = options(1); endif - [x_nr, x_nc] = size (x); - [y_nr, y_nc] = size (y); - - if (x_nr == 1 && x_nr == y_nr && x_nc == 1 && x_nc == y_nc) + if (isscalar (x) && isscalar (y)) linestyle = options.linestyle; marker = options.marker; if (isempty (marker) && isempty (linestyle)) - [linestyle, marker] = __next_line_style__ (); + ## If unspecified, marker for a single point is always "." + linestyle = "-"; + marker = "."; endif color = options.color; if (isempty (color))