# HG changeset patch # User Rik # Date 1341773010 25200 # Node ID 53a2fb7b255750abc574785c38f05d2cf92b7550 # Parent d31a39a0ac77663c08773235d0210ee935d08635 maint: Allow scatter demo to be run under Octave or Matlab for plot comparisons * __scatter__.m: Use columns() rather than size(c,2) for readability. * scatter.m: Use single quotes in demo code so that it will run under Matlab. diff -r d31a39a0ac77 -r 53a2fb7b2557 scripts/plot/private/__scatter__.m --- a/scripts/plot/private/__scatter__.m Tue Jun 19 19:00:55 2012 -0400 +++ b/scripts/plot/private/__scatter__.m Sun Jul 08 11:43:30 2012 -0700 @@ -268,7 +268,7 @@ ## Does gnuplot only support triangles with different vertex colors ? ## TODO - Verify gnuplot can only support one color. If RGB triplets ## can be assigned to each vertex, then fix __go_draw_axe__.m - gnuplot_hack = (numel (x) > 1 && size(c, 2) == 3 + gnuplot_hack = (numel (x) > 1 && columns (c) == 3 && strcmp (toolkit, "gnuplot")); if (ischar (c) || ! isflat || gnuplot_hack) if (filled) diff -r d31a39a0ac77 -r 53a2fb7b2557 scripts/plot/scatter.m --- a/scripts/plot/scatter.m Tue Jun 19 19:00:55 2012 -0400 +++ b/scripts/plot/scatter.m Sun Jul 08 11:43:30 2012 -0700 @@ -92,7 +92,7 @@ %! x = randn (100, 1); %! y = randn (100, 1); %! c = x .* y; -%! scatter (x, y, 20, c, "filled"); +%! scatter (x, y, 20, c, 'filled'); %! title ('Scatter with colors'); %!demo