Re: [Matplotlib-users] Include icon in plot

2009-08-03 Thread Jae-Joon Lee
Hmm, your code runs just fine for me (of course with different icon, but I don't think it matters). Can you try to install the 0.99rc version of mpl and see if it solves the problem? Since the error is not reproduced in my side, I have little to help. Also, try the figimage and see if you see a sa

Re: [Matplotlib-users] Include icon in plot

2009-08-03 Thread John Hunter
On Mon, Aug 3, 2009 at 6:55 AM, Bas van Leeuwen wrote: > PS, @John, I'd like to try the imshow approach first because it is not > in a figure but in a QT frame containing several subplots. But thank > youfor the suggestion, I will try if the imshow approach appears > fruitless. All matplotlib axe

Re: [Matplotlib-users] Include icon in plot

2009-08-03 Thread Bas van Leeuwen
Hi, Sorry about the snippet, I will privide working code from now on. I found a reproduction path for the error, it occurs (seemingly random, but frequent) when there is more than one image in the plot and you try to zoom. Code: import Image from pylab import * im = Image.open("icon.png") ax = s

Re: [Matplotlib-users] Include icon in plot

2009-08-02 Thread John Hunter
On Sun, Aug 2, 2009 at 1:28 PM, Jae-Joon Lee wrote: > A snippet of code does not help in general. > Please take your time to create a simple, standalone code that > reproduces your problem and post that code in this mailing list so > that we can easily test. > > Here is the code, based on yours, th

Re: [Matplotlib-users] Include icon in plot

2009-08-02 Thread Jae-Joon Lee
A snippet of code does not help in general. Please take your time to create a simple, standalone code that reproduces your problem and post that code in this mailing list so that we can easily test. Here is the code, based on yours, that works for me. im = Image.open("icon.jpg") ax = gca

Re: [Matplotlib-users] Include icon in plot

2009-07-31 Thread Bas van Leeuwen
Hello, I tried to implement a solution for this issue. Basically I want to give the x and y position in datacoords and the width + height in pixels. However, when using the following code: im = Image.open("../Icons/Program Icon.png") limx = self.mainAxes.get_xlim()

Re: [Matplotlib-users] Include icon in plot

2009-07-30 Thread Bas van Leeuwen
Hi JJ, Thank you for your kind and speedy reply, I completely glanced over the extent parameter. Datacoords are actually what I need so this is perfect for me. To clarify what I want, I want to mark certain parts of a graph with an icon representing the reason it's interesting. Icons are for peak

Re: [Matplotlib-users] Include icon in plot

2009-07-30 Thread Jae-Joon Lee
The location of the image can be set by specifying the "extent" keyword, however, this is set in data coordinate. figimage may be close to what you want. http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.figimage As far as I know, there is no direct support in matplotlib to

[Matplotlib-users] Include icon in plot

2009-07-30 Thread Bas van Leeuwen
Hi all, Is there any way to annotate a plot with icons? The only way to include an image that I've found is using imshow, but imshow does not accept (x,y) coordinates. There probably is an easy solution, but I have not been able to find any. Please be patient :-) Thank you in advance for your re