def generateTimedStackedBarPlot( fileName, data, metadata ): try: fn = file( fileName, "wb" ) except: return S_ERROR( "Can't open %s" % fileName ) checkMetadata( metadata ) for key, value in ( ( 'sort_labels', 'sum' ), ( 'legend_unit', '%' ) ): if key not in metadata: metadata[ key ] = value barGraph( data, fn, **metadata ) fn.close() return S_OK()
def generateTimedStackedBarPlot(fileName, data, metadata): """ It is used to create a time based line plot. :param str fileName the name of the file :param list data the data which is used to create the plot :param dict metadata extra information used to create the plot. """ try: with open(fileName, "wb") as fn: checkMetadata(metadata) for key, value in (('sort_labels', 'sum'), ('legend_unit', '%')): if key not in metadata: metadata[key] = value barGraph(data, fn, **metadata) except IOError as e: return S_ERROR(errno.EIO, e) return S_OK()
def generateTimedStackedBarPlot( fileName, data, metadata ): """ It is used to create a time based line plot. :param str fileName the name of the file :param list data the data which is used to create the plot :param dict metadata extra information used to create the plot. """ try: with open( fileName, "wb" ) as fn: checkMetadata( metadata ) for key, value in ( ( 'sort_labels', 'sum' ), ( 'legend_unit', '%' ) ): if key not in metadata: metadata[ key ] = value barGraph( data, fn, **metadata ) except IOError as e: return S_ERROR( errno.EIO, e ) return S_OK()