Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c5b737a

Browse files
committed
Merge branch 'v1.0.x'
2 parents f00ee56 + fb9029e commit c5b737a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/matplotlib/figure.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
from matplotlib import docstring
3535

3636
from operator import itemgetter
37+
import os.path
3738

3839
docstring.interpd.update(projection_names = get_projection_names())
3940

@@ -1137,7 +1138,7 @@ def savefig(self, *args, **kwargs):
11371138
kwargs.setdefault('dpi', rcParams['savefig.dpi'])
11381139

11391140
extension = rcParams['savefig.extension']
1140-
if args and is_string_like(args[0]) and '.' not in args[0] and extension != 'auto':
1141+
if args and is_string_like(args[0]) and '.' not in os.path.splitext(args[0])[-1] and extension != 'auto':
11411142
fname = args[0] + '.' + extension
11421143
args = (fname,) + args[1:]
11431144

0 commit comments

Comments
 (0)