79816260

Date: 2025-11-11 05:42:45
Score: 0.5
Natty:
Report link

I don't think it is possible to use dataclasses.

Lists do work

list_temp = [1, 2, 4, 8, 16, 32]
list_press = [1, 3, 9, 27, 81, 243]


sns.lineplot(data={'Temperature': list_temp, 'Pressure': list_press})

You can also nest the lists ...

hourly_reading = [list_temp, list_press]
sns.lineplot(data=hourly_reading)

... however you lose the series names. In the legend they will appear as generic index numbers (0, 1, 2 ...)

Dictionaries work quite well

met_dict = {"Temperatures": list_temp, "Pressures": list_press}
sns.lineplot(met_dict)
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: timelessbeing