From: Samuel GOUGEON Date: Sat, 14 Mar 2020 18:17:16 +0000 (+0100) Subject: * Bug 16366 fixed: plot(..,':') was dash-dotted X-Git-Url: http://gitweb.scilab.org/?p=scilab.git;a=commitdiff_plain;h=4895b069b9566467a92dc505b42c28565be90711;hp=4148c329c86516a39c1a30ec13176fa5fecb664c * Bug 16366 fixed: plot(..,':') was dash-dotted http://bugzilla.scilab.org/16366 Change-Id: Idb413eebba370934f45144a6f80cfb62e3b5c3b8 --- diff --git a/scilab/CHANGES.md b/scilab/CHANGES.md index 1c24798..96085d1 100644 --- a/scilab/CHANGES.md +++ b/scilab/CHANGES.md @@ -269,6 +269,7 @@ Bug Fixes * [#16342](https://bugzilla.scilab.org/16342): `strcat()` was much slower in Scilab 6.0.2. * [#16350](https://bugzilla.scilab.org/16350): in if/while conditions, the empty sparse boolean was considered as TRUE. * [#16365](https://bugzilla.scilab.org/16365): `median(m,"r")` and `median(m,"c")` yielded wrong results (6.1.0 regression) +* [#16366](https://bugzilla.scilab.org/16366): `plot([0 1], ":")` plotted a dash-dotted curve instead of a dotted one. * [#16397](https://bugzilla.scilab.org/16397): display of long (real) column vectors was slow (regression). * [#16399](https://bugzilla.scilab.org/16399): `mtlb_zeros([])` was crashing Scilab. * [#16401](https://bugzilla.scilab.org/16401): global `external_object_java` class was crashing Scilab. diff --git a/scilab/modules/graphics/macros/getLineSpec.sci b/scilab/modules/graphics/macros/getLineSpec.sci index 7b86d7b..53b4e7e 100644 --- a/scilab/modules/graphics/macros/getLineSpec.sci +++ b/scilab/modules/graphics/macros/getLineSpec.sci @@ -34,7 +34,7 @@ function [Color,Line,LineStyle,Marker,MarkerStyle,MarkerSize,fail]=getLineSpec(s Line = %T; elseif strindex(str,":") str=strsubst(str,":",""); - LineStyle=5; + LineStyle=8; Line = %T; elseif strindex(str,"-") str=strsubst(str,"-",""); diff --git a/scilab/modules/graphics/macros/setPlotProperty.sci b/scilab/modules/graphics/macros/setPlotProperty.sci index 133feb6..02e284b 100644 --- a/scilab/modules/graphics/macros/setPlotProperty.sci +++ b/scilab/modules/graphics/macros/setPlotProperty.sci @@ -81,7 +81,7 @@ function [fail]=setPlotProperty(PropertyName,PropertyValue,Curves,current_figure Curves.line_style=4; Curves.line_mode = "on"; elseif (PropertyValue==":") - Curves.line_style=5; + Curves.line_style=8; Curves.line_mode = "on"; elseif (PropertyValue=="-") Curves.line_style=1; diff --git a/scilab/modules/graphics/tests/nonreg_tests/bug_16366.tst b/scilab/modules/graphics/tests/nonreg_tests/bug_16366.tst new file mode 100644 index 0000000..d40084e --- /dev/null +++ b/scilab/modules/graphics/tests/nonreg_tests/bug_16366.tst @@ -0,0 +1,24 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2020 - Samuel GOUGEON +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= + +// <-- TEST WITH GRAPHIC --> +// <-- NO CHECK REF --> + +// <-- Non-regression test for bug 16366 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/16366 +// +// <-- Short Description --> +// plot(x,y,":") plotted a dashed line instead of a dotted one + +clf +plot(0:1,":") +assert_checkequal(gce().children.line_style, 8); +clf +plot(0:1,"g:") +assert_checkequal(gce().children.line_style, 8);