Skip to content

Commit 237492a

Browse files
committed
More user friendly error message
This is helpful as if tkinter is not installed the ImportError is caught here and although the user has installed matplotlib the error message says matplotlib is needed. So this small change fixes this.
1 parent ac1193c commit 237492a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mprof

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ def add_brackets(xloc, yloc, xshift=0, color="r", label=None, options=None):
253253
try:
254254
import pylab as pl
255255
except ImportError:
256-
print("matplotlib is needed for plotting.")
256+
print("matplotlib is needed for plotting and tkinter for visualisation.")
257257
sys.exit(1)
258258
height_ratio = 20.
259259
vsize = (pl.ylim()[1] - pl.ylim()[0]) / height_ratio

0 commit comments

Comments
 (0)