1
아래의 히스토그램을 볼 수 있습니다.
pl.hist(data1,bins=20,color='green',histtype="step",cumulative=-1)
히스토그램 스케일 방법은?
예를 들어 히스토그램의 높이를 1/3로 설정하면됩니다.
matplotlib을 통해 히스토그램 플롯을 축척하는 방법
게다가 왼쪽의 세로선을 제거하는 방법입니까?
아래의 히스토그램을 볼 수 있습니다.
pl.hist(data1,bins=20,color='green',histtype="step",cumulative=-1)
히스토그램 스케일 방법은?
예를 들어 히스토그램의 높이를 1/3로 설정하면됩니다.
matplotlib을 통해 히스토그램 플롯을 축척하는 방법
게다가 왼쪽의 세로선을 제거하는 방법입니까?
하기 matplotlib hist
실제로 단지 다른 함수를 호출하고 있습니다.
# Generate some data
data = np.random.normal(size=1000)
# Generate the histogram data directly
hist, bin_edges = np.histogram(data, bins=10)
# Get the reversed cumulative sum
hist_neg_cumulative = [np.sum(hist[i:]) for i in range(len(hist))]
# Get the cin centres rather than the edges
bin_centers = (bin_edges[:-1] + bin_edges[1:])/2.
# Plot
plt.step(bin_centers, hist_neg_cumulative)
plt.show()
hist_neg_cumulative가 플롯되는 데이터의 배열입니다 : 당신이 데이터를 검사 할 수 있도록 이것들을 직접 사용하고 직접 수정하는 것이 종종 더 쉽다. 따라서 플로팅 함수에 전달하기 전에 원하는대로 다시 스케일을 조정할 수 있습니다. 또한 수직선을 플롯하지 않습니다.