help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: drawArrow - package geometry


From: Juan Pablo Carbajal
Subject: Re: drawArrow - package geometry
Date: Mon, 23 May 2016 00:02:09 +0200

On Sun, May 22, 2016 at 4:08 AM, Clinton Winant
<address@hidden> wrote:
> Using the following test program, I have been unable to draw arrows with
> "filled" arrow tips, even though the parameter R is set to 1.  The plot I
> obtain is attached
>
> %!demo
> %! # Orthogonal projection respect to vector b
>  dim = 2;
>  b   = 2*rand(dim,1);
>  P   = eye(dim) - (b*b')/(b'*b);
>  v   = 2*rand(dim,1)-1;
>  Pv  = P*v;
>
>  # Draw the vectors
>  clf;
>  h = drawArrow ([zeros(3,dim) [b'; v'; Pv']],1,0.1,1);%parameter R set to 1
>
>  # Color them
>  arrayfun(@(x,y)set(x,'color',y), [h.body; h.wing(:)],repmat(['rgb']',3,1));
>  # Name them
>  legend (h.body,
> {'b','v','Pv'},'location','northoutside','orientation','horizontal');
>
>
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/help-octave
>
Hi Clinton,

Thanks for your message.
The argument that controls the type of arrow's head is the 4th one. So
you need to do

h = drawArrow ([zeros(3,dim) [b'; v'; Pv']],1,0.1,0.1, 1);%parameter H set to 1

Try out H = 0.5, they look nice!

I have updated the behavior fo the optional arguments in the dev
version. I recommend that you download this file and replace the one
you have on disk

https://sourceforge.net/p/octave/geometry/ci/default/tree/inst/geom2d/drawArrow.m

I have also included a new demo to show how to use the ratio parameter
R (3rd argument) and the Head type paramter H (4th argument)

Cheers



reply via email to

[Prev in Thread] Current Thread [Next in Thread]