Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct latex formatting in elbow legend #1061

Merged
merged 1 commit into from
Apr 21, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions yellowbrick/cluster/elbow.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ def draw(self):
# Plot the silhouette score against k
self.ax.plot(self.k_values_, self.k_scores_, marker="D")
if self.locate_elbow is True and self.elbow_value_ is not None:
elbow_label = "$elbow at k={}, score={:0.3f}$".format(
elbow_label = "elbow at $k={}$, $score={:0.3f}$".format(
self.elbow_value_, self.elbow_score_
)
self.ax.axvline(
Expand Down Expand Up @@ -398,7 +398,7 @@ def finalize(self):

# set the legend if locate_elbow=True
if self.locate_elbow is True and self.elbow_value_ is not None:
self.ax.legend(loc="best", fontsize="medium")
self.ax.legend(loc="best", fontsize="medium", frameon=True)

# Set the second y axis labels
if self.timings:
Expand Down