Re: [Matplotlib-users] Arrows using Line2D and shortening lines

2008-08-22 Thread Jason Grout
Jae-Joon Lee wrote: > Hi Jason, > > I did made a similar class sometime ago and I'm attaching it just in > case. I guess it is very similar to yours but I rely on > matplolib.patches.FancyArrow class to draw the arrow head. > > The circle drawn by scatter() command should be a circle with size s

[Matplotlib-users] possible bug in font manager: RuntimeError: Not an AFM file

2008-08-22 Thread Marco A. S. Netto
Hi everyone I'm a matplotlib's beginner user and I had a problem that seems to be a bug. If I enable the option ps.useafm and I ask for a font that is not available in my OS, the matplotlib's font manager tries to get a default font, which is Vera (I don't know how the default font is set to Vera,

Re: [Matplotlib-users] Arrows using Line2D and shortening lines

2008-08-22 Thread Jae-Joon Lee
Hi Jason, I did made a similar class sometime ago and I'm attaching it just in case. I guess it is very similar to yours but I rely on matplolib.patches.FancyArrow class to draw the arrow head. The circle drawn by scatter() command should be a circle with size s (the third argument of the scatter

Re: [Matplotlib-users] Arrows using Line2D and shortening lines

2008-08-22 Thread Jason Grout
Alan G Isaac wrote: > Jason Grout wrote: >> The other problem is a more serious problem for me: how do >> I shorten the line so that it goes between the boundaries >> of the circle instead of the centers, especially when the >> circles are constructed in a scatter plot. > > Some years back I b

Re: [Matplotlib-users] ValueError in backend_gtk.py when switching from linear to log scale

2008-08-22 Thread Michael Droettboom
Can you provide a standalone script to illustrate this problem? I suspect that the position of the text is somehow negative and is getting masked away by the log transformation (which is obviously undefined for negative numbers). Also, have you tried the GtkAgg backend instead? That sees a lot

Re: [Matplotlib-users] masking values in quiver plot

2008-08-22 Thread Jeff Whitaker
Eric Firing wrote: > Jeff Whitaker wrote: >> Michael Roettger wrote: >>> Hi all, >>> >>> maybe I've misunderstood something concerning masking or quiver plots: >>> I want to exclude some data from a quiver plot. Here's an example: >>> >>> 8< >>> import numpy as N >>> import

Re: [Matplotlib-users] masking values in quiver plot

2008-08-22 Thread Eric Firing
Jeff Whitaker wrote: > Michael Roettger wrote: >> Hi all, >> >> maybe I've misunderstood something concerning masking or quiver plots: >> I want to exclude some data from a quiver plot. Here's an example: >> >> 8< >> import numpy as N >> import pylab as pl >> import matplotl

Re: [Matplotlib-users] masking values in quiver plot

2008-08-22 Thread Jeff Whitaker
Michael Roettger wrote: > Hi all, > > maybe I've misunderstood something concerning masking or quiver plots: > I want to exclude some data from a quiver plot. Here's an example: > > 8< > import numpy as N > import pylab as pl > import matplotlib.numerix.ma as ma > > # prepar

Re: [Matplotlib-users] Arrows using Line2D and shortening lines

2008-08-22 Thread Alan G Isaac
Jason Grout wrote: > The other problem is a more serious problem for me: how do > I shorten the line so that it goes between the boundaries > of the circle instead of the centers, especially when the > circles are constructed in a scatter plot. Some years back I briefly tried to think about ar

Re: [Matplotlib-users] Arrows using Line2D and shortening lines

2008-08-22 Thread Jason Grout
Alan G Isaac wrote: > Jason Grout wrote: >> Another related issue is that width of the path used to draw the >> arrowhead makes the arrow tip go beyond the endpoint; is there a way to >> shorten a line by a certain number of points so that we >> can account for that? > > For this problem, what

Re: [Matplotlib-users] Arrows using Line2D and shortening lines

2008-08-22 Thread Alan G Isaac
Jason Grout wrote: > Another related issue is that width of the path used to draw the > arrowhead makes the arrow tip go beyond the endpoint; is there a way to > shorten a line by a certain number of points so that we > can account for that? For this problem, what you want is to fill the arrowh

Re: [Matplotlib-users] Slow drawing of many lines in Basemap

2008-08-22 Thread Jeff Whitaker
Zane Selvans wrote: > I'm drawing several hundred lines at a time, each consisting of 10-100 > points, and it takes a couple of minutes for them all to display, > which makes me think I must be doing something stupid. > > The function that does the drawing looks like this: > > def plotlinmap(li

Re: [Matplotlib-users] masking values in quiver plot

2008-08-22 Thread Jeff Whitaker
Michael Roettger wrote: > Hi all, > > maybe I've misunderstood something concerning masking or quiver plots: > I want to exclude some data from a quiver plot. Here's an example: > > 8< > import numpy as N > import pylab as pl > import matplotlib.numerix.ma as ma > > # prepar

[Matplotlib-users] Arrows using Line2D and shortening lines

2008-08-22 Thread Jason Grout
I'm trying to get some "pretty" arrows for graphs and other uses in Sage. One of the problems we've been having with the FancyArrow and YAArrow is that the arrow is skewed when the aspect ratio is not 1:1 and it is scaled along with the plot. I've written the attached ArrowLine class which ba

[Matplotlib-users] masking values in quiver plot

2008-08-22 Thread Michael Roettger
Hi all, maybe I've misunderstood something concerning masking or quiver plots: I want to exclude some data from a quiver plot. Here's an example: 8< import numpy as N import pylab as pl import matplotlib.numerix.ma as ma # prepare data X,Y = pl.meshgrid(range(5),range(5)