From fa8edf46221f02c3d7c8c5deb690469017cc46cb Mon Sep 17 00:00:00 2001 From: Carsten Schelp Date: Tue, 16 Apr 2019 08:03:02 +0200 Subject: [PATCH] Backport PR #13950: confidence_ellipse_markup --- examples/statistics/confidence_ellipse.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/examples/statistics/confidence_ellipse.py b/examples/statistics/confidence_ellipse.py index d83246d31d33..ca5809de7aea 100644 --- a/examples/statistics/confidence_ellipse.py +++ b/examples/statistics/confidence_ellipse.py @@ -16,6 +16,13 @@ pearson correlation coefficients and ones) is particularly easy to handle. """ + +import numpy as np +import matplotlib.pyplot as plt +from matplotlib.patches import Ellipse +import matplotlib.transforms as transforms + + ############################################################################# # # The plotting function itself @@ -31,12 +38,6 @@ # like in these examples). -import numpy as np -import matplotlib.pyplot as plt -from matplotlib.patches import Ellipse -import matplotlib.transforms as transforms - - def confidence_ellipse(x, y, ax, n_std=3.0, facecolor='none', **kwargs): """ Create a plot of the covariance confidence ellipse of `x` and `y`