collection initializer color handling vs quiver

I did a tiny bit of work on this over the weekend too and

    > decided to try to use a LineCollection instead of patches
    > inspired by Chris Barker's code, but removing his polar
    > coordinate stuff. Lines seemed a more promising way to go
    > for the arrows, although the width should scale down when
    > the arrows get small so that they're never wider than their
    > length. Using a line collection may not permit this. I also
    > haven't got it working yet. FWIW, Jordan's explanations of
    > expected behaviour have been spot on so far. Also, I'd be
    > happy to see the API fixed up a bit.

You can derive a custom line collection which has this behavior --
LineCollection supports an independent linewidth for each segment, so
as long as you keep an array of linewidths and an array of arrow
lengths, you can clip or set the linelengths at draw time or at
segment setting time. draw time is probably more appropriate, since
then you can account for figure window size under resizes, etc....


Thanks John,
I hope to have another go at this over the weekend but this sounds like a promising avenue,
Gary R.

Just a quick progress report.

First, an observation I should make is that despite there being quite a lot of documentation in the mpl code, I found it tough going to understand what the documentation means. I kept running into jargon and assumptions which made it hard to follow. I know it's hard to document things, but I think some diagrams and a glossary would be really helpful.

I did in fact spend a few hours trying to understand transforms and hacking at the quiver plot code over the weekend and have made no real progress. I haven't given up, but given the small amount of time I can spend on this, if anyone is hanging out (Jordan?) for improved quiver plots, they may want to move ahead independently on it.


Gary Ruben wrote:


Thanks John,
I hope to have another go at this over the weekend but this sounds like a promising avenue,
Gary R.

I've been working on quiver a little over the weekend. I refactored it so it works with non-regularly spaced X and Y data, and made it use Gary's LineArrow code. I don't have the variable colors for the arrows working yet though. I'm going to try to get that working before I submit my patch. I haven't even tried to do any of the absolute vs data coordinate stuff yet.