This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.image as mpimg | |
import matplotlib.pyplot as plt | |
def loadFigImage(path): | |
im = mpimg.imread(path) | |
h,w = im.shape[0], im.shape[1] | |
dpi = 80 | |
fig = plt.figure(figsize=(w/dpi, h/dpi), dpi=dpi) | |
ax = plt.Axes(fig, [0, 0, 1, 1]) | |
ax.set_xlim(0, w) |