Mercurial > octave-nkf
comparison scripts/plot/private/__scatter__.m @ 15974:53a2fb7b2557 stable
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.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Sun, 08 Jul 2012 11:43:30 -0700 |
parents | d31a39a0ac77 |
children | a0b313c17a6b |
comparison
equal
deleted
inserted
replaced
15973:d31a39a0ac77 | 15974:53a2fb7b2557 |
---|---|
266 z = vert(:,3:end); | 266 z = vert(:,3:end); |
267 toolkit = get (ancestor (hg, "figure"), "__graphics_toolkit__"); | 267 toolkit = get (ancestor (hg, "figure"), "__graphics_toolkit__"); |
268 ## Does gnuplot only support triangles with different vertex colors ? | 268 ## Does gnuplot only support triangles with different vertex colors ? |
269 ## TODO - Verify gnuplot can only support one color. If RGB triplets | 269 ## TODO - Verify gnuplot can only support one color. If RGB triplets |
270 ## can be assigned to each vertex, then fix __go_draw_axe__.m | 270 ## can be assigned to each vertex, then fix __go_draw_axe__.m |
271 gnuplot_hack = (numel (x) > 1 && size(c, 2) == 3 | 271 gnuplot_hack = (numel (x) > 1 && columns (c) == 3 |
272 && strcmp (toolkit, "gnuplot")); | 272 && strcmp (toolkit, "gnuplot")); |
273 if (ischar (c) || ! isflat || gnuplot_hack) | 273 if (ischar (c) || ! isflat || gnuplot_hack) |
274 if (filled) | 274 if (filled) |
275 h = __go_patch__ (hg, "xdata", x, "ydata", y, "zdata", z, | 275 h = __go_patch__ (hg, "xdata", x, "ydata", y, "zdata", z, |
276 "faces", 1:numel(x), "vertices", vert, | 276 "faces", 1:numel(x), "vertices", vert, |