{"action":"created","issue":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/3898","labels_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/3898/labels{/name}","comments_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/3898/comments","events_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/3898/events","html_url":"https://github.com/matplotlib/matplotlib/issues/3898","id":51214459,"number":3898,"title":"axes3d.py error when using lines3d and surface3d demos ","user":{"login":"jmccormac01","id":1912007,"avatar_url":"https://avatars.githubusercontent.com/u/1912007?v=3","gravatar_id":"","url":"https://api.github.com/users/jmccormac01","html_url":"https://github.com/jmccormac01","followers_url":"https://api.github.com/users/jmccormac01/followers","following_url":"https://api.github.com/users/jmccormac01/following{/other_user}","gists_url":"https://api.github.com/users/jmccormac01/gists{/gist_id}","starred_url":"https://api.github.com/users/jmccormac01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmccormac01/subscriptions","organizations_url":"https://api.github.com/users/jmccormac01/orgs","repos_url":"https://api.github.com/users/jmccormac01/repos","events_url":"https://api.github.com/users/jmccormac01/events{/privacy}","received_events_url":"https://api.github.com/users/jmccormac01/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2014-12-07T10:57:47Z","updated_at":"2015-01-29T17:31:34Z","closed_at":null,"body":"Hi, I recently grabbed the 1.5.x version of matplotlib from github and get some errors when using the 3d plotting demos on the matplotlib website. See below for an output. I am running python 2.7.8_2 from homebrew. I get the same error for both demo scripts. Has something changed in 1.5.x such that the demos are calling things differently?\r\n\r\nThe plotting window appears but shows nothing inside, accept for a line along the x axis at z=0. See image attached. \r\n\r\nCheers\r\nJames\r\n\r\nMac OS X 10.10.1 Yosemite\r\n\r\nJames@Jamess-MBP> python -i lines3d_demo.py\r\nTraceback (most recent call last):\r\n  File \"/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib-1.5.x-py2.7-macosx-10.10-x86_64.egg/matplotlib/artist.py\", line 59, in draw_wrapper\r\n    draw(artist, renderer, *args, **kwargs)\r\n  File \"/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib-1.5.x-py2.7-macosx-10.10-x86_64.egg/matplotlib/figure.py\", line 1090, in draw\r\n    func(*args)\r\n  File \"/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mpl_toolkits/mplot3d/axes3d.py\", line 273, in draw\r\n    ax.draw(renderer)\r\n  File \"/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mpl_toolkits/mplot3d/axis3d.py\", line 264, in draw\r\n    self.axes.transAxes.transform(peparray[0:2, 0]))\r\nValueError: Expected 2-dimensional array, got 1\r\n\r\nafter a few seconds with the figure open this appears:\r\n\r\n/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mpl_toolkits/mplot3d/axes3d.py:1094: FutureWarning: comparison to `None` will result in an elementwise object comparison in the future.\r\n  if self.button_pressed in self._rotate_btn:\r\n\r\n![screen shot 2014-12-07 at 11 00 06](https://cloud.githubusercontent.com/assets/1912007/5330720/5b9cae90-7e00-11e4-9e01-e89e7d929440.png)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/comments/72067563","html_url":"https://github.com/matplotlib/matplotlib/issues/3898#issuecomment-72067563","issue_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/3898","id":72067563,"user":{"login":"edonyM","id":7744664,"avatar_url":"https://avatars.githubusercontent.com/u/7744664?v=3","gravatar_id":"","url":"https://api.github.com/users/edonyM","html_url":"https://github.com/edonyM","followers_url":"https://api.github.com/users/edonyM/followers","following_url":"https://api.github.com/users/edonyM/following{/other_user}","gists_url":"https://api.github.com/users/edonyM/gists{/gist_id}","starred_url":"https://api.github.com/users/edonyM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edonyM/subscriptions","organizations_url":"https://api.github.com/users/edonyM/orgs","repos_url":"https://api.github.com/users/edonyM/repos","events_url":"https://api.github.com/users/edonyM/events{/privacy}","received_events_url":"https://api.github.com/users/edonyM/received_events","type":"User","site_admin":false},"created_at":"2015-01-29T17:31:34Z","updated_at":"2015-01-29T17:31:34Z","body":"I got the a problem which is similar. On Mac OSX10.10.2, brew python 2.7.9 and installing matplotlib with pip. When I plotting 3d, I got the problem.\r\n```py\r\n#--------------- plot3d function define in file plotData.py-----------------#\r\n def plot3d(x,y,J):                                                                                                                    \r\n      fig = plt.figure(2)\r\n      ax = Ax3(fig)\r\n      ax.plot_surface(x,y,J,rstride=5,cstride=5,cmap=cm.summer_r)\r\n      plt.show()\r\n#-------------- call the plot3d() and plot the 3d figure ------------------#                                                               \r\nprint('Visualizing J(theta_0, theta_1) ...\\n')\r\ntheta_0 = np.array([np.linspace(-10,10,num=100)])\r\ntheta_1 = np.array([np.linspace(-1,4,num=100)])\r\nJ_theta = np.array(np.empty((100,100)))\r\nfor i in range(100):\r\n    for j in range(100):\r\n        J_theta[i,j] = compC(x,y,[[theta_0[0,i]],[theta_1[0,j]]])\r\nfrom plotData import plot3d\r\nplot3d(theta_0,theta_1.T,J_theta)\r\n#------------ end of the code ------------#\r\n```\r\n\r\n`My 3d-figure can be plotted. There is a warning that upset me for my cursor put into the plotting area it will occur.`\r\n\r\n```py\r\n#------------ the warning error -------------#\r\nVisualizing J(theta_0, theta_1) ...\r\n\r\n/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mpl_toolkits/mplot3d/axes3d.py:1094: FutureWarning: comparison to `None` will result in an elementwise object comparison in the future.\r\n  if self.button_pressed in self._rotate_btn:\r\n```"}}