Re: [Matplotlib-users] Qt4 on OSX
--- On Wed, 3/16/11, Daniel Welling wrote: After playing with backends quite a bit, I have found that the best one in terms of speed, robustness, and features is Qt4Agg - especially on OSX, where the MacOSX backend is buggy and many others just don't plain work. Why do you think that the MacOSX backend is buggy? --Michiel. -- Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] python3 svn branch dead?
Hi, It looks like the http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/branches/py3k/ in dead. The last commit was 8months ago. Numpy is ok with python3.1, scipy is ok, nose is ok, ipython is usable. Ubuntu already provides python-tk for python3.x It would be nice to port matplotlib to python3. Is there a plan? another svn/git branch? Xavier -- Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] python3 svn branch dead?
On Sun, Mar 20, 2011 at 2:08 PM, Xavier Gnata wrote: > Hi, > > It looks like the > http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/branches/py3k/ > in dead. > The last commit was 8months ago. > > Numpy is ok with python3.1, scipy is ok, nose is ok, ipython is usable. > Ubuntu already provides python-tk for python3.x > It would be nice to port matplotlib to python3. > Is there a plan? another svn/git branch? https://github.com/matplotlib/matplotlib-py3 -- Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Changing xlabel/ylabel position
Hello all, I am trying to change the position of the xlabel/ylabel with respect to the xaxis/yaxis. Particularly, I was trying to get the "xlabel" closer to the "xaxis" and the "ylabel" closer to the "yaxis", for which I was using the lines indicated with '#<---' in the following sample code: # from pylab import * from numpy import * x = linspace(0,1,10) y = x**2 plot(x, y) xlabel('xname', position=(0.5,0.1)) #<-- ylabel('yname', position=(0.1,0.5)) #<-- # My understanding was that "position=(xpos,ypos)" would place the label anywhere I wanted, though there is problem. Let me take "xlabel" as an example. I can successfully move the "xlabel" parallel to the "xaxis" by setting the quantity "xpos" anywhere from 0 to 1 (0.5 being the center of the "xaxis"). However, for moving the "xlabel" closer to or further from the "xaxis" I change the value of "ypos" but it does NOT do anything, i.e. the "xlabel" stays at the same distance from the "xaxis". The equivalent problem occurs with the "ylabel", i.e. I can move "ylabel" parallel to the "yaxis" but I cannot get it any closer. I am aware that I can "create a label" and place it anywhere by using the text() command. Yet, it would be better if I can get the label placement done with the xlabel/ylabel command so that I can eventually control the label placement via rcParams.update(). Many thanks in advance. carlo -- View this message in context: http://old.nabble.com/Changing-xlabel-ylabel-position-tp31195337p31195337.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] In mplot3d, how is format_zdata supposed to work? Why is sensible_format_data called?
Hi all, I am using Matplotlib 1.0.1 and am seeing weird behaviour with mplot3d and ticker formatters, and I think I need to submit a patch to axes3d, but am not sure how much it will break, because format_zdata() and format_coord() look to be defined inconsistently. When trying to rotate a plot, which was created including the following commands, ... ax.plot(x[0,alow:atop],x[1,alow:atop],x[2,alow:atop],c=rgb.tolist()) ax.w_xaxis.set_major_locator(tic.LinearLocator(3)) ax.w_xaxis.set_major_formatter(tic.FormatStrFormatter('')) ax.w_yaxis.set_major_locator(tic.LinearLocator(3)) ax.w_yaxis.set_major_formatter(tic.FormatStrFormatter('')) ax.w_zaxis.set_major_locator(tic.LinearLocator(3)) ax.w_zaxis.set_major_formatter(tic.FormatStrFormatter('')) plt.draw() ... I received the following backtrace and error message: /usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyc in mouse_move(self, event) 2393 if event.inaxes and event.inaxes.get_navigate(): 2394 -> 2395 try: s = event.inaxes.format_coord(event.xdata, event.ydata) 2396 except ValueError: pass 2397 except OverflowError: pass /usr/lib64/python2.6/site-packages/mpl_toolkits/mplot3d/axes3d.pyc in format_coord(self, xd, yd) 474 475 xs = self.format_xdata(x) --> 476 ys = self.format_ydata(y) 477 zs = self.format_ydata(z) 478 return 'x=%s, y=%s, z=%s' % (xs, ys, zs) /usr/lib64/python2.6/site-packages/mpl_toolkits/mplot3d/axes3d.pyc in format_ydata(self, y) 424 except TypeError: 425 fmt = self.w_yaxis.get_major_formatter() --> 426 return sensible_format_data(fmt, y) 427 428 def format_zdata(self, z): /usr/lib64/python2.6/site-packages/mpl_toolkits/mplot3d/axes3d.pyc in sensible_format_data(self, value) 26 if abs(value) > 1e4 or abs(value)<1e-3: 27 s = '%1.4e' % value ---> 28 return self._formatSciNotation(s) 29 else: 30 return '%4.3f' % value AttributeError: FormatStrFormatter instance has no attribute '_formatSciNotation' --- I am using FormatStrFormatter('') to try to obtain an empty tick. [1] It looks like sensible_format_data() assumes that self is class ScalarFormatter(Formatter), since this is the only ticker Formatter that has attribute _formatSciNotation(s). As far as I can tell, this means that sensible_format_data(fmt,y) should *only* be called if fmt has class ScalarFormatter(Formatter). [2] In axes3d.py, I see: def format_zdata(self, z): """ Return z string formatted. This function will use the attribute self.fmt_zdata if it is callable, else will fall back on the yaxis major formatter """ try: return self.fmt_zdata(z) except (AttributeError, TypeError): fmt = self.w_zaxis.get_major_formatter() return sensible_format_data(fmt, z) To me, it looks like the call to sensible_format_data(fmt, z) is wrong. The same error occurs in format_xdata() and format_ydata(). So I would like to submit a patch for format_xdata(), format_ydata(), format_zdata(), e.g.: def format_zdata(self, z): """ Return z string formatted. This function will use the attribute self.fmt_zdata if it is callable, else will fall back on the zaxis major formatter """ try: return self.fmt_zdata(z) except (AttributeError, TypeError): fmt = self.w_zaxis.get_major_formatter() try: return sensible_format_data(fmt, z) except (AttributeError, TypeError): return format_data(fmt, z) [3] But I am also worried about the comment "else will fall back on the yaxis major formatter". Shouldn't this say "the zaxis major formatter", since that is what the code does? Or should the code use the yaxis major formatter, since that is what the documentation says? The documentation http://matplotlib.github.com/mpl_toolkits/mplot3d/api.html agrees with the comment and not with the code. [4] In def format_coord(self, xd, yd), I see xs = self.format_xdata(x) ys = self.format_ydata(y) zs = self.format_ydata(z) Why doesn't the last line say zs = self.format_zdata(z) ? Best, Paul -- Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] python3 svn branch dead?
On 03/20/2011 07:19 PM, Darren Dale wrote: > On Sun, Mar 20, 2011 at 2:08 PM, Xavier Gnata wrote: >> Hi, >> >> It looks like the >> http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/branches/py3k/ >> in dead. >> The last commit was 8months ago. >> >> Numpy is ok with python3.1, scipy is ok, nose is ok, ipython is usable. >> Ubuntu already provides python-tk for python3.x >> It would be nice to port matplotlib to python3. >> Is there a plan? another svn/git branch? > https://github.com/matplotlib/matplotlib-py3 Thanks! AFAICS it works already well with the tk backend :) Are you interested in more testing with another backend? Xavier -- Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] python3 svn branch dead?
On Sun, Mar 20, 2011 at 8:52 PM, Xavier Gnata wrote: > On 03/20/2011 07:19 PM, Darren Dale wrote: >> >> On Sun, Mar 20, 2011 at 2:08 PM, Xavier Gnata >> wrote: >>> >>> Hi, >>> >>> It looks like the >>> http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/branches/py3k/ >>> in dead. >>> The last commit was 8months ago. >>> >>> Numpy is ok with python3.1, scipy is ok, nose is ok, ipython is usable. >>> Ubuntu already provides python-tk for python3.x >>> It would be nice to port matplotlib to python3. >>> Is there a plan? another svn/git branch? >> >> https://github.com/matplotlib/matplotlib-py3 > > Thanks! > AFAICS it works already well with the tk backend :) > Are you interested in more testing with another backend? Mike D. put a wiki page together summarizing where things stand and listing outstanding issues: https://github.com/matplotlib/matplotlib-py3/wiki -- Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Qt4 on OSX
Hello, Michiel. The OSX backend used to have a bug where you cannot type a name in the file name text box. Since that has been fixed, I have found a new bug: every so often, when you go to save a file, the "save" and "cancel" button stop responding, trapping the user in file saving limbo. I'll have to play with it again to figure out what triggers this. Other than that, the OSX backend is light and quick, which is nice. When QT4 is working, however, I prefer that. Sorry I can't give you more details; I'll see if I can get a clearer picture. -dw On Sun, Mar 20, 2011 at 1:31 AM, Michiel de Hoon wrote: > --- On *Wed, 3/16/11, Daniel Welling * wrote: > > After playing with backends quite a bit, I have found that the best one in > terms of speed, robustness, and features is Qt4Agg - especially on OSX, > where the MacOSX backend is buggy and many others just don't plain work. > > Why do you think that the MacOSX backend is buggy? > > --Michiel. > > > > > > -- Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Plotting multiple polygons as heatmaps?
I've been visualising some data using the pyplot fill function, and whilst overlapping polygons do mix their colours and allow for any overlaps to be apparent, I thought that perhaps this would look much better in a heatmap format to better show high levels of change in the same areas. I've tested this using the histogram2d function in numpy using various online examples, and whilst experiments with random data looked nice enough, each set of results data is basically a series of 0's and 1's: In a heatmap using the same code, this results in an incredibly long (since there's about 65000 results) heatmap that's only a pixel or two in height. Also, I can't seem to use the tools to zoom in and navigate around this, which is pretty much a requirement given the large number of data rows. Does anyone know if there's a way to convert a series of polygon objects into a decent looking heatmap? Any help is appreciated! Cheers! *Rohaq* -- Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users