import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
data = [['yellow', -200,900 ], ['red',501,900],['red',900,900],['blue',701, 900], ['blue',950, 1000],['indigo',901,1000], ['indigo',1001,1200]]
df = pd.DataFrame(data, columns = ['Donor', 'Pre_Days','Post_Days'])
def vertical_line(x, **kwargs):
plt.axvline(x.min(), **kwargs)
g.map(vertical_line, 'Pre_Days',ls="--",color='g')
This is the script I am working with. Running this script gives only the minimum value for each color, donor. Instead of giving only the min value for each donor, how can I change the code to draw all the lines for each donor? For example, red should have two lines, x=501 and x=900. For blue, x=701 and x=905. For indigo x=901 and x=1001.