File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ def _fn_name(): return sys._getframe(1).f_code.co_name
1717 from md5 import md5 #Deprecated in 2.5
1818
1919from tempfile import mkstemp
20- from matplotlib import verbose , __version__ , rcParams
20+ from matplotlib import verbose , __version__ , rcParams , checkdep_ghostscript
2121from matplotlib ._pylab_helpers import Gcf
2222from matplotlib .afm import AFM
2323from matplotlib .backend_bases import RendererBase , GraphicsContextBase ,\
@@ -70,8 +70,9 @@ def gs_exe(self):
7070 except KeyError :
7171 pass
7272
73- if sys .platform == 'win32' : gs_exe = 'gswin32c'
74- else : gs_exe = 'gs'
73+ gs_exe , gs_version = checkdep_ghostscript ()
74+ if gs_exe is None :
75+ gs_exe = 'gs'
7576
7677 self ._cached ["gs_exe" ] = gs_exe
7778 return gs_exe
@@ -1617,8 +1618,7 @@ def get_bbox(tmpfile, bbox):
16171618 """
16181619
16191620 outfile = tmpfile + '.output'
1620- if sys .platform == 'win32' : gs_exe = 'gswin32c'
1621- else : gs_exe = 'gs'
1621+ gs_exe = ps_backend_helper .gs_exe
16221622 command = '%s -dBATCH -dNOPAUSE -sDEVICE=bbox "%s"' % \
16231623 (gs_exe , tmpfile )
16241624 verbose .report (command , 'debug' )
You can’t perform that action at this time.
0 commit comments