Skip to content

Commit

Permalink
Move mpl imports to function levels (closes #6)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrakitin committed Jan 15, 2018
1 parent bd87d23 commit 14786d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions bnlcrl/plot_delta.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
from matplotlib import pyplot as plt

from bnlcrl.delta_finder import DeltaFinder

if __name__ == '__main__':
import numpy as np
from matplotlib import pyplot as plt

step = 1000
l = np.arange(30, 30000 + 1, step)
Expand Down
2 changes: 1 addition & 1 deletion bnlcrl/visualize.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from io import StringIO # StringIO behaves like a file object

import numpy as np
from matplotlib import pyplot as plt


def plot_data(df, elements, property, thickness, e_min, e_max, n_points, file_name='data', x_label=None,
figsize=(10, 6), show_plot=False):
from matplotlib import pyplot as plt
thickness = ', thickness={} [$\mathrm{{\mu}}$m]'.format(thickness) if property == 'transmission' else ''

fig = plt.figure(figsize=figsize)
Expand Down

0 comments on commit 14786d0

Please sign in to comment.