Can somebody tell me how can we create area charts with smooth lines (I am sorry I dont know what these are called) like this:
He @ghulam_shabbir_khan welcome to the forums.
This should get you started:
I think you can use line_shape = 'spline'
to make it look smoother. Something as below:
import pandas as pd
import plotly.express as px
df = px.data.stocks()
df = df.drop('AMZN', axis = 1)
colors = px.colors.qualitative.T10
fig = px.area(df,
x = 'date',
y = [c for c in df.columns if c != 'date'],
template = 'plotly_dark',
color_discrete_sequence = colors,
title = 'Stocks', line_shape='spline'
)
fig.show()
2 Likes