From fea7773262a510a1b25abbcffb87d7d50f71df79 Mon Sep 17 00:00:00 2001 From: Flemyng Date: Mon, 8 May 2023 19:41:13 +0800 Subject: [PATCH] Add a 'import matplotlib' in 'all_angles.py' --- Py6S/SixSHelpers/all_angles.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Py6S/SixSHelpers/all_angles.py b/Py6S/SixSHelpers/all_angles.py index 5089567..8d4e590 100644 --- a/Py6S/SixSHelpers/all_angles.py +++ b/Py6S/SixSHelpers/all_angles.py @@ -224,6 +224,11 @@ def plot_polar_contour( After that code the azimuths, zeniths and values lists will be ready to be passed into this function. """ + try: + from matplotlib.pyplot import subplots + except ImportError: + raise ImportError("You must install matplotlib to use the plotting functionality") + theta = np.radians(azimuths) zeniths = np.array(zeniths)