I'm running into a very annoying issue that showed up recently in my code, perhaps because I've updated something that is interferring with my plot results.
I need to be able to produce complex lineplots that allow me to display a wide variety of labels within a database, such as the example below. However, if you notice, part of the legend shows up as a polygon instead of a line. I think there is some interference with the application of plt.legend over the previous code that I was unable to resolve... any suggestions?
dum = pd.DataFrame({'Type': ['X', 'X', 'Z', 'Z', 'Z', 'Y', 'Y', 'Y'], 'Element':['B','A','A', 'B','B','B', 'C','C'], 'Concentration': [25, 3, 3, 15, 6, 10, 4, 7]})
graph = sns.lineplot(data = dum, x='Element', y='Concentration', hue='Type')
plt.legend(labels=["Legend_1","Legend_2","Legend_3"])