Reran with tight_layout for interactive plots

This is just so everything looks nice in nbviewer. I added
plt.tight_layout() to the interactive_plot context manager,
which makes plots fill the output cell better.
This commit is contained in:
Roger Labbe
2016-02-28 09:46:06 -08:00
parent 2594d8905c
commit f62fb8bbe8
16 changed files with 3720 additions and 3717 deletions

View File

@@ -17,28 +17,27 @@ for more information.
from __future__ import (absolute_import, division, print_function,
unicode_literals)
from book_format import figsize
from contextlib import contextmanager
import matplotlib.pyplot as plt
import numpy as np
from contextlib import contextmanager
import sys
sys.path.insert(0, '..')
from book_format import figsize
import time
try:
import seaborn
except:
pass
sys.path.insert(0, '..')
def end_interactive(fig):
""" end interaction in a plot created with %matplotlib notebook """
import time
plt.gcf().canvas.draw()
time.sleep(0.1)
time.sleep(0.2)
plt.close(fig)