[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #39552] quiver/quiver3 ignores scale with only
From: |
Nicholas Jankowski |
Subject: |
[Octave-bug-tracker] [bug #39552] quiver/quiver3 ignores scale with only one point to plot |
Date: |
Wed, 19 Apr 2023 15:26:57 -0400 (EDT) |
Follow-up Comment #14, bug #39552 (project octave):
planning to push the following test to quiver if I can confirm I didn't break
something else:
%!test <*39552> # Check arrow length and scale factor adjustment.
%! hf = figure ("visible", "off");
%! hax = gca ();
%! unwind_protect
%! [x,y] = meshgrid (1:2);
%! u = [0 1; 2 3];
%! v = [1 2; 3 4];
%! sf = 0.5;
%!
%! ## Check single arrow.
%! h = quiver (hax, x(4), y(4), u(4), v(4), 1);
%! xendpoint = get (get (h, "children")(3), "xdata")(2);
%! assert (xendpoint, x(4) + u(4), eps);
%! h = quiver (hax, x(4), y(4), u(4), v(4), sf);
%! xendpoint = get (get (h, "children")(3), "xdata")(2);
%! assert (xendpoint, x(4) + sf*u(4), eps);
%!
%! ## Check multiple arrows.
%! h = quiver (hax, x, y, u, v, 1);
%! xendpoint1 = get (get (h, "children")(3), "xdata")(5);
%! assert (xendpoint1, x(2) + (sqrt(2)/10)*u(2), eps);
%! xendpoint2 = get (get (h, "children")(3), "xdata")(11);
%! assert (xendpoint2, x(4) + (sqrt(2)/10)*u(4), eps);
%! h = quiver (hax, x, y, u, v, sf);
%! xendpoint1 = get (get (h, "children")(3), "xdata")(5);
%! assert (xendpoint1, x(2) + sf*(sqrt(2)/10)*u(2), eps);
%! xendpoint2 = get (get (h, "children")(3), "xdata")(11);
%! assert (xendpoint2, x(4) + sf*(sqrt(2)/10)*u(4), eps);
%!
%! unwind_protect_cleanup
%! close (hf);
%! end_unwind_protect
+verbatim+
there are probably a number of BISTs we could add to quiver like this since
the line segments are fairly reliable check items, but it is a bit of a chore
to pull out the right pieces. The test does rely on child ordering, though,
while the plot itself doesn't, which seems like something that could easily
break down the road. I don't think it's worth the effort for me to have the
test parse the children to figure out which one of the three might be the
correct one to test, but it could be done.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?39552>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #39552] quiver/quiver3 ignores scale with only one point to plot, (continued)
- [Octave-bug-tracker] [bug #39552] quiver/quiver3 ignores scale with only one point to plot, Markus Mützel, 2023/04/19
- [Octave-bug-tracker] [bug #39552] quiver/quiver3 ignores scale with only one point to plot, Nicholas Jankowski, 2023/04/19
- [Octave-bug-tracker] [bug #39552] quiver/quiver3 ignores scale with only one point to plot, Nicholas Jankowski, 2023/04/19
- [Octave-bug-tracker] [bug #39552] quiver/quiver3 ignores scale with only one point to plot, Nicholas Jankowski, 2023/04/19
- [Octave-bug-tracker] [bug #39552] quiver/quiver3 ignores scale with only one point to plot, Markus Mützel, 2023/04/19
- [Octave-bug-tracker] [bug #39552] quiver/quiver3 ignores scale with only one point to plot, Dmitri A. Sergatskov, 2023/04/19
- [Octave-bug-tracker] [bug #39552] quiver/quiver3 ignores scale with only one point to plot, Nicholas Jankowski, 2023/04/19
- [Octave-bug-tracker] [bug #39552] quiver/quiver3 ignores scale with only one point to plot, Nicholas Jankowski, 2023/04/19
- [Octave-bug-tracker] [bug #39552] quiver/quiver3 ignores scale with only one point to plot, Dmitri A. Sergatskov, 2023/04/19
- [Octave-bug-tracker] [bug #39552] quiver/quiver3 ignores scale with only one point to plot, Nicholas Jankowski, 2023/04/19
- [Octave-bug-tracker] [bug #39552] quiver/quiver3 ignores scale with only one point to plot,
Nicholas Jankowski <=
- [Octave-bug-tracker] [bug #39552] quiver/quiver3 ignores scale with only one point to plot, Dmitri A. Sergatskov, 2023/04/19
- [Octave-bug-tracker] [bug #39552] quiver/quiver3 ignores scale with only one point to plot, Nicholas Jankowski, 2023/04/19
- [Octave-bug-tracker] [bug #39552] quiver/quiver3 ignores scale with only one point to plot, Dmitri A. Sergatskov, 2023/04/19
- [Octave-bug-tracker] [bug #39552] quiver/quiver3 ignores scale with only one point to plot, Nicholas Jankowski, 2023/04/19
- [Octave-bug-tracker] [bug #39552] quiver/quiver3 ignores scale with only one point to plot, Nicholas Jankowski, 2023/04/19
- [Octave-bug-tracker] [bug #39552] quiver/quiver3 ignores scale with only one point to plot, Nicholas Jankowski, 2023/04/19
- [Octave-bug-tracker] [bug #39552] quiver/quiver3 ignores scale with only one point to plot, Dmitri A. Sergatskov, 2023/04/19
- [Octave-bug-tracker] [bug #39552] quiver/quiver3 ignores scale with only one point to plot, Markus Mützel, 2023/04/20
- [Octave-bug-tracker] [bug #39552] quiver/quiver3 ignores scale with only one point to plot, Nicholas Jankowski, 2023/04/20
- [Octave-bug-tracker] [bug #39552] quiver/quiver3 ignores scale with only one point to plot, Markus Mützel, 2023/04/20