本文整理汇总了Python中matplotlib.checkdep_inkscape函数的典型用法代码示例。如果您正苦于以下问题:Python checkdep_inkscape函数的具体用法?Python checkdep_inkscape怎么用?Python checkdep_inkscape使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了checkdep_inkscape函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _update_converter
def _update_converter():
gs, gs_v = matplotlib.checkdep_ghostscript()
if gs_v is not None:
def cmd(old, new):
return [str(gs), '-q', '-sDEVICE=png16m', '-dNOPAUSE', '-dBATCH',
'-sOutputFile=' + new, old]
converter['pdf'] = make_external_conversion_command(cmd)
converter['eps'] = make_external_conversion_command(cmd)
if matplotlib.checkdep_inkscape() is not None:
converter['svg'] = _SVGConverter()
示例2: _update_converter
def _update_converter():
gs, gs_v = matplotlib.checkdep_ghostscript()
if gs_v is not None:
cmd = lambda old, new: \
[gs, '-q', '-sDEVICE=png16m', '-dNOPAUSE', '-dBATCH',
'-sOutputFile=' + new, old]
converter['pdf'] = make_external_conversion_command(cmd)
converter['eps'] = make_external_conversion_command(cmd)
if matplotlib.checkdep_inkscape() is not None:
cmd = lambda old, new: \
['inkscape', '-z', old, '--export-png', new]
converter['svg'] = make_external_conversion_command(cmd)
示例3: _update_converter
def _update_converter():
gs, gs_v = matplotlib.checkdep_ghostscript()
if gs_v is not None:
def cmd(old, new):
return [gs, "-q", "-sDEVICE=png16m", "-dNOPAUSE", "-dBATCH", "-sOutputFile=" + new, old]
converter["pdf"] = make_external_conversion_command(cmd)
converter["eps"] = make_external_conversion_command(cmd)
if matplotlib.checkdep_inkscape() is not None:
def cmd(old, new):
return ["inkscape", "-z", old, "--export-png", new]
converter["svg"] = make_external_conversion_command(cmd)
示例4: make_external_conversion_command
return convert
if matplotlib.checkdep_ghostscript() is not None:
if sys.platform == 'win32':
gs = 'gswin32c'
else:
gs = 'gs'
cmd = lambda old, new: \
[gs, '-q', '-sDEVICE=png16m', '-dNOPAUSE', '-dBATCH',
'-sOutputFile=' + new, old]
converter['pdf'] = make_external_conversion_command(cmd)
converter['eps'] = make_external_conversion_command(cmd)
if matplotlib.checkdep_inkscape() is not None:
cmd = lambda old, new: \
['inkscape', '-z', old, '--export-png', new]
converter['svg'] = make_external_conversion_command(cmd)
def comparable_formats():
'''Returns the list of file formats that compare_images can compare
on this system.'''
return ['png'] + converter.keys()
def convert(filename, cache):
'''
Convert the named file into a png file. Returns the name of the
created file.
If *cache* is True, the result of the conversion is cached in
示例5: _update_converter
def _update_converter():
gs, gs_v = matplotlib.checkdep_ghostscript()
if gs_v is not None:
converter['pdf'] = converter['eps'] = _GSConverter()
if matplotlib.checkdep_inkscape() is not None:
converter['svg'] = _SVGConverter()