changeset 31884:436f771403bc stable

inpolygon.m: Fix demo code (bug #63865) Demo code for inpolygon.m was using "@" as a plot marker which is no longer recognized. This edit fixes that, and also uses different markers for inside / on / outside the polygon, which helps with CVD accessibility.
author Arun Giridhar <arungiridhar@gmail.com>
date Fri, 03 Mar 2023 16:40:00 -0500
parents b8205aa00a05
children 53abb2f38ace 9de99cd1f9d7
files scripts/geometry/inpolygon.m
diffstat 1 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/geometry/inpolygon.m	Thu Mar 02 16:07:12 2023 +0100
+++ b/scripts/geometry/inpolygon.m	Fri Mar 03 16:40:00 2023 -0500
@@ -104,12 +104,12 @@
 %! clf;
 %! plot (xv, yv);
 %! hold on;
-%! plot (x(inside), y(inside), "@g");
-%! plot (x(! in), y(! in), "@m");
-%! plot (x(on), y(on), "@b");
+%! plot (x(inside), y(inside), "og");
+%! plot (x(! in), y(! in), "sm");
+%! plot (x(on), y(on), "^b");
 %! hold off;
-%! disp ("Green points are inside polygon, magenta are outside,");
-%! disp ("and blue are on boundary.");
+%! disp ("Green circles are inside polygon, magenta squares are outside,");
+%! disp ("and blue triangles are on the boundary.");
 
 %!demo
 %!  xv = [ 0.05840, 0.48375, 0.69356, 1.47478, 1.32158, ...
@@ -129,12 +129,12 @@
 %! clf;
 %! plot (xv, yv);
 %! hold on;
-%! plot (x(inside), y(inside), "@g");
-%! plot (x(! in), y(! in), "@m");
-%! plot (x(on), y(on), "@b");
+%! plot (x(inside), y(inside), "og");
+%! plot (x(! in), y(! in), "sm");
+%! plot (x(on), y(on), "^b");
 %! hold off;
-%! disp ("Green points are inside polygon, magenta are outside,");
-%! disp ("and blue are on boundary.");
+%! disp ("Green circles are inside polygon, magenta squares are outside,");
+%! disp ("and blue triangles are on the boundary.");
 
 %!test
 %! [in, on] = inpolygon ([1, 0, 2], [1, 0, 0], [-1, -1, 1, 1], [-1, 1, 1, -1]);