Skip to content

Commit

Permalink
Merge pull request #2780 from tacaswell/subplot_errormsg
Browse files Browse the repository at this point in the history
ENH : improve error invalid error message for subplot
  • Loading branch information
efiring committed Feb 2, 2014
2 parents d7a1389 + 61300dd commit 8115e68
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/matplotlib/figure.py
Expand Up @@ -901,6 +901,10 @@ def add_subplot(self, *args, **kwargs):

if len(args) == 1 and isinstance(args[0], int):
args = tuple([int(c) for c in str(args[0])])
if len(args) != 3:
raise ValueError("Integer subplot specification must " +
"be a three digit number. " +
"Not {n:d}".format(n=len(args)))

if isinstance(args[0], SubplotBase):

Expand Down

0 comments on commit 8115e68

Please sign in to comment.