Seaborn lineplot() में linestyle="dashed" पास करके डैश्ड लाइन बनाएं।
चरण
- फिगर साइज़ और ऑटोलेआउट सेट करें।
- रैंडम x, y डेटा जनरेट करें।
sns.lineplot(x=x, y=y, linestyle="dashed")से प्लॉट करें।plt.show()से दिखाएं।
उदाहरण कोड
import seaborn as sns
import numpy as np
from matplotlib import pyplot as plt
plt.rcParams["figure.figsize"] = [7.50, 3.50]
plt.rcParams["figure.autolayout"] = True
x = np.random.rand(10)
y = np.random.rand(10)
ax = sns.lineplot(x=x, y=y, linestyle="dashed")
plt.show()
आउटपुट
डैश्ड स्टाइल में Seaborn लाइन प्लॉट।