Skip to content

Commit

Permalink
change mpl.figure.Figure import
Browse files Browse the repository at this point in the history
  • Loading branch information
kklmn committed Apr 25, 2020
1 parent cc658d9 commit 5ff3fa6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions XAFSmass/XAFSmassQt.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import webbrowser
import numpy as np
import matplotlib as mpl
from matplotlib.figure import Figure
from pyparsing import ParseBaseException
import XAFSmassCalc as xc
from __init__ import (__version__, __author__, __license__)
Expand Down Expand Up @@ -103,7 +104,7 @@

class MyFormulaMplCanvas(Canvas):
def __init__(self, parent=None, width=5, height=0.4):
fig = mpl.figure.Figure(figsize=(width, height), dpi=96)
fig = Figure(figsize=(width, height), dpi=96)
self.fig = fig
Canvas.__init__(self, fig)
fig.patch.set_visible(False)
Expand All @@ -123,7 +124,7 @@ def update_formula(self, formula=None):

class MyMplCanvas(Canvas):
def __init__(self, parent=None, width=6, height=5):
fig = mpl.figure.Figure(figsize=(width, height), dpi=96)
fig = Figure(figsize=(width, height), dpi=96)
self.fig = fig
self.axes = fig.add_subplot(111)
self.fig.subplots_adjust(left=0.15, right=0.97, bottom=0.15, top=0.97)
Expand Down

0 comments on commit 5ff3fa6

Please sign in to comment.