Ben, John: Later this week or next, I'll take a crack at adding both of these
to quiver.py and
axes.py (one under the name "streamlines", the other as "streamplot").
This is a great idea. I've had some time to improve the code, and so you have
something better to work with! If you have any questions or need the code
modifying, I'm happy to help - should have free time at the weekend and next
week. I've also added density in both directions (nice idea - hadn't thought
about this) and variable color as well as width.
The new code is at http://www.atm.damtp.cam.ac.uk/people/tjf37/streamplot.py and
there are new sample plots at
You probably want to use a compound path (one object for the entire
plot). See the tutorial
particular the compound path for the histogram example near the end,
and let me know if you have any questions.
John, thanks for the hints. In the end I used a LineCollection for each
streamline because I didn't see how to set different properties (colour and
width) for different portions of the line in the compound path. LineCollection
performs well enough for this plot so I'm happy with this solution.