summaryrefslogtreecommitdiff
path: root/numpy/lib
diff options
context:
space:
mode:
authorSebastian Berg <sebastianb@nvidia.com>2022-12-15 10:52:43 +0100
committerGitHub <noreply@github.com>2022-12-15 10:52:43 +0100
commit62e075c1c22530528bf5b6778ef51e212f65acb7 (patch)
treed94031e5c18e1b29cd59740016b2344471e526af /numpy/lib
parentc5de51691f4e714eb8fa67fab6b1a64ccf143b9c (diff)
parent8d2af2eb69fceb7663f39af3307fff45ee636a45 (diff)
downloadnumpy-62e075c1c22530528bf5b6778ef51e212f65acb7.tar.gz
Merge pull request #22784 from eerovaher/percentile-plot-legend
DOC: Fix legend placement in `numpy.percentile()` docs
Diffstat (limited to 'numpy/lib')
-rw-r--r--numpy/lib/function_base.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py
index 5e666c17e..0e9a26228 100644
--- a/numpy/lib/function_base.py
+++ b/numpy/lib/function_base.py
@@ -4185,7 +4185,8 @@ def percentile(a,
xlabel='Percentile',
ylabel='Estimated percentile value',
yticks=a)
- ax.legend()
+ ax.legend(bbox_to_anchor=(1.03, 1))
+ plt.tight_layout()
plt.show()
References