1

I am processing x, y, and z data to have a floor map with high and lows. Z being a displacement sensor. I am having some difficulty plotting a good representation of my data. I am also fairly new to pandas and python in general. I have tried doing a contour plot with no luck, and I have only been able to plot my data using matplotlib as a 3d scatter as below. I tried looking into Bokeh as well using the surface3d extension, but I have not been successful. I would want to have my data shown in either a interactive 3d scatter or wireframe with gradients, and a contour plot. Thank you in advance!

[Jupyter Notebook Code. Omit comments. They are previous graphing attempts.]

1

[Jupyter Notebook Graph Result]

2

eshirvana
  • 23,227
  • 3
  • 22
  • 38
  • You use `%matplotlib nbagg` in notebook and `%matplotlib ipympl` in both notebook and lab. Those should make the matplotlib 3d plots interactive – Ianhi Jan 25 '22 at 21:00
  • for ipympl you will also need to `pip install ipympl` – Ianhi Jan 25 '22 at 21:00
  • Thank you. Just added it in, and it works! Is there a way to generate the plot in a much larger scale? It currently outputs in a tiny window under the cell. I would like to be able to analyze it with gradients in max and min points. – davidleal88 Jan 25 '22 at 21:04
  • I see on the ipympl figure plot, that I am able to download. It does not work though. Is there a way to download it? – davidleal88 Jan 25 '22 at 21:09
  • with ipympl there's a handle in th ebottom right that you can drag to make it bigger, you can also make the figure bigger. e.g. https://stackoverflow.com/a/70539176/835607 – Ianhi Jan 25 '22 at 21:09
  • I see. Thanks! What about downloading it, so I can send it to someone else? I would want it to be interactive for them without having them running Jupyter Notebook. – davidleal88 Jan 25 '22 at 21:19
  • HoloViews provides simple wrappers around Plotly's surface plotting components, which export to standalone HTML that's fully interactive. See e.g. http://holoviews.org/reference/elements/plotly/Surface.html – James A. Bednar Jan 25 '22 at 23:12
  • [Please do not upload images of code/errors when asking a question.](//meta.stackoverflow.com/q/285551) – Muhammad Mohsin Khan Feb 03 '22 at 15:34
  • Sorry I was new at the time – davidleal88 Feb 03 '22 at 21:48

0 Answers0