Skip to content

Commit

Permalink
Change use of \text to \mathrm for compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanistheone committed Jul 17, 2024
1 parent 9719e6f commit 2bc930c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ministats/plots/regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def plot_resid(lmres, pred=None, lowess=False, ax=None):
The function can an optional LOWESS curve for the residuals.
"""
ax = plt.gca() if ax is None else ax
if pred is None:
if pred is None or pred in ["fittedvalues", "predictions"]:
xs = lmres.fittedvalues
xname = "fitted values"
else:
Expand Down Expand Up @@ -258,6 +258,6 @@ def plot_scaleloc(lmres, lowess=True):
ax = sns.regplot(x=xs, y=sqrt_abs_std_resids, lowess=True)
# TODO: repalce with scatterplot + manual lowess lineplot
ax.set_xlabel("fitted values")
ax.set_ylabel(r"$\sqrt{|\text{standardized residuals}|}$")
ax.set_ylabel(r"$\sqrt{|\mathrm{standardized residuals}|}$")
return ax

0 comments on commit 2bc930c

Please sign in to comment.