Re: [Matplotlib-users] TypeError: unsupported operand type(s) for +: 'NoneType' and 'float' on 1.2.1
Hi, I experienced similar error under python 2.7.5 win32 after dirty-upgrading from mpl 1.2.1 to 1.3.1 (w/o first removing the old version). A clean install solved the problem. Cheers, Gregorio -- DreamFactory - Open Source REST JSON Services for HTML5 Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] numpy masked array plot - isolated single unmasked value is hidden
@Eric: thanks, i see the point @Jody: thanks for the trick, I'll first try Eric's approach 2013/7/18 Eric Firing efir...@hawaii.edu: On 2013/07/17 11:25 PM, Gregorio Bastardo wrote: Thanks Mike, it's hard to spot, but still better than nothing. Anyway, could it be the default behaviour of plotting masked arrays (single pixel for an isolated element)? Gregorio, I don't think this would be a good idea. It adds quite a bit of complexity for a special case--and inevitably, the next request from someone would be to have the option of using any marker for the isolated points. The concept of single pixel gets slippery across backends and output devices. A better solution would be a simple function to identify such isolated points, for use when needed, to plot such points however you choose, typically with a separate call to plot specifying a marker. This way, the extra complexity is called explicitly when needed, not carried along by every call to plot. Eric 2013/7/17 Michael Droettboom md...@stsci.edu: You could use a single pixel for a marker (','), I guess. But as you say, you need at least two points for a line segment. Mike On 07/17/2013 10:45 AM, Gregorio Bastardo wrote: Hi, The following example demonstrates the problem, value 5 could not be seen w/o marker: data = np.arange(10) mask = [0,0,0,1,1,0,1,0,0,0] x = np.ma.masked_array(data, mask) plot(x) plot(x, '+') In my datasets, isolated unmasked values are rare, but placing a marker to spot them makes the whole graph cluttered. I do realize that at least 2 valid points are needed for a line segment, but still, is there any way to visualize these isolated unmasked values w/o a marker? Thanks, Gregorio -- See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] numpy masked array plot - isolated single unmasked value is hidden
Thanks Mike, it's hard to spot, but still better than nothing. Anyway, could it be the default behaviour of plotting masked arrays (single pixel for an isolated element)? 2013/7/17 Michael Droettboom md...@stsci.edu: You could use a single pixel for a marker (','), I guess. But as you say, you need at least two points for a line segment. Mike On 07/17/2013 10:45 AM, Gregorio Bastardo wrote: Hi, The following example demonstrates the problem, value 5 could not be seen w/o marker: data = np.arange(10) mask = [0,0,0,1,1,0,1,0,0,0] x = np.ma.masked_array(data, mask) plot(x) plot(x, '+') In my datasets, isolated unmasked values are rare, but placing a marker to spot them makes the whole graph cluttered. I do realize that at least 2 valid points are needed for a line segment, but still, is there any way to visualize these isolated unmasked values w/o a marker? Thanks, Gregorio -- See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] numpy masked array plot - isolated single unmasked value is hidden
Hi, The following example demonstrates the problem, value 5 could not be seen w/o marker: data = np.arange(10) mask = [0,0,0,1,1,0,1,0,0,0] x = np.ma.masked_array(data, mask) plot(x) plot(x, '+') In my datasets, isolated unmasked values are rare, but placing a marker to spot them makes the whole graph cluttered. I do realize that at least 2 valid points are needed for a line segment, but still, is there any way to visualize these isolated unmasked values w/o a marker? Thanks, Gregorio -- See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] constrained rectangular zoom does not always work with Qt4 backend
Hi, I have problems with constrained rectangular zoom to x-y axis with PyQt4 / PySide backend. When I use the Zoom-to-rectangle button of the navigation toolbar while holding the x or y key, sometimes nothing happens when the mouse is released. Constrained panning and pan-zooming (Pan/Zoom button) works well. I used the following dummy code to set up the environment: import numpy as np import matplotlib as mpl if mpl.get_backend() != 'Qt4Agg': mpl.use('Qt4Agg') # mpl.rcParams['backend.qt4']='PySide' # mpl.rcParams['backend.qt4']='PyQt4' import matplotlib.pyplot as plt x = np.linspace(0,1) y = np.random.rand(x.size) fig = plt.figure() ax = fig.add_subplot(111) ax.plot(x,y) plt.show() Looking at the mail archives and the issue tracker gave me no relevant result. Has anyone experienced a similar issue? python 2.7.4 win32 matplotlib 1.1.1 and 1.2.1 PyQt4 QtCore 4.8.3 PySide QtCore 4.8.3 PySide 1.1.2 Thanks, Gregorio -- Try New Relic Now We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] legend marker update problem
Thanks, I opened an issue for it: https://github.com/matplotlib/matplotlib/issues/2035 2013/5/17 Sterling Smith smit...@fusion.gat.com: Gregorio, I'm glad that helped. I have not reported it on the issue tracker, but your case certainly has more of a bug with it (where it works sometimes, but not always), so I would recommend it. -Sterling On May 17, 2013, at 2:10AM, Gregorio Bastardo wrote: Hi Sterling, Thanks for the hint, using line._legmarker attribute solved the problem. I see the reason behind, however I still consider this as an incorrect behaviour, since marker toggling works in case the line is originally added to the legend without marker (so legend line and marker do not behave like separated). Is it worth reporting on the mpl issue tracker (or have you done it that time)? Gregorio 2013/5/16 Sterling Smith smit...@fusion.gat.com: Gregorio, I experienced a similar issue with trying to change the marker color. See below the previous response from JJ for accessing the legend marker or using a proxy artist. -Sterling -- Try New Relic Now We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] legend marker update problem
Hi Sterling, Thanks for the hint, using line._legmarker attribute solved the problem. I see the reason behind, however I still consider this as an incorrect behaviour, since marker toggling works in case the line is originally added to the legend without marker (so legend line and marker do not behave like separated). Is it worth reporting on the mpl issue tracker (or have you done it that time)? Gregorio 2013/5/16 Sterling Smith smit...@fusion.gat.com: Gregorio, I experienced a similar issue with trying to change the marker color. See below the previous response from JJ for accessing the legend marker or using a proxy artist. -Sterling -- AlienVault Unified Security Management (USM) platform delivers complete security visibility with the essential security capabilities. Easily and efficiently configure, manage, and operate all of your security controls from a single console and one unified framework. Download a free trial. http://p.sf.net/sfu/alienvault_d2d ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] legend marker update problem
Hi, I've recently come accross an issue when working on an interactive marker toggling callback. The problem is illustrated below: import matplotlib.pyplot as plt fig = plt.figure() ax = fig.add_subplot(111) line, = ax.plot(range(10), range(10)) # uncomment next line to reproduce bug # line.set_marker('d') legend = ax.legend([line], ['foo']) legend_line, = legend.get_lines() fig.show() raw_input('press enter to clear marker') line.set_marker('') legend_line.set_marker('') fig.canvas.draw() raw_input('press enter to set marker') line.set_marker('d') legend_line.set_marker('d') fig.canvas.draw() raw_input('press enter to exit') So when I add a line object to the legend *without marker*, the update works fine both on data and legend line, but *with marker* it does not refresh the legend line. I consider it as a bug, please tell me if I'm doing something wrong. python 2.7.4 win32 matplotlib 1.2.1 Thanks, Gregorio -- AlienVault Unified Security Management (USM) platform delivers complete security visibility with the essential security capabilities. Easily and efficiently configure, manage, and operate all of your security controls from a single console and one unified framework. Download a free trial. http://p.sf.net/sfu/alienvault_d2d ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users