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)
Related
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)))
I have a plotly stacked histogram like this:
I would like to click one part of the graph(for instance, one blue part) and get the data for that part for another graph. I have tried the callback function: def update_point(trace, points, selector)
It seems to work fine with barplot and scatterplot but not with histogram. Can anyone help me with that?
I want to create a chart like the one given below. how can I achieve something like that in matplotlib.
.
I am using plotly in Python 2.7 to produce Gantt charts like -
But instead of filling the individual bars with color, I wish to fill them with different patterns so that it can be read even when printed in grey scale.
Is there a way to do that in Plotly? If not what other Python packages can do it?
Thanks!
I would like to plot multiple pie charts over an existing plot using absolute coordinates.
I went through the add_axes method and also the AxesGrid toolikt but couldn't find a solution.
To be more specific, I want to draw pie charts over a geographical map using the basemap module.
This tutorial explains how to use matplotlib Basemap for drawing pie charts on a map. It is fairly simple and gives code examples.