I want to be able to draw a line of my specification across a plot generated in seaborn. The plot I chose was JointGrid, but any scatterplot will do. I suspect that seaborn ma
It appears that you have imported matplotlib.pyplot
as plt
to obtain plt.scatter
in your code. You can just use the matplotlib functions to plot the line:
import seaborn as sns
import matplotlib.pyplot as plt
iris = sns.load_dataset("iris")
grid = sns.JointGrid(iris.petal_length, iris.petal_width, space=0, size=6, ratio=50)
grid.plot_joint(plt.scatter, color="g")
plt.plot([0, 4], [1.5, 0], linewidth=2)