本文整理汇总了Python中histogram.Histogram.plot方法的典型用法代码示例。如果您正苦于以下问题:Python Histogram.plot方法的具体用法?Python Histogram.plot怎么用?Python Histogram.plot使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类histogram.Histogram
的用法示例。
在下文中一共展示了Histogram.plot方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Det
# 需要导入模块: from histogram import Histogram [as 别名]
# 或者: from histogram.Histogram import plot [as 别名]
det = Det(data, eerObject, cllrObject, config, expName, debug)
det.plot()
else:
print("Not enough data.")
if args.plotEer:
if (len(data.getTargetCnt()) > 0) and (len(data.getNonTargetCnt()) > 0):
eerObject.plot()
else:
print("Not enough data.")
if args.plotHistCum:
# Interested in EER plot? Then plot a cumulative histogram of the scores.
# More crude than eer.plot and not differentiating between meta values.
histogram = Histogram(data, config, expName, 'cumulative', debug)
histogram.plot()
if args.plotHist:
# Show histogram for data split by meta data value.
useMeta = True
if args.plotKernel:
# Add all target and non target data together, i.e. do not use meta data label info.
useMeta = False
histogram = Histogram(data, config, expName, 'normal', debug, useMeta)
histogram.plot()
if args.plotMatrix:
matrix = MatrixPlot(data, config, expName, debug)
matrix.plot()
if args.plotRanking:
示例2: use
# 需要导入模块: from histogram import Histogram [as 别名]
# 或者: from histogram.Histogram import plot [as 别名]
import numpy as np
from histogram import Histogram
import matplotlib.pyplot as plt
from matplotlib.style import use
use('ggplot')
hist1 = Histogram(100, [0, 10])
hist2 = Histogram(100, [0, 10])
for i in range(1000):
hist1.fill(np.random.normal(5, 1, 10000))
hist2.fill(np.random.exponential(2, 10000))
print(hist2.n_entries)
print(hist2.n_underflow)
print(hist2.n_overflow)
hist1.plot()
hist2.plot(kind='bar', alpha=0.3)
plt.xlim(-0.1, 10.1)
plt.show()