def generateCumulativePlot( fileName, data, metadata ): try: fn = file( fileName, "wb" ) except: return S_ERROR( "Can't open %s" % fileName ) checkMetadata( metadata ) if 'sort_labels' not in metadata: metadata[ 'sort_labels' ] = 'max_value' lineGraph( data, fn, **metadata ) fn.close() return S_OK()
def generateStackedLinePlot( 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 lineGraph( data, fn, **metadata ) fn.close() return S_OK()
def generateCumulativePlot(fileName, data, metadata): """ It is used to create cumulativ plots. :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) if 'sort_labels' not in metadata: metadata['sort_labels'] = 'last_value' lineGraph(data, fn, **metadata) except IOError as e: return S_ERROR(errno.EIO, e) return S_OK()
def generateCumulativePlot( fileName, data, metadata ): """ It is used to create cumulativ plots. :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 ) if 'sort_labels' not in metadata: metadata[ 'sort_labels' ] = 'last_value' lineGraph( data, fn, **metadata ) except IOError as e: return S_ERROR( errno.EIO, e ) return S_OK()
def generateStackedLinePlot(fileName, data, metadata): """ It is used to create stacked 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 lineGraph(data, fn, **metadata) except IOError as e: return S_ERROR(errno.EIO, e) return S_OK()
def generateStackedLinePlot( fileName, data, metadata ): """ It is used to create stacked 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 lineGraph( data, fn, **metadata ) except IOError as e: return S_ERROR( errno.EIO, e ) return S_OK()