Skip to content

feat: Support Resid Plot #247

@Bhoomika2905

Description

@Bhoomika2905

Feature Request

Description

Currently, our visualization module supports only a limited subset of Seaborn Cartesian plots. To enhance analytical and visualization capabilities, we should add support for the sns.residplot() function.
A Residual Plot displays the residuals (differences between observed and predicted values) of a regression model. It’s an essential diagnostic tool for evaluating the goodness of fit — revealing nonlinearity, unequal error variance, or outliers.

Proposed Solution

Use Seaborn’s built-in sns.residplot() as the plotting layer. It should support parameters such as x, y, data, and optionally lowess=True for a locally weighted regression line to highlight residual patterns.

Additional Context

Below is a simple example demonstrating how a residual plot works:

import seaborn as sns
import matplotlib.pyplot as plt

# Load example dataset
tips = sns.load_dataset("tips")

# Create Residual Plot
sns.residplot(
    x="total_bill",
    y="tip",
    data=tips,
    lowess=True,
    color="purple"
)

plt.title("Seaborn Residual Plot Example")
plt.xlabel("Total Bill ($)")
plt.ylabel("Residuals")
plt.tight_layout()
plt.show()

Checklist

  • [ x ] I have searched for similar feature requests and confirmed that this is a new request.
  • [ x ] I have provided a clear and concise description of the feature.
  • [ x ] I have explained the motivation behind this feature request.
  • [ x ] I have outlined a proposed solution or ideas for implementing this feature.
  • [ x ] I have provided any additional context or screenshots if applicable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions