Created
December 2, 2022 12:00
-
-
Save maxdevblock/7d7cb11665846dbcad68e1757bb6ab71 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x_bar = X.sum()/X.size | |
y_bar = Y.sum()/Y.size | |
fig, ax = plt.subplots(facecolor="w") | |
plt.plot(X, Y, "o", label="observations") | |
plt.axvline(x_bar, ls="--", label=fr"$\bar{{x}}={x_bar:.2f}$", color="C1") | |
plt.axhline(y_bar, ls="--", label=fr"$\bar{{y}}={y_bar:.2f}$", color="C2") | |
plt.legend(loc="upper left", bbox_to_anchor=(1,1)) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment