简体   繁体   中英

A 2D bar chart in a 3D chart using Plotly

I am trying to plot 2D bars in a Plotly 3D figure. I understand that Plotly's 3D figures do not yet support bar charts out of the box, but I have come across some examples from other people on the Plotly forums which have shown how this might be achieved.

Please see the post Adding a shape to a 3D plot . This is close to what I am trying to achieve, but I am not trying to plot a histogram.

It appears plotting traces as a mesh3d, adding in the missing points and triangulating is the way to go for Plotly's 3D chart, according to other examples I have seen. Below is an example of what I am looking for that I created using Matplotlib .

Matplotlib 3D 图表中的 2D 条形图

As you can see, x axis is the date, y axis is the trace name and z axis is the value. I would like to see if I can achieve something similar using Plotly's 3D charts, which are so much better of course because of the client side interactivity.

Is there a working example for what I'm trying to achieve? I am simply looking to plot simple (date, value) per trace as 2D bars in the 3D figure.

There isn't any current way to have a bar chart in 3D with Plotly (at least that I am aware of).

Documentation: Plotly Python Open Source Graphing Library 3D Charts

As shown in the documentation, there aren't any options for a bar chart. There are, however, alternatives like a bubble chart.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM