Re: [Matplotlib-users] Creating Dendrograms

2006-09-13 Thread Fernando Perez
On 9/12/06, John Hunter [EMAIL PROTECTED] wrote:

Minor correction

   license. Fernando Perez did this with ipython, which was released
   under the LGPL and then re-released under a BSD license to ease
   integration with scipy and other enthought products. The LGPL is
^^^
 matplotlib, scipy and...

Integration and free back-and-forth code sharing with you was one of
the main factors behind that decision.

And just to provide a datapoint confirming John's argument, ipython
was one of those cases where I chose LGPL out of pure ignorance and
incomplete understanding.

Regards,

f

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] MPL/Pylab install woes (still)

2006-09-13 Thread Paul-Michael Agapow
Spot on. Thanks Charles - that did the trick (setting WX_CONFIG to point to the right place). I had the universal wxpython installed but unbeknownst to me there was a previous wx installation on my machine. (Possibly installed by some super-pack or along with some other library.) Setting the environmental variable WX_CONFIG to the correct location (/usr/local/lib/wxPython-unicode-2.6.3.3/bin/wx-config) before the build sorted things out.As an aside, the spurious error messages generated in the build stage (warning: "M_PI" redefined,  /usr/local/lib/libgcc_s.10.4.dylib does not contain an architecture that matches the specified -arch flag: ppc, etc.) aren't helpful and may hide any genuine problems. It would be nice to have them go away.Thanks againp  After some progress in installing matplotlib (after solving the numpyproblem, thanks), I've hit another obstacle. Again, perhaps someone willrecognise the symptoms or suggest the next place to look. The technical setup: OSX 10.4, MPL 0.87.5, numeric, numarray and  numpy 1.0b5 installed,intel MacBook.The issue: matplotlib installs but when pylab is imported, I get: :    14:28:56: Debug: ../src/common/object.cpp(224): assert"sm_classTable-Get(m_className) == NULL" failed: classalready in RTTI table - have you used IMPLEMENT_DYNAMIC_CLASS() twice (maybe by linking some object module(s) twice)?    ../src/common/object.cpp(224): assert"sm_classTable-Get(m_className) == NULL" failed: classalready in RTTI table - have you used IMPLEMENT_DYNAMIC_CLASS() twice (maybe by linking some object module(s) twice)?    Trace/BPT trapand then dumped to the CLI.  ``sm_classTable`` appears to be defined in  thewxagg backend. Do you have the universal wxpython installed?  If so, make sure youset WX_CONFIG to point to the correct wx-config executable. --Dr Paul-Michael Agapow, VieDigitale / Institute of Animal Health[EMAIL PROTECTED] / [EMAIL PROTECTED] -
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Default dpi for savefig

2006-09-13 Thread Yannick Copin
Hi,

  David == David Huard [EMAIL PROTECTED] writes:
 
 David Hi, I'm a little bit lost with respect to setting the
 David resolution of images saved in png.  The matplotlibrc file
 David sets the dpi to 80, but the default keyword argument of
 David savefig is set to 150. Thus, changing the rc setting to
 David dpi=300 does not modify savefig's default behaviour.  Is
 David there a way to set a default dpi that would be used when
 David calling savefig ?
 
 
 Have you tried modifying the rc setting 
 
 savefig.dpi   : 100  # figure dots per inch

On a related issue: when exporting a figure from the tkagg backend 
(using the appropriate button) to PNG, the dpi is arbitrirarily set to 
300 (see backend_tkagg.py in NavigationToolbar2TkAgg.save_figure):

self.canvas.print_figure(fname, dpi=300)

I think it should honor the savefig.dpi rc setting:

self.canvas.print_figure(fname, dpi=rcParams['savefig.dpi'])

so that using savefig('toto.png') in the script or exporting it from the 
window is equivalent. I dont't know if this happens w/ other 'GUI' backends.

Cheers.
-- 
 /  \ ,,
   _._ _ |oo| _  / \__/ \
  _   ((/ () \))   /  \  Yannick COPIN  (o:*  Doctus cum libro
  |/|  (  )|oo|  Institut de physique nucleaire de Lyon
   \/  _`\  /'_/  \(IN2P3 - France)
   /   /.-' /\/\ `\.( () )_._  Tel: (33/0) 472 431 968
   |`  /  \/  \  /`'--') http://snovae.in2p3.fr/ycopin/
\__,-'`|  |.  |\/ |/\/\|\` AIM: YcCopinICQ: 236931013
   jgs |  |.  | \___/\___/
   |  |.  |   ||

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Default dpi for savefig

2006-09-13 Thread John Hunter
 Yannick == Yannick Copin [EMAIL PROTECTED] writes:

Yannick Hi,
  David == David Huard [EMAIL PROTECTED]
 writes:

David Hi, I'm a little bit lost with respect to setting the
David resolution of images saved in png.  The matplotlibrc file
David sets the dpi to 80, but the default keyword argument of
David savefig is set to 150. Thus, changing the rc setting to
David dpi=300 does not modify savefig's default behaviour.  Is
David there a way to set a default dpi that would be used when
David calling savefig ?
 
 
 Have you tried modifying the rc setting
 
 savefig.dpi : 100 # figure dots per inch

Yannick On a related issue: when exporting a figure from the
Yannick tkagg backend (using the appropriate button) to PNG, the
Yannick dpi is arbitrirarily set to 300 (see backend_tkagg.py in
Yannick NavigationToolbar2TkAgg.save_figure):

Yannick self.canvas.print_figure(fname, dpi=300)

Yannick I think it should honor the savefig.dpi rc setting:

Yannick self.canvas.print_figure(fname,
Yannick dpi=rcParams['savefig.dpi'])

Yep -- this is a bug in my view.  pylab.savefig and fig.avefig respect
the setting, but canvas.print_figure did not.  I updated the following
backends:

Sendingmatplotlib/lib/matplotlib/backend_bases.py
Sendingmatplotlib/lib/matplotlib/backends/backend_agg.py
Sendingmatplotlib/lib/matplotlib/backends/backend_fltkagg.py
Sendingmatplotlib/lib/matplotlib/backends/backend_gtk.py
Sendingmatplotlib/lib/matplotlib/backends/backend_gtkagg.py
Sendingmatplotlib/lib/matplotlib/backends/backend_qt4agg.py
Sendingmatplotlib/lib/matplotlib/backends/backend_qtagg.py
Sendingmatplotlib/lib/matplotlib/backends/backend_template.py
Sendingmatplotlib/lib/matplotlib/backends/backend_tkagg.py
Sendingmatplotlib/lib/matplotlib/backends/backend_wx.py
Sendingmatplotlib/lib/matplotlib/backends/backend_wxagg.py
Sendingmatplotlib/lib/matplotlib/figure.py

Those of you with svn access please give it a test drive on your
favorite backends to make sure it is behaving properly.  I was able to
test several...

JDH

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Creating Dendrograms

2006-09-13 Thread R. Padraic Springuel
I chose the GPL because it was the open source license I was aware of 
and didn't realize that it would create problems with reusability of the 
code.  It is not my intention to restrict people from reusing the code. 
  Indeed, I'd much prefer that people did reuse the code.  Since that 
appears to mean switching to a BSD style license, I'll make that switch.
-- 

R. Padraic Springuel
Teaching Assistant
Department of Physics and Astronomy
University of Maine
Bennett 309
Office Hours: Wednesday 2-3pm

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Creating Dendrograms

2006-09-13 Thread R. Padraic Springuel
 Have you thought about combining the dendrogram with a
 heatmap/colormap (e.g.
 http://www2.warwick.ac.uk/fac/sci/moac/currentstudents/peter_cock/python/heatmap/)?
 Could ClusterPlot be combined with pcolor() to do this?

To be honest, I haven't thought about doing anything like this.  While 
I'm using the Pycluster package to do my cluster analysis, I'm actually 
doing research in Physics Education, not genetics.  As a result, I've 
never even seen diagrams like the one shown in the above link before. 
Looking at it, however, I imagine that with the judicious use of 
subplots, ClusterPlot could create the dendrograms in those images. 
Once direction control is added to ClusterPlot, that is.

At this point I have thought about only two further extensions to 
ClusterPlot.  The first is the afore mentioned one: allowing control of 
the direction of the dendrogram.  Once that's implemented, I'd consider 
the code to be out of the beta stage.  The other extension would be a 
modification to the coordinates function so that the vertical 
coordinates of the dendrogram don't have to follow the Pycluster 
distances in the tree.  Pycluster doesn't support having anything other 
than a distance measure in that slot.  Now, while Pycluster does have 8 
different distance measures, I can imagine cases where one would prefer 
to spread the tree by a dissimilarity measure or some other metric. 
This modification should be simple enough to make, so it'll probably be 
included in the next update (which might come before full release).

Finally, concerning the license discussion, I've posted version 0.6 
which is released under the BSD-style license.  Version 0.5, with its 
GPL license has been removed from the download site.

http://www.umit.maine.edu/~r.springuel/000CCFE8-8018/
-- 

R. Padraic Springuel
Teaching Assistant
Department of Physics and Astronomy
University of Maine
Bennett 309
Office Hours: Wednesday 2-3pm

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] tooltips in matplotlib?

2006-09-13 Thread Christopher Barker

Martin Spacek wrote:
 Attached is an example file of 
 what I've got running now. It should run on its own. A wx tooltip pops 
 up whenever the mouse is over the axes.

cool.

I had to make a change to get it to run:

mpl.use('WXAgg') has to come before import pylab

once running, it's not working quite right: the tooltip always is at the 
bottom of the Window, though it does track the X location.

oddly it looks likeit's getting it's coords in figure units (0 to 1), 
whcih shouldn't work with a wxWindow.

Also, I'm getting the tooltip even when the window doesnot have focus 
and is under other windows -- at least when the mouse is over an exposed 
part of the window. That's probably a wx issue.

Python 2.4.3
  wx.__version__
'2.6.3.0'
  matplotlib.__version__
'0.87.5'

wxGTK on on Fedora core 4 linux.


-Chris





-- 
Christopher Barker, Ph.D.
Oceanographer

NOAA/ORR/HAZMAT (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

[EMAIL PROTECTED]

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] MPL/Pylab install woes (still)

2006-09-13 Thread Christopher Barker
Paul-Michael Agapow wrote:
 there was a previous wx installation on my machine. 
 (Possibly installed by some super-pack or along with some other 
 library.)

Apple put it there. they included a version of wxpython with their 
Python install.

It's out of date, but pretty coll that they did it.

-Chris

-- 
Christopher Barker, Ph.D.
Oceanographer

NOAA/ORR/HAZMAT (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

[EMAIL PROTECTED]

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] tooltips in matplotlib?

2006-09-13 Thread Christopher Barker
once running, it's not working quite right: the tooltip always is at the 
bottom of the Window, though it does track the X location.


Hm, dunno. I'm running win32 (winxp), Python 2.4.3.



Maybe try updating your wx install.


I've tried with 2.6.3, same result.

I think this is a platform issue: I expect that GTK is putting the 
tooltip at the bottom of the wx.Window it's on. this is really to bad, 
as with larger Windows, that might not be what you want.


In fact, I have a need to add tooltips to a wx.lib.floatcanvas based 
app, a I need to be able to place them where I need. I guess I'll send a 
note to wxpython-users about this.


I've enclosed a wxpython tiny test app, to isolate matplotlib issues. It 
has the same behavior. does the tooltip follow the mouse on Windows (or 
OS-X)


-Chris



--
Christopher Barker, Ph.D.
Oceanographer

NOAA/ORR/HAZMAT (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

[EMAIL PROTECTED]
#!/usr/bin/env python2.4

import wx

class DemoPanel(wx.Panel):

A very minimal Panel to test Tooltips.

def __init__(self, *args, **kwargs):
kwargs['size'] = (200,200)
wx.Panel.__init__(self, *args, **kwargs)
self.tooltip = wx.ToolTip(tip='A tool tip') # create an empty tooltip
#self.tooltip = wx.TipWindow(self, text = A tip Window)
#self.tooltip.Hide()
self.tooltip.SetDelay(100) # set popup delay in ms
self.SetToolTip(self.tooltip) # connect tooltip to canvas

# self.Bind(wx.EVT_LEFT_DOWN, self.OnLeft)
self.Bind(wx.EVT_MOTION, self.OnMove)

self.MoveTip = None

def OnMove(self, event=None):
self.tooltip.SetTip(tip='x=%f, y=%f' % (event.GetX(), event.GetY()))



class DemoFrame(wx.Frame):
 This window displays a button 
def __init__(self, title = Micro App):
wx.Frame.__init__(self, None , -1, title)

MenuBar = wx.MenuBar()

FileMenu = wx.Menu()

item = wx.MenuItem(FileMenu, text = Quit)
FileMenu.AppendItem(item)
self.Bind(wx.EVT_MENU, self.OnQuit, item)

MenuBar.Append(FileMenu, File)
self.SetMenuBar(MenuBar)

P = DemoPanel(self)


self.Fit()

def OnQuit(self,Event):
self.Destroy()

app = wx.App()
frame = DemoFrame()
frame.Show()
app.MainLoop()



-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] tooltips in matplotlib?

2006-09-13 Thread Martin Spacek
Just gave it a try, and yes, the tooltip tracks the mouse perfectly for 
me on my win32 install.

Martin

Christopher Barker wrote:
 once running, it's not working quite right: the tooltip always is at 
 the bottom of the Window, though it does track the X location.

 Hm, dunno. I'm running win32 (winxp), Python 2.4.3.
 
 Maybe try updating your wx install.
 
 I've tried with 2.6.3, same result.
 
 I think this is a platform issue: I expect that GTK is putting the 
 tooltip at the bottom of the wx.Window it's on. this is really to bad, 
 as with larger Windows, that might not be what you want.
 
 In fact, I have a need to add tooltips to a wx.lib.floatcanvas based 
 app, a I need to be able to place them where I need. I guess I'll send a 
 note to wxpython-users about this.
 
 I've enclosed a wxpython tiny test app, to isolate matplotlib issues. It 
 has the same behavior. does the tooltip follow the mouse on Windows (or 
 OS-X)
 
 -Chris

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users