Made graphs smaller.

Most of the graphs were really too tall. Well, we can quibble about that
but I made them smaller to reduce the PDF size and thus print size
of the full book.
This commit is contained in:
Roger Labbe
2015-04-05 12:26:21 -07:00
parent f6dfbbbd1e
commit 6b7368f91b
17 changed files with 104550 additions and 120828 deletions

View File

@@ -37,20 +37,22 @@ def equal_axis():
pylab.rcParams['figure.figsize'] = 10,10
plt.axis('equal')
def reset_axis():
pylab.rcParams['figure.figsize'] = 11, 5.5
pylab.rcParams['figure.figsize'] = 11, 4
def set_figsize(x, y):
def set_figsize(x=11, y=4):
pylab.rcParams['figure.figsize'] = x, y
@contextmanager
def figsize(x,y):
def figsize(x=11, y=4):
"""Temporarily set the figure size using 'with figsize(a,b):'"""
set_figsize(x,y)
size = pylab.rcParams['figure.figsize']
set_figsize(x, y)
yield
reset_axis()
pylab.rcParams['figure.figsize'] = size
@contextmanager
def numpy_precision(precision):