id,node_id,number,title,user,state,locked,assignee,milestone,comments,created_at,updated_at,closed_at,author_association,active_lock_reason,draft,pull_request,body,reactions,performed_via_github_app,state_reason,repo,type 332987740,MDU6SXNzdWUzMzI5ODc3NDA=,2235,Adding surface plot for 2D data,35968931,closed,0,,,2,2018-06-16T13:36:10Z,2020-06-17T04:49:50Z,2020-06-17T04:49:50Z,MEMBER,,,,"I am interested in adding the ability to plot [surface plots](https://matplotlib.org/mpl_toolkits/mplot3d/tutorial.html#surface-plots) of 2D xarray data using matplotlib's 3D plotting function `plot_surface()`. This would be nice because a surface in 3D is much more useful for showing certain features of 2D data then color plots are. For example an outlier would appear as an obvious spike rather than just a single bright point as it would when using `plot.imshow()`. I'm not suggesting adding full 3D plotting capability, just the ability to visualise 2D data as a surface in 3D. The code would end up allowing you to just call `xr.Dataarray.plot.surface()` to create something like this example from [here](https://matplotlib.org/mpl_toolkits/mplot3d/tutorial.html#surface-plots) ([code here](https://matplotlib.org/mpl_examples/mplot3d/surface3d_demo.py)): ![Example surface plot](https://matplotlib.org/mpl_examples/mplot3d/surface3d_demo.png) Obviously xarray would be used to automatically set the axes labels and title and so on. As far as I can tell it wouldn't be too difficult to do, it would just be implemented as another 2D plotting method the same way as the `Dataarray.plot.imshow()`, `Dataarray.plot.contour()` etc methods currently are. It would require the imports ```python import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D ``` but these would only need to be imported if this type of plot was chosen. I would be interested in trying to add this myself, but I've never contributed to an open-source project before. Is this a reasonable thing for me to try? Can anyone see any immediate difficulties with this? Would I just need to have a go and then submit a pull request?","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/2235/reactions"", ""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue