def Save(root=None, formats=None, **options):
 clf = options.pop('clf', True)
 Config(**options)
 if (formats is None):
  formats = ['pdf', 'eps']
 try:
  formats.remove('plotly')
  Plotly(clf=False)
 except ValueError:
  pass
 if root:
  for fmt in formats:
   SaveFormat(root, fmt)
 if clf:
  Clf()

def Save ( root = None , formats = None , ** options ) : clf = options . pop ( 'clf' , True ) Config ( ** options ) if ( formats is None ) : formats = [ 'pdf' , 'eps' ] try : formats . remove ( 'plotly' ) Plotly ( clf = False ) except ValueError : pass if root : for fmt in formats : SaveFormat ( root , fmt ) if clf : Clf ( )
saves the plot in the given formats and clears the figure .