question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Boxenplot warnings in the example

See original GitHub issue
>>> iris = sns.load_dataset("iris")
>>> ax = sns.boxenplot(data=iris, orient="h", palette="Set2")

When running the example above, I got the warning message below:

'c' argument looks like a single numeric RGB or RGBA sequence, which should be avoided as value-mapping will have precedence in case its length matches with 'x' & 'y'.  Please use a 2-D array with a single row if you really want to specify the same RGB or RGBA value for all points.
'c' argument looks like a single numeric RGB or RGBA sequence, which should be avoided as value-mapping will have precedence in case its length matches with 'x' & 'y'.  Please use a 2-D array with a single row if you really want to specify the same RGB or RGBA value for all points.
'c' argument looks like a single numeric RGB or RGBA sequence, which should be avoided as value-mapping will have precedence in case its length matches with 'x' & 'y'.  Please use a 2-D array with a single row if you really want to specify the same RGB or RGBA value for all points.
'c' argument looks like a single numeric RGB or RGBA sequence, which should be avoided as value-mapping will have precedence in case its length matches with 'x' & 'y'.  Please use a 2-D array with a single row if you really want to specify the same RGB or RGBA value for all points.

It does not return any exception, but I found it irritating as it appears everytime I run the code. I would like to suppress all warning messages as sometimes it could be important, but I do not really understand for this particular.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:8

github_iconTop GitHub Comments

14reactions
rene-rexcommented, Apr 25, 2019

As a workaround you can reduce the level of the axis logger to error:

from matplotlib.axes._axes import _log as matplotlib_axes_logger
matplotlib_axes_logger.setLevel('ERROR')
2reactions
Benfeitascommented, Aug 5, 2019

For those manually setting the colors, it seems that encasing the color in [brackets] solves this problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to suppress warnings when using boxplot()?
When I use the boxplot(), I get 2 warnings. The chart is displayed correctly, but 2 warnings appear. Here is my code:
Read more >
seaborn.boxenplot — seaborn 0.12.1 documentation - PyData |
This function always treats one of the variables as categorical and draws data at ordinal positions (0, 1, … n) on the relevant...
Read more >
Build a Box Plot - Tableau Help
To create a box plot that shows discounts by region and customer segment, follow these steps: Connect to the Sample - Superstore data...
Read more >
Salary_Prediction - Kaggle
... warnings import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt warnings.filterwarnings('ignore').
Read more >
Seaborn Release 0.9 Highlights - | notebook.community
This example has rows and columns ... default `kind` in `factorplot` (`'point'`) has changed `'strip'` in `catplot`. warnings.warn(msg) ... Try a boxplot.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found