From f5a5c78664c6ad96a214086afe902818a04c1574 Mon Sep 17 00:00:00 2001 From: Ruth Comer Date: Mon, 28 Dec 2020 17:24:13 +0000 Subject: [PATCH] don't support mpl v1.2 --- docs/gallery_code/meteorology/plot_deriving_phenomena.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/docs/gallery_code/meteorology/plot_deriving_phenomena.py b/docs/gallery_code/meteorology/plot_deriving_phenomena.py index 0bb1fa53a4..b600941f35 100644 --- a/docs/gallery_code/meteorology/plot_deriving_phenomena.py +++ b/docs/gallery_code/meteorology/plot_deriving_phenomena.py @@ -26,14 +26,7 @@ def limit_colorbar_ticks(contour_object): number of ticks on the colorbar to 4. """ - # Under Matplotlib v1.2.x the colorbar attribute of a contour object is - # a tuple containing the colorbar and an axes object, whereas under - # Matplotlib v1.3.x it is simply the colorbar. - try: - colorbar = contour_object.colorbar[0] - except (AttributeError, TypeError): - colorbar = contour_object.colorbar - + colorbar = contour_object.colorbar colorbar.locator = matplotlib.ticker.MaxNLocator(4) colorbar.update_ticks()