From 90c9f6b2236e15d8ed6a32f4de0c28a329746ef8 Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Sun, 14 Apr 2019 22:05:08 +0200 Subject: [PATCH] Remove transparent fancy legend example --- examples/recipes/transparent_legends.py | 33 ------------------------- 1 file changed, 33 deletions(-) delete mode 100644 examples/recipes/transparent_legends.py diff --git a/examples/recipes/transparent_legends.py b/examples/recipes/transparent_legends.py deleted file mode 100644 index 3289e2f6d4ab..000000000000 --- a/examples/recipes/transparent_legends.py +++ /dev/null @@ -1,33 +0,0 @@ -""" -Transparent, fancy legends -========================== - -Sometimes you know what your data looks like before you plot it, and -may know for instance that there won't be much data in the upper right -hand corner. Then you can safely create a legend that doesn't overlay -your data: - - ax.legend(loc='upper right') - -Other times you don't know where your data is, and the default loc='best' -will try and place the legend:: - - ax.legend() - -but still, your legend may overlap your data, and in these cases it's -nice to make the legend frame transparent. -""" - -import matplotlib.pyplot as plt -import numpy as np - -np.random.seed(1234) -fig, ax = plt.subplots(1) -ax.plot(np.random.randn(300), 'o-', label='normal distribution') -ax.plot(np.random.rand(300), 's-', label='uniform distribution') -ax.set_ylim(-3, 3) - -ax.legend(fancybox=True, framealpha=0.5) -ax.set_title('fancy, transparent legends') - -plt.show()