[OctDev] quiver3: 1 bug (arrow heads) + 1 fix + 1 improvement (set arrow color)

David Bateman adb014 at gmail.com
Mon Feb 4 18:34:31 CST 2008


Konstantinos Poulios wrote:
> Hi,
>
> first of all I hope that here is the right place to report this bug. I
> would also like to apologize for mixing one possible bug + fix and one
> suggestion for improvement in the same mail. Anyway, it's both about
> quiver.
>
> FIRST: the bug
> ---------------------
> In my Windows installation of Octave-Forge Version 3.0.0 I 've noticed
> that the arrow heads plotted by quiver3 are not parallel to the arrow.
>
> Test:	>> quiver([0,1],[0,1],[0,1],[1,2],[1,2],[1,2])
> 	>> set(gca,'view',[90,0])
>
> Fix:
> removing the "/3" from the end of line 161 in "__quiver__.m" seems to
> solve the problem
>
> line 161
> <--  zarrw1 = zarrw2 = zend - w(:) * arrowsize / 3;
> -->  zarrw1 = zarrw2 = zend - w(:) * arrowsize;
>
>
> SECOND: the improvement
> ---------------------
> quiver3 accepts as 8th argument a linespec. Though, defining a color in
> this linespec won't work. In order to make that work I had to modify the
> "__quiver__.m" as following:
>
> line 136
> <--  "linestyle", linespec.linestyle);
> -->  "linestyle", linespec.linestyle,"color",linespec.color);
>
> line 140
> <--  "linestyle", linespec.linestyle);
> -->  "linestyle", linespec.linestyle,"color",linespec.color);
>
> line 182
> <--  "linestyle", linespec.linestyle);
> -->  "linestyle", linespec.linestyle,"color", linespec.color);
>
> line 186
> <--  "linestyle", linespec.linestyle);
> -->  "linestyle", linespec.linestyle,"color", linespec.color);
>
>
>
> Test:	>> quiver([0,1],[0,1],[0,1],[1,2],[1,2],[1,2],0,'g')
>
>
>
> I hope to help someone with this information. I have also attached my
> original and modified "__quiver__.m" files.
>
>
> best regards
>
> Kostas
>   

Kostas,

This is an octave function, and so it must be changed in the core of
octave itself. That being said, I think your change is fine and propose
it in the attached form as a patch with an appropriate changelog entry.

D.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch13
Url: https://www.cae.wisc.edu/pipermail/octave-maintainers/attachments/20080205/157c70f3/attachment.ksh 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch13.changelog
Url: https://www.cae.wisc.edu/pipermail/octave-maintainers/attachments/20080205/157c70f3/attachment-0001.ksh 


More information about the Octave-maintainers mailing list