17

Is it possible to plot more than 6 columns using seaborn.lineplot?

When I try to plot it I receive following error message:

These `style` levels are missing dashes: {'LOGAN', 'HB20S', 'GOL'}

It works if I index the dataframe for 6 columns.

Here's the code that works:

sns.lineplot(data=movida_2.iloc[:,:6])
Thilo
  • 989
  • 1
  • 17
  • 27
Rafael
  • 181
  • 1
  • 1
  • 6
  • It's quite unlikely that seaborn would restrict plotting to 6 columns. But feel free to provide a [mcve] of the issue such that one can reproduce your problem. – ImportanceOfBeingErnest Oct 08 '18 at 20:53

2 Answers2

38

The problem is that lineplot uses dashed lines for the second and any further column but the standard style only supports dashes for the first 6 colors.

This should work for you:

sns.lineplot(data=movida_2, dashes=False)
Thilo
  • 989
  • 1
  • 17
  • 27
1
sns.lineplot(data=movida_2, marker = "0", dashes=False)

You can change the marker type as well.

Prax
  • 11
  • 2