Darren Dale | 1 Feb 15:24
Picon
Favicon

Re: colorbar ticklabel positions

On Thursday 31 January 2008 12:09:03 pm Darren Dale wrote:
> I have to report two more issues (sorry I'm reporting, not squashing, I'm
> swamped at work.)
>
> imshow(rand(100,100))
> colorbar()
>
> The horizontal alignment of the ticklabels is off, they are centered on the
> axis rather than being positioned to the right of it. Also, the image
> appears to be shifted in the axes, to the left and the top by one pixel.

I looked into this some more this morning, and discovered that this tick 
behavior also occurs when yaxis.tick_right() is called. xaxis.tick_top() 
behaves as it should, and the only difference I noticed stepping through a 
script with the debugger is that at the end of set_ticks position, YAxis does 
the following, but XAxis does not:

for t in ticks:
    t.update_position(t._loc)

I don't know what is this blocks purpose, adding it to YAxis didnt seem to 
have any effect.

Darren

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
(Continue reading)

Jörgen Stenarson | 1 Feb 20:50
Picon

figsize anomaly in pdf

Hi,

using the attached script to generate one pdf and one png of the same 
figure. I get a 800x600 pixel png which is expected for a 8x6in figure 
at 100 dpi. But for the pdf I get 11.11x8.33in as determined from the 
document properties dialog in acrobat reader. Looking at the file 
information on a mac it reports the size as 800x600 for the pdf.

Doing some more digging it turns out acrobat reader reports a correct 
size for the figure if I set dpi=72 when calling savefig. Perhaps there 
is some dpi information that needs to be saved with the pdf file?

/Jörgen
import pylab,numpy

from numpy import array,arange,pi,cos,sin
figsize=(8,6)

x=arange(0,2*pi,0.1)
pylab.close("all")
pylab.figure(1,figsize=figsize)
pylab.plot(x,sin(x))
pylab.savefig("figsize-1.png")
pylab.savefig("figsize-1.pdf")
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
(Continue reading)

Jörgen Stenarson | 1 Feb 20:55
Picon

tick alignment in pdf backend

Hi,

the tickmarks seem to be misaligned when saving figures with the pdf 
backend. I have attached a screen shot of one of the corners of the 
figure, the tickmarks do not align with the border of the axes. The 
figure was generated with the attached script.

/Jörgen

import pylab,numpy

from numpy import array,arange,pi,cos,sin

x=arange(0,2*pi,0.1)
pylab.plot(x,sin(x))

pylab.savefig("offset-ticks.pdf")

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-devel mailing list
(Continue reading)

Jörgen Stenarson | 1 Feb 21:07
Picon

Tk-window doesn't show full figure

Hi,

One annoyance with the TkAgg plotwindow is that it doesn't show the full 
plotarea. Comparing the plot result saved to png in visible-area-tk.png 
to the screen shot of the tkagg window in visible-area-tk-window.png you 
can see that there is a grey border covering some of the area at the edges.

/Jörgen

import pylab,numpy

from numpy import array,arange,pi,cos,sin
from pylab import rcParams

rcParams["figure.subplot.bottom"]=0
rcParams["figure.subplot.top"]=1
rcParams["figure.subplot.left"]=0
rcParams["figure.subplot.right"]=1
pylab.close("all")

x=arange(0,2*pi,0.1)
pylab.plot(x,sin(x))

pylab.savefig("visible-area-tk.png")
pylab.savefig("visible-area-tk.pdf",dpi=72)

(Continue reading)

Michael Droettboom | 1 Feb 21:16

Re: tick alignment in pdf backend

Thanks.  Fixed in SVN r4929.

Jörgen Stenarson wrote:
> Hi,
> 
> the tickmarks seem to be misaligned when saving figures with the pdf 
> backend. I have attached a screen shot of one of the corners of the 
> figure, the tickmarks do not align with the border of the axes. The 
> figure was generated with the attached script.
> 
> /Jörgen
> 
> 
> 
> ------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Matplotlib-devel mailing list
> Matplotlib-devel@...
(Continue reading)

Jörgen Stenarson | 1 Feb 21:20
Picon

Re: tick alignment in pdf backend

Michael Droettboom skrev:
> Thanks.  Fixed in SVN r4929.
> 

That was quick. Thanks.

/Jörgen

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Mathew Yeates | 1 Feb 23:47
Picon
Picon
Favicon

3d support

Hi
I want to write an application which includes multidimensional 
visualization. I tried running simple3d.py but it is slowwwwww! Also, 
I'm not sure if the Navigation Toolbar is working properly.

I looked into VTK and it certainly has good performance and good 
navigation but .... another steep learning and probably overkill for 
interacting with simple 3d plots.

Anyone have any thoughts on this?

Mathew

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Gael Varoquaux | 2 Feb 00:22
Favicon
Gravatar

Re: 3d support

On Fri, Feb 01, 2008 at 02:47:21PM -0800, Mathew Yeates wrote:
> I looked into VTK and it certainly has good performance and good 
> navigation but .... another steep learning and probably overkill for 
> interacting with simple 3d plots.

> Anyone have any thoughts on this?

We are working on making Mayavi2
(https://svn.enthought.com/enthought/wiki/MayaVi) suitable for what you
want to do. You can have a look at http://gael-varoquaux.info/blog/?p=3
for a demo of the capabilities and the interface. This is only part of
Mayavi2, as Mayavi2 also provides a fully-fledged visualisation
application.

Mayavi2 is based upon VTK but strives to make it interactive and to
provide a simple API. It is still in flux and documentation is sparse (I
am planning to address this problem this week end). Moreover some people
find installation painful. We are working on that and in the mean time we
are very willing to help people if they have difficulties with the
instructions on the webpage. If you want more info or help of any kind,
the relevant mailing list is
https://mail.enthought.com/mailman/listinfo/enthought-dev .

HTH,

Gaël

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
(Continue reading)

Mathew Yeates | 2 Feb 00:28
Picon
Picon
Favicon

Re: 3d support

I was just experimenting with Mayavi2 when your mail arrived! Thanks. 
I'll look at it over the weekend

Mathew

Gael Varoquaux wrote:
> On Fri, Feb 01, 2008 at 02:47:21PM -0800, Mathew Yeates wrote:
>   
>> I looked into VTK and it certainly has good performance and good 
>> navigation but .... another steep learning and probably overkill for 
>> interacting with simple 3d plots.
>>     
>
>   
>> Anyone have any thoughts on this?
>>     
>
> We are working on making Mayavi2
> (https://svn.enthought.com/enthought/wiki/MayaVi) suitable for what you
> want to do. You can have a look at http://gael-varoquaux.info/blog/?p=3
> for a demo of the capabilities and the interface. This is only part of
> Mayavi2, as Mayavi2 also provides a fully-fledged visualisation
> application.
>
> Mayavi2 is based upon VTK but strives to make it interactive and to
> provide a simple API. It is still in flux and documentation is sparse (I
> am planning to address this problem this week end). Moreover some people
> find installation painful. We are working on that and in the mean time we
> are very willing to help people if they have difficulties with the
> instructions on the webpage. If you want more info or help of any kind,
(Continue reading)

Gael Varoquaux | 2 Feb 15:48
Favicon
Gravatar

Re: ginput: blocking call for mouse input

On Thu, Jan 31, 2008 at 04:41:41PM +0100, Gael Varoquaux wrote:
> > If this seems like a good organization to you, I'll wait for a new
> > patch and then contribute that.

> Give me a few days, but it will come.

Here is the new patch. I added visual feedback when accumulating points.
I hope the docstrings are clear.

Cheers,

Gaël
Index: backend_bases.py
===================================================================
--- backend_bases.py	(revision 4908)
+++ backend_bases.py	(working copy)
@@ -1151,7 +1151,13 @@
         """
         return self.callbacks.disconnect(cid)

+    def flush_events(self):
+        """ Flush the GUI events for the figure. Implemented only for
+        backends with GUIs.
+        """
+        raise NotImplementedError

+
 class FigureManagerBase:
(Continue reading)


Gmane