Re: [Matplotlib-users] TypeError: unsupported operand type(s) for +: 'NoneType' and 'float' on 1.2.1

2013-11-18 Thread Gregorio Bastardo
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] TypeError: unsupported operand type(s) for +: 'NoneType' and 'float' on 1.2.1

2013-07-22 Thread Brian Baughman
Greetings all,

I have this problem now as well. I use a Mac with Canopy installed and it was 
working fine until I recently updated my packages and got the new matplotlib. 
The code which reproduces this error for me is very simple:

{{{
x = scipy.random.normal(0,1,100)

f = figure(num=1)
f.clear()
ax = f.add_subplot(111)
ns,bns,plt0  = ax.hist(x,bins=10,log=True)
plt1 = ax.bar(bns[0:-1],ns,width=bns[1:]-bns[0:-1],color='r',log=True)
draw()
}}}


The code works fine if one comments out the ax.bar usage but fails otherwise. I 
have tried multiple different kwargs or removing the second log=True and all 
result in the same TypeError.

Regards,
Brian



On Apr 18, 2013, at 12:42 PM, Michael Droettboom md...@stsci.edu wrote:

 Can you please provide a complete, minimal and self-contained script 
 that reproduces the error?  The example below has many undefined 
 variables etc.
 
 Cheers,
 Mike
 
 On 04/16/2013 07:09 PM, Christophe Pettus wrote:
 # preamble code collecting data
 
 ind = np.arange(len(table_name))
 
 width = 0.35
 
 fig = plot.figure(figsize=DEFAULT_FIGURE_SIZE)
 ax = fig.add_subplot(111, axisbg='#fafafa', alpha=0.9)
 
 ax.set_title('Largest Tables')
 
 ax.set_xlabel('Size (log scale)')
 
 ax.set_xscale('log')
 ax.grid(True)
 
 ax.xaxis.set_major_formatter(FuncFormatter(magnitude_ticks))
 
 dbar = ax.barh(ind, data_size, width, linewidth=0, color='blue', 
 label='Main Data')  # exception here
 ibar = ax.barh(ind, index_toast_size, width, left=data_size, 
 linewidth=0, color='red', label='Toast/Indexes')
 ax.set_yticks(ind + width/2)
 ax.set_yticklabels(table_name, fontproperties=xx_small_font)
 
 ax.legend(loc='lower right', prop=x_small_font)
 
 plot.tight_layout()
 
 plot.savefig(REPORT_DIR_PATH + '/table_sizes.pdf')
 
 plot.close()
 
 
 --
 Precog is a next-generation analytics platform capable of advanced
 analytics on semi-structured data. The platform includes APIs for building
 apps and a phenomenal toolset for data science. Developers can use
 our toolset for easy data analysis  visualization. Get a free account!
 http://www2.precog.com/precogplatform/slashdotnewsletter
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users



smime.p7s
Description: S/MIME cryptographic signature
--
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] TypeError: unsupported operand type(s) for +: 'NoneType' and 'float' on 1.2.1

2013-04-18 Thread Michael Droettboom
Can you please provide a complete, minimal and self-contained script 
that reproduces the error?  The example below has many undefined 
variables etc.

Cheers,
Mike

On 04/16/2013 07:09 PM, Christophe Pettus wrote:
 # preamble code collecting data

  ind = np.arange(len(table_name))
  
  width = 0.35
  
  fig = plot.figure(figsize=DEFAULT_FIGURE_SIZE)
  ax = fig.add_subplot(111, axisbg='#fafafa', alpha=0.9)
  
  ax.set_title('Largest Tables')
  
  ax.set_xlabel('Size (log scale)')
  
  ax.set_xscale('log')
  ax.grid(True)
  
  ax.xaxis.set_major_formatter(FuncFormatter(magnitude_ticks))

  dbar = ax.barh(ind, data_size, width, linewidth=0, color='blue', 
 label='Main Data')  # exception here
  ibar = ax.barh(ind, index_toast_size, width, left=data_size, 
 linewidth=0, color='red', label='Toast/Indexes')
  ax.set_yticks(ind + width/2)
  ax.set_yticklabels(table_name, fontproperties=xx_small_font)

  ax.legend(loc='lower right', prop=x_small_font)

  plot.tight_layout()
  
  plot.savefig(REPORT_DIR_PATH + '/table_sizes.pdf')

  plot.close()


--
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis  visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] TypeError: unsupported operand type(s) for +: 'NoneType' and 'float' on 1.2.1

2013-04-16 Thread Christophe Pettus
After upgrading to 1.2.1 from 1.1, I'm getting an exception on the below-noted 
line; any thoughts what might have changed?

  File /Users/xof/Documents/Dev/tuneup/reports/tables.py, line 60, in 
table_sizes
dbar = ax.barh(ind, data_size, width, linewidth=0, color='blue', 
label='Main Data')
  File 
/Users/xof/Documents/Dev/environments/tuneup/lib/python2.6/site-packages/matplotlib/axes.py,
 line 5021, in barh
orientation='horizontal', **kwargs)
  File 
/Users/xof/Documents/Dev/environments/tuneup/lib/python2.6/site-packages/matplotlib/axes.py,
 line 4901, in bar
self.add_patch(r)
  File 
/Users/xof/Documents/Dev/environments/tuneup/lib/python2.6/site-packages/matplotlib/axes.py,
 line 1570, in add_patch
self._update_patch_limits(p)
  File 
/Users/xof/Documents/Dev/environments/tuneup/lib/python2.6/site-packages/matplotlib/axes.py,
 line 1588, in _update_patch_limits
xys = patch.get_patch_transform().transform(vertices)
  File 
/Users/xof/Documents/Dev/environments/tuneup/lib/python2.6/site-packages/matplotlib/patches.py,
 line 581, in get_patch_transform
self._update_patch_transform()
  File 
/Users/xof/Documents/Dev/environments/tuneup/lib/python2.6/site-packages/matplotlib/patches.py,
 line 577, in _update_patch_transform
bbox = transforms.Bbox.from_bounds(x, y, width, height)
  File 
/Users/xof/Documents/Dev/environments/tuneup/lib/python2.6/site-packages/matplotlib/transforms.py,
 line 786, in from_bounds
return Bbox.from_extents(x0, y0, x0 + width, y0 + height)
TypeError: unsupported operand type(s) for +: 'NoneType' and 'float'

The code is:

# preamble code collecting data

ind = np.arange(len(table_name))

width = 0.35

fig = plot.figure(figsize=DEFAULT_FIGURE_SIZE)
ax = fig.add_subplot(111, axisbg='#fafafa', alpha=0.9)

ax.set_title('Largest Tables')

ax.set_xlabel('Size (log scale)')

ax.set_xscale('log')
ax.grid(True)

ax.xaxis.set_major_formatter(FuncFormatter(magnitude_ticks))

dbar = ax.barh(ind, data_size, width, linewidth=0, color='blue', 
label='Main Data')  # exception here
ibar = ax.barh(ind, index_toast_size, width, left=data_size, linewidth=0, 
color='red', label='Toast/Indexes')
ax.set_yticks(ind + width/2)
ax.set_yticklabels(table_name, fontproperties=xx_small_font)

ax.legend(loc='lower right', prop=x_small_font)

plot.tight_layout()

plot.savefig(REPORT_DIR_PATH + '/table_sizes.pdf')

plot.close()

--
-- Christophe Pettus
   x...@thebuild.com


--
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis  visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users