Using regplot with scatter=False. Not working as intended?
See original GitHub issueHi, I’m trying to draw a regression plot showing just the regression line and confidence interval bands, without the points in the scatter plot, though running the following does not seem to work as I expected.
import seaborn as sb
x = np.linspace(0, 10, 100)
e = np.random.normal(size=100)
y = 1 + 0.5*x + 2*e
g = sb.regplot(x, y, scatter=False)
g.set(xlim=(min(x), max(x)), ylim=(-2, 8))
The following code produces a band that only extends for a small portion of the x and y range.
I can work around it by explicitly setting the point colour to white, but I feel there should be a better way to do it.
g = sb.regplot(x, y, scatter_kws={"color": "white"})
g.set(xlim=(min(x), max(x)), ylim=(-2, 8))
Have I missed out a parameter I need to do this, or is this a bug?
Issue Analytics
- State:
- Created 8 years ago
- Comments:9 (7 by maintainers)
Top Results From Across the Web
Why is an intercept displayed incorrectly when plotting ...
1 Answer 1 · The solution did not work as expected. · set_ylim(0,) takes 2 parameters. · There is a problem with configuring...
Read more >seaborn.regplot — seaborn 0.12.1 documentation - PyData |
Plot data and a linear regression model fit. There are a number of mutually exclusive options for estimating the regression model. See the...
Read more >Creating Diagnostic Plots in Python - Robert Alvarez
We will be looking at four main plots in this post and describe how each of them can be used to diagnose issues...
Read more >Advanced visualization tutorial with Seaborn – Datalore Report
In this visualization tutorial you will learn how to use the Seaborn library to ... These ones are intended not for 3D graphics...
Read more >Multi-factor model using Ordinary least Squares Regression
The best practice while working with stock prices is to use adjusted ... sns.regplot(model_leverage, model_norm_residuals,scatter=False, ...
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
sns.regplot(x="total_bill", y="tip", data=tips, scatter_kws=dict(alpha=0))