Skip to content

lmplot does not adjust xlim when x_partial is not None #3995

Description

@hchau630

The following code

import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt

df = pd.DataFrame({"x": [1.0, 2.0, 3.0, 4.0, 5.0], "y": [1.5, 4.2, 5.8, 8.6, 11.0], "z": [0.0, 2.0, 3.0, 3.5, 4.0]})
sns.lmplot(df, x="x", y="y", x_partial="z")
plt.show()

produces the following figure

Image

This is in contrast to sns.regplot(df, x="x", y="y", x_partial="z"), which yields

Image

where xlim is correctly set for the x-axis. The same issue interestingly does not occur with y_partial.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions