How to do a custom line chart with pandas and matplotlib

i’m trying to make a a custom line chart, like this one :

, but I have no idea how to do it by matplotlib or seaborn because i’m new to it.
do you have any idea please ?

heres the dataframe :

data = {
  "value": [1, 2, 3,4],
  "date": ['Fev.24', 'Mar.24', 'Avr.24','Mai.24']
}
df = pd.DataFrame(data)

you could use your darafram example if you want to provide a sample line. thanks

function ax.fill_between() is what you are looking for:
https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.fill_between.html

import pandas as pd
import matplotlib.pyplot as plt

data = {
  "x": [1, 2, 3,4],
  "y1": [15,3,18,60],
  "y2": [17,20,35,10]
  }
df = pd.DataFrame(data)

fig, ax = plt.subplots()

ax.fill_between(df.x, df.y1, df.y2)
1 Like