Footprint Style Stacked Bar Chart Using Matplotlib - python

I want to create a chart like the one given below. how can I achieve something like that in matplotlib.
.

Related

How can I use plotly or any other library to plot a pie chart like this?

I'm trying to create a pie chart that looks like the below. The data is irrelevant as it's the colours and style I'm after.
I can create pie charts that look more like the below but wanted something that looks much better like the one above.
I'm currently using plotly - is it possible to create this pie chart using this library or would I need something else?
For reference, this is the code I currently have:
pie_chart_1 = px.pie(df_all_tests,
values='Total',
names='Package',
title='Auto tests per package',
color='Package',
color_discrete_map=c,
hole=0.6)
pie_chart_1.update_layout(legend=dict(
yanchor='top',
y=0.99,
xanchor='left',
x=0.80,
))
pie_chart_1.update_traces(marker=dict(line=dict(color='#FFFFFF', width=0.7)))

Stacked bar chart in matplotlib without hardcoding the fields

I am trying to create a simple stacked bar chart using this data using ONLY matplotlib, pandas and numpy:
x-axis: Month
Labels: activity type
Height: distance
The examples I see, loop over the x-axis, but labels are always hard coded.
Can we loop over everything? In other words, can I create a chart without modifying this table:
No group by or pivot, just use the table as is and get the chart using matplotlib, pandas and numpy only (learning those at the moment)

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.
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.

Plotting a grouped stacked bar chart

I am trying to create a grouped, stacked bar chart. I was able to do it in excel and this image shows what I am trying to create but I want to do it through Python. I have all the data in a pandas data frame that is able to create separate stacked bar charts but I cannot get the grouping as seen in excel.
Excel Formatting:
If you could do it in Excel with easy then I strongly suggest you to do it with Excel. Unless you have other requirements.
There are many libraries you can use to create this type of plot: matplotlib, seaborn, or plotly. The one I use most is plotly. You can see the list of sample figures of plotly here: https://plotly.com/python/
Or you can join plotly community, there are many pros there might help with figure. I find there is few pros on figures in stackoverflow to plotly community: https://community.plotly.com/

How to draw a combo chart in Python using matplotlib?

I have a dataset that looks like this:
data
And I am wondering how to draw an area chart like the following in python using matplotlib:
area chart example
Use matplotlib.pyplot.stackplot(x,y1,y2,y3)
example code
x=numpy.arange(len(y1))
y1=[1,2,3,4]
y2=[4,3,2,1]
matplotlib.pyplot.stackplot(x,y1,y2)

Categories