Skip to content

Commit

Permalink
Merge pull request #4159 from NelleV/font_error_message
Browse files Browse the repository at this point in the history
ENH better error message for wrong fontsize
  • Loading branch information
efiring committed Feb 28, 2015
2 parents 199952b + 44141d6 commit 2de5c33
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/matplotlib/font_manager.py
Expand Up @@ -899,7 +899,9 @@ def set_size(self, size):
size = float(size)
except ValueError:
if size is not None and size not in font_scalings:
raise ValueError("size is invalid")
raise ValueError(
"Size is invalid. Valid font size are " + ", ".join(
str(i) for i in font_scalings.keys()))
self._size = size

def set_file(self, file):
Expand Down

0 comments on commit 2de5c33

Please sign in to comment.