Skip to content

Commit e5e8591

Browse files
committed
final edits from matt
1 parent d44f2c5 commit e5e8591

10 files changed

+394
-1571
lines changed

1806_Time-frequency/utils.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,27 @@
1+
# -*- coding: utf-8 -*-
2+
"""
3+
Useful functions for writing manuscripts in a Notebook.
4+
5+
:copyright: 2016 Agile Geoscience
6+
:license: Apache 2.0
7+
"""
18
import os
29

10+
311
class Manuscript:
4-
"""Something to handle making figures with figure numbers.
12+
"""
13+
Something to handle making figures with figure numbers.
514
"""
615
def __init__(self, loc=None):
716
self.loc = loc or ''
817
self.fignum = 1
918
self.figures = {}
1019

1120
def savefig(self, figure, name):
21+
"""
22+
Wraps fig.savefig() to automatically keep track of figure numbers.
23+
Just pass a name instead when you call it.
24+
"""
1225
if not os.path.exists(self.loc):
1326
os.makedirs(self.loc)
1427
fname = self.figures.get(name)

0 commit comments

Comments
 (0)