[matplotlib-devel] 3D Axes scatter : no possibility to vary color/size of markers

2009-11-13 Thread luc Estebanez
Dear All,

I am trying to use the new 3D facilities offered by Matplotlib.
I know the mlab module of Mayavi, but I am interested in the vector 
export facilities offered by matplotlib.

Here is my issue : I can't manage to vary the color and/or size of the 
markers when doing 3D scatter plots :

fig = plt.figure()
ax = Axes3D(fig)
ax.scatter([1,2,3],[3,1,2],[1,2,0],c='r',s=[4,10,20])

The code above doesn't show size changes for each marker, just like :

ax.scatter([1,2,3],[3,1,2],[1,2,0])

Does anyone have an idea of what is going on ?

Thanks a lot,
luc

(I already posted this issue on the user list, but it seems to be a bug, 
and no one their seemed very interested in this  issue either...)



---
luc Estebanez
Graduate Student,
ENS, Paris

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Enhancement to matplotlib's PyQt4 backend

2009-11-13 Thread Darren Dale
No, unfortunately I have not had time to review the patch. It is on my list.

On Mon, Nov 9, 2009 at 3:47 PM, Gökhan Sever gokhanse...@gmail.com wrote:
 Darren,

 Have you happened to review Pierre's patch for the toolbar
 improvement? I am interested to see this integrated in mpl soon.

 Thanks.

 On Mon, Nov 9, 2009 at 2:43 PM, Pierre Raybaut cont...@pythonxy.com wrote:
 Hi,

 I've already sent everything to Darren. I don't have any news but I
 guess that it will be integrated soon.

 Pierre

 2009/11/9 Gökhan Sever gokhanse...@gmail.com:
 Hi Pierre,

 What is the latest status on this improvement? Will you give a patch
 to the matplotlib?

 Please let me know.

 Thanks

 On Sat, Jun 6, 2009 at 9:49 AM, Pierre Raybaut cont...@pythonxy.com wrote:
 2009/4/28 Dave Peterson dpeter...@enthought.com:
 Darren Dale wrote:

 On Tue, Apr 28, 2009 at 12:19 PM, Pierre Raybaut cont...@pythonxy.com
 wrote:

 2009/4/28 John Hunter jdh2...@gmail.com:
 
 
  On Tue, Apr 28, 2009 at 8:18 AM, Pierre Raybaut cont...@pythonxy.com
  wrote:
 
  Hi all,
 
  I would like to contribute to matplotlib with this enhancement for the
  PyQt4 backend: the idea is to add a toolbar button to configure figure
  options (axes, curves, ...).
 
  It's based on a tiny module called formlayout to generate PyQt4 form
  dialog automatically.
 
  Some screenshots:
  http://code.google.com/p/formlayout/
 
  So, if you're interested (all the following is GPL2):
 
  *matplotlib patch*
 
  In FigureManagerQT.__init__, added:
  self.canvas.axes = self.canvas.figure.add_subplot(111)
 
  In NavigationToolbar2QT._init_toolbar, added:
  a = self.addAction(self._icon(customize.png), 'Customize',
  self.edit_parameters)
  a.setToolTip('Edit curves line and axes parameters')
 
  Added the following method in NavigationToolbar2QT:
  def edit_parameters(self):
     from figureoptions import figure_edit
     figure_edit(self.canvas, self)
 
  *additionnal modules and data*
 
  formlayout.py (http://code.google.com/p/formlayout/)
  figureoptions.py (http://code.google.com/p/PyQtShell/)
  customize.png (http://code.google.com/p/PyQtShell/)
 
  Hi Pierre -- this looks very nice (the last link is broken though , I
  get a
  404 error).  We would be happy to include this in matplotlib or as a

 Here is the last link:
 http://code.google.com/p/pyqtshell/

  toolkit.  To contribute it to to mpl,  the license needs to be
  matplotlib
  compatible
  (http://matplotlib.sourceforge.net/devel/coding_guide.html#licenses) 
  but
  we
  have more licensing flexibility in a toolkit, though we prefer to keep
  everything BSD compatible where possible.   And of course you would 
  need
  to
  agree to maintain it :-) but I think many users would appreciate a GUI
  plot
  configuration dialog.

 I was not aware of this license restriction in matplotlib... I fully
 understand the motivation, of course, but still: I wrote all this on
 my free time which means no PyQt4 commercial license, so it can't be
 anything but GPL. Sorry...

 I think you have overlooked a subtlety of PyQt4's license. The author of
 PyQt4 wrote on the enthought-dev mailing list:

 PyQt is GPL but has exceptions that allow it to be used with BSD code -
 hence it's Ok for TraitsBackendQt to be BSD.

 However, the exception imposes additional conditions which, to all intents
 and purposes, infects the code with the GPL. To be fair to people that
 should be made clear in any text.

 It's still a good idea for TraitsBackendQt to use a BSD license because it
 allows commercial (ie. non-GPL) users to use it without problems.

 Darren

 I think it might be worth contacting the PyQt folks (Phil Thompson) about
 this.  I think there might be some differences here because Phil was the
 author of TraitsBackendQt and thus his efforts didn't quite fall under the
 develop under a free license, your results needs to be GPL clause 
 Qt/PyQt
 have in their licensing.

 -- Dave



 Hi all,

 Dave, you are absolutely right.

 Last week-end, I found myself surfing on PyQt's website and I told to
 myself: what about re-reading the license? (always a pleasure) And
 surprisingly, I found out that anyone using the GPL version of PyQt
 can release source code under a very permissive license (like MIT or
 BSD) thanks to the PyQt-GPL Exception, as long as PyQt itself is not
 part of the distributed package (otherwise the whole package has to be
 licensed under GPL) - and with other little restrictions. It was a
 surprise because I've read here and there a lot of things on PyQt
 license and the general idea was if you write PyQt code without the
 commercial license, your code *must* be licensed under GPL - I can
 tell now that it's not true (to be absolutely certain about it, I even
 asked to Phil Thompson to confirm this, and he did).

 So, I switched all the code I was referring to in my original e-mail
 to MIT license.
 I guess now it could be integrated to matplotlib Qt4 backend?

 formlayout (generate option dialogs):
 

[matplotlib-devel] griddata bug

2009-11-13 Thread James Conners
Hi,

I did a quick search of the archives and didn't find anything so here's a
post of what I'm pretty sure is a bug in griddata of matplotlib.mlab:
Matplotlib version: 0.99.1.1


mlab.py: Line 2527

if hasattr(z,'mask'):
x = x.compress(z.mask == False)
y = y.compress(z.mask == False)
z = z.compressed()


This throws up if you have a scalar mask of 'False', which would happen for
instance after numpy.ma.masked_equal() where no values were masked.

A simple fix would be:

if (hasattr(z, 'mask)):
if (hasattr(z.mask, 'ndim')):
x = x.compress(z.mask == False)
y = y.compress(z.mask == False)
z = z.compressed()

Not sure what the best numpy array attribute would be to check for.

Thanks,
James
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel