python三维图直⽅图_Python阶梯直⽅图
python 三维图直⽅图
A histogram is a graphical technique or a type of data reprentation using bars of different heights such that each bar group's numbers into ranges (bins or buckets). Taller the bar higher the data falls in that bin. A Histogram is one of the most ud techniques in data visualization and therefore, matplotlib has provided a function matplotlib.pyplot.hist() for plotting histograms. Step histogram is a type of histogram in which Bars are not filled with color, instead only the edge is the reprentation of Histogram. It is in a form of steps of stairs and therefore it is known as step histogram.
直⽅图是使⽤不同⾼度的条形图的图形技术或⼀种数据表⽰形式,以使每个条形图组的数字都位于范围内(箱或桶)。 数据落⼊该容器的栏越⾼,该栏越⾼。 直⽅图是数据可视化中最常⽤的技术之⼀,因此,matplotlib提供了⼀个函数matplotlib.pyplot.hist()来绘制直⽅图。 阶梯直⽅图是直⽅图的⼀种类型,其中条形图未填充颜⾊,⽽是仅边缘表⽰直⽅图。 它采⽤阶梯的形式,因此称为阶梯直⽅图。
The following example illustrates the implementation and u of the Step Histogram Plot.
以下⽰例说明了“阶梯直⽅图”的实现和使⽤。万圣节的说说搞笑
步进直⽅图的Python代码 (Python code for step histogram plot)
仲尼适楚import matplotlib.pyplot as plt
import numpy as np
# random data generation
mu, sigma = 100, 15
x = mu + sigma * np.random.randn(10000)
# Histogram of the Data
镇江历史
plt.figure()
plt.hist(x, 25, histtype='step')
plt.xlabel('Smarts')
美丽的她
plt.ylabel('Probability')
plt.title('Step Histogram')
plt.show()
plt.figure()
plt.hist(x, 15, density=1, histtype='step')
plt.xlabel('Smarts')
plt.ylabel('Probability')
week的形容词plt.title('Step Histogram : No. of Bins = 15')
咖喱羊肉
plt.show()
plt.figure()
plt.hist(x, 10, density=1, edgecolor='purple', linewidth=2.0, histtype='step') plt.xlabel('Smarts')
plt.ylabel('Probability')
plt.title('Step Histogram : Edge Width = 2.0')
plt.show()
Output:
输出:恬静造句
家奴的饲养
Output is as figure
python 三维图直⽅图