i believe the answer of this question might exist already. but since i cannt express/write the question in the perfect terminology i am having an issue getting an answer.
so my question is, i have lets say 10 devices each one have its own dataframe sets(python,pandas), and each device has an expiry date as a number. how can i graph some of the datasets from each device as a line with a color which indicate it's expiry data with lets say higher than 1000+ days is red and it gose down to grey at 50 days
i will write a minimal reproducible example:
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
device_expiry_date = np.array([101, 220, 1000, 43, 592,603,599,499,299,100])
for i in range(10):
random_data = np.random.randint(10, 25, size=5)
df = pd.DataFrame(random_data, columns=['Capacity'])
plt.plot(df['Capacity'])
so i want each line color to represent how high the expiry date is by somekind of a color gradient or a better option if it exists