diff --git a/README.md b/README.md index 76658fd..f32e578 100644 --- a/README.md +++ b/README.md @@ -365,7 +365,7 @@ with open_state("example.asreview") as s: ![Recall with absolute axes](https://github.com/asreview/asreview-insights/blob/main/docs/example_absolute_axes.png) -#### Example: Adjusting the random and optimal curves +#### Example: Adjusting the random and optimal recalls By default, each plot will have a curve representing optimal performance, and a curve representing random sampling performance. Both curves can be removed from diff --git a/asreviewcontrib/insights/plot.py b/asreviewcontrib/insights/plot.py index 93c4f23..2ee70eb 100644 --- a/asreviewcontrib/insights/plot.py +++ b/asreviewcontrib/insights/plot.py @@ -36,7 +36,7 @@ def plot_recall( show_random: bool Show the random curve in the plot. show_optimal: bool - Show the optimal curve in the plot. + Show the optimal recall in the plot. show_legend: bool If state_obj contains multiple states, show a legend in the plot. legend_values: list[str] @@ -407,12 +407,12 @@ def _add_random_curve(ax, labels, x_absolute, y_absolute): def _add_optimal_curve(ax, labels, x_absolute, y_absolute): - """Add a optimal curve to a plot using step-wise increments. + """Add a optimal recall to a plot using step-wise increments. Returns ------- plt.axes.Axes - Axes with optimal curve added. + Axes with optimal recall added. """ # get total amount of positive labels if isinstance(labels[0], list): @@ -434,7 +434,7 @@ def _add_optimal_curve(ax, labels, x_absolute, y_absolute): else np.arange(0, n_pos_docs + 1) / n_pos_docs ) - # Plot the stepwise optimal curve + # Plot the stepwise optimal recall ax.step(x, y, color="grey", where="post") return ax diff --git a/docs/example_multiple_lines.py b/docs/example_multiple_lines.py index f38936a..4b5ad44 100644 --- a/docs/example_multiple_lines.py +++ b/docs/example_multiple_lines.py @@ -19,7 +19,7 @@ plot_recall(ax, s2) # Set the labels for the legend. Both plots add the recall line, the random -# curve, and the optimal curve. Hence the recall lines are the 0th and 3nd line. +# curve, and the optimal recall. Hence the recall lines are the 0th and 3nd line. ax.lines[0].set_label("Naive Bayes") ax.lines[3].set_label("Logistic") ax.legend()