Re: [Matplotlib-users] How to find out the extend of the actual image in pixels

2010-09-29 Thread Jae-Joon Lee
On Wed, Sep 29, 2010 at 11:12 PM, Jonathan Slavin wrote: > This is interesting.  It seems that the event.x, event.y values are for > the entire figure area rather than limited to the image.  Anyone know > how to get the image values instead? Typically, images in matplotlib are associated with "da

Re: [Matplotlib-users] Making room for tick labels

2010-09-29 Thread Jason Grout
On 9/29/10 12:49 PM, Justin McCann wrote: > Not to pile on the "auto-adjust to make labels fit" bandwagon, but > I've been following the FAQ on adjusting the subplot locations to make > room for too-long tick labels: > > > http://matplotlib.sourceforge.net/faq/howto_faq.html#automatically-make

Re: [Matplotlib-users] how to display figure from a GUI app?

2010-09-29 Thread Benjamin Root
On Wed, Sep 29, 2010 at 3:43 PM, Skip Montanaro wrote: > I have a GTK app which runs its matplotlib stuff in a separate > thread. If I call pylab.show() at the end of building the plot > the first time it displays, then after that I have to destroy > the window before it will think about plottin

[Matplotlib-users] how to display figure from a GUI app?

2010-09-29 Thread Skip Montanaro
I have a GTK app which runs its matplotlib stuff in a separate thread. If I call pylab.show() at the end of building the plot the first time it displays, then after that I have to destroy the window before it will think about plotting something else, and it never does (it pretends to - my log mess

[Matplotlib-users] strip chart: thanks for you help

2010-09-29 Thread Russell E. Owen
I finished my strip chart widget thanks to help from Tony S Yu, Benjamin Root and others here. It supports multiple subplots and multiple lines/subplot. Here's a copy if anyone is interested: I plan to add it to the RO python p

[Matplotlib-users] Making room for tick labels

2010-09-29 Thread Justin McCann
Not to pile on the "auto-adjust to make labels fit" bandwagon, but I've been following the FAQ on adjusting the subplot locations to make room for too-long tick labels: http://matplotlib.sourceforge.net/faq/howto_faq.html#automatically-make-room-for-tick-labels and have found that the FAQ cod

Re: [Matplotlib-users] How to find out the extend of the actual image in pixels

2010-09-29 Thread Joe Kington
If you're just looking for the dimensions of the overall figure in pixels, you can easily access them through other means. E.g: import matplotlib.pyplot as plt fig = plt.figure() _, _, width, height = fig.bbox.extents # <- Extent of the figure in pixels fig.savefig('temp.png', dpi=fig.dpi) # <- Be

[Matplotlib-users] Missing Toolbar Button inside Wx Application

2010-09-29 Thread Sebastian Rhode
Hi all, if I plot an normal figure the toolbar contains an button (looks like a checkbox), which can be used to edit the lines and axes parameters. But when I embed such a figure in an Wx application, this specfic button is missing. Is there a way around it? Thanks for your help, Sebi Parts of

Re: [Matplotlib-users] How to find out the extend of the actual image in pixels

2010-09-29 Thread Alexander Dietz
Hi, On Wed, Sep 29, 2010 at 16:00, John Hunter wrote: > On Wed, Sep 29, 2010 at 8:50 AM, Alexander Dietz > wrote: > > > print ax.transData.transform((10.0, 20.0)) > > [ 576. 432.] > > > Why do you say it's wrong? Note that in mpl, (0,0) is (bottom left), > not (upper,left). So this is saying

Re: [Matplotlib-users] change tick label font size

2010-09-29 Thread Benjamin Root
On Wed, Sep 29, 2010 at 4:21 AM, Ruggero wrote: > I'm using matplotlib 0.9, is there a best way to do this: > > >for labeltick in ax.xaxis.get_majorticklabels() + > ax.yaxis.get_majorticklabels(): >labeltick.set_fontsize(15) > > > I can't do: > ax.tick_params(labelsize=15) as here: >

Re: [Matplotlib-users] colorbar uncentered plots

2010-09-29 Thread Benjamin Root
On Tue, Sep 28, 2010 at 10:56 PM, Philip Vetter > wrote: > Hello! see below for sample code. > > (1) I find that the second subplot is shifted to the right. > This seems to happen generally with colorbar. How do I fix it? > > (2) is there a way to clear/remove selected parts of the figure? > I am

Re: [Matplotlib-users] How to find out the extend of the actual image in pixels

2010-09-29 Thread Jonathan Slavin
This is interesting. It seems that the event.x, event.y values are for the entire figure area rather than limited to the image. Anyone know how to get the image values instead? Also, I wonder how one might get the values of the pixels (i.e. image value) at the pixels that you click on. One more

Re: [Matplotlib-users] How to find out the extend of the actual image in pixels

2010-09-29 Thread John Hunter
On Wed, Sep 29, 2010 at 8:50 AM, Alexander Dietz wrote: > print ax.transData.transform((10.0, 20.0)) > [ 576.  432.] Why do you say it's wrong? Note that in mpl, (0,0) is (bottom left), not (upper,left). So this is saying that the yellow dot at 10,20 (data coords) is 576 pixels up from the bo

Re: [Matplotlib-users] How to find out the extend of the actual image in pixels

2010-09-29 Thread Alexander Dietz
Hi John, thanks for the reply, but I think your method is not working: On Wed, Sep 29, 2010 at 15:39, John Hunter wrote: > On Wed, Sep 29, 2010 at 4:44 AM, Alexander Dietz > wrote: > > > I would like to know how to find out the extend of the actual image in a > > plot, in units of pixels. > >

Re: [Matplotlib-users] How to find out the extend of the actual image in pixels

2010-09-29 Thread John Hunter
On Wed, Sep 29, 2010 at 4:44 AM, Alexander Dietz wrote: > I would like to know how to find out the extend of the actual image in a > plot, in units of pixels. > As example I have attached a plot which is essentially empty. The lower left > corner is indicated by a red dot - what pixel position do

[Matplotlib-users] How to find out the extend of the actual image in pixels

2010-09-29 Thread Alexander Dietz
Hi, I would like to know how to find out the extend of the actual image in a plot, in units of pixels. As example I have attached a plot which is essentially empty. The lower left corner is indicated by a red dot - what pixel position does this location have? When opening this image in e.g. kview

[Matplotlib-users] change tick label font size

2010-09-29 Thread Ruggero
I'm using matplotlib 0.9, is there a best way to do this: for labeltick in ax.xaxis.get_majorticklabels() + ax.yaxis.get_majorticklabels(): labeltick.set_fontsize(15) I can't do: ax.tick_params(labelsize=15) as here: http://matplotlib.sourceforge.net/api/axes_api.html?highlight=tick