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.

How to silence 'seaborn.axisgrid.PairGrid at 0x...' when calling pairplot() in Jupyter Notebooks?

See original GitHub issue

A pairplot() call like

In [4]:
sns.pairplot(df, kind = 'scatter',diag_kind='kde')

will print out (before the plot) a message like

Out[4]:
seaborn.axisgrid.PairGrid at 0x...

I have many local examples of this. See also for example the same in some notebook on the web.

How can this message be silenced?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mwaskomcommented, Aug 20, 2021

Works. In practice, adding a title or else instructions in the same cell, there is still some output (not a pairplot()'s one).

Yeah, like I said it has nothing to do with seaborn specifically. If the last line in your cell has a return value, it will appear in the cell output.

1reaction
mwaskomcommented, Aug 19, 2021

This is a REPL output.

If you don’t want to see it, you can either:

  1. assign the output to a variable
  2. end the line in a semicolon
  3. add a no-return function like plt.show (which is not necessary in a notebook, but also has no bad side effects) at the end of the cell

Please use StackOverflow or discourse for usage questions, though — they’re more visible than github issues.

Read more comments on GitHub >

github_iconTop Results From Across the Web

seaborn.PairGrid — seaborn 0.12.1 documentation - PyData |
Subplot grid for plotting conditional relationships. Examples. Calling the constructor sets up a blank grid of subplots with each row and one column ......
Read more >
Remove axis titles from Seaborn PairGrid - Stack Overflow
Just loop through the subplots and clear the titles for each of them. import matplotlib.pyplot as plt import seaborn as sns iris ...
Read more >
pairplot seems to miss interpret strings such as '0' and '1' as ...
After casting a panda column from integers to string, pairplot keeps interpreting this column as containing numerical values it seems.
Read more >
Hacking Seaborn Grid Plots - Catherine's Auxiliary Brain
Most of the template graphs (such as pairplot), add a legend to the top level figure on being called, and this makes it...
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