wrong Y scale with pairgrid
See original GitHub issueFollowing code scales Y axis with small values wrong in half of cases:
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
df = pd.DataFrame(np.random.randn(100,4), columns=list('ABCD'))
df.A = df.A/1e6
df.B = df.B/1e3
df.D = df.D*1e3
sns.pairplot(df, vars=["A", "B", "C", "D"])

sns.PairGrid(df).map(plt.scatter) will autoscale both axes wrong in every case for small values:

Probably this goes to plt.scatter, because plt.scatter([-1e-6, 1e-6], [-1e-6, 1e-6]) won’t autoscale right.

#862 is about exactly this, however, I’m still puzzled with half-normal pairplot behavior, seems it should return diag-symmetrical plots even with wrong autoscale in scatter function.
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Issue with axis limits when using seaborn pairplot with kind='reg'
A regplot extends the limits of the plot by a certain percentage to let the fitting line sit tight against the axis spines....
Read more >seaborn.PairGrid — seaborn 0.12.1 documentation - PyData |
Subplot grid for plotting pairwise relationships in a dataset. This object maps each variable in a dataset onto a column and row in...
Read more >seaborn.PairGrid — seaborn 0.9.0 documentation
Subplot grid for plotting pairwise relationships in a dataset. This class maps each variable in a dataset onto a column and row in...
Read more >Seaborn Tutorial | Kaggle
C1,y=df.C2,data=df , linewidth = 2.5) sns.lineplot(x=df.C1,y=df. ... "axes.grid":False}) # Use "Pallete" to specify the colors to be used for different ...
Read more >Adjust the grid x-axis scale and y-axis scale in PairGrid ...
I am struggling with getting the right x-axis and y-axis scale for my PairGrid plot of seaborn. Code: x = sns.PairGrid(iris, hue='species') x ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

You want
sns.PairGrid(df.dropna(), diag_sharey=False)to solve the issue.
I am facing same problem. Is there any way to control the y-axis of each diagnal plot of seaborn.pairgrid plot?