3
나는 간단한 matplotlib 히스토그램을 가지고 있으며 몇개의 숫자로 ylabels을 나눌 필요가있다. 예를 들어 1, 2, 3이 필요한데 100 200 200 300입니다. 제안이 있습니까?ytics를 matplotlib의 특정 숫자로 나누는 방법은 무엇입니까?
import numpy
import matplotlib
# Turn off DISPLAY
matplotlib.use('Agg')
import pylab
# Figure aspect ratio, font size, and quality
matplotlib.pyplot.figure(figsize=(100,50),dpi=400)
matplotlib.rcParams.update({'font.size': 150})
matplotlib.rcParams['xtick.major.pad']='68'
matplotlib.rcParams['ytick.major.pad']='68'
# Read data from file
data=pylab.loadtxt("data.txt")
# Plot a histogram
n, bins, patches = pylab.hist(data, 50, normed=False, histtype='bar')
#matplotlib.pyplot.subplots_adjust(left=0.1, right=0.9, top=0.9, bottom=0.1)
# Axis labels
pylab.xlabel('# of Occurence')
pylab.ylabel('Signal Probability')
# Save in PDF file
pylab.savefig("Output.pdf", dpi=400, bbox_inches='tight', pad_inches=1)
문제점을 설명해주십시오. –