그래프 (2) 썸네일형 리스트형 [plot]gridspec: subplots 업그레이드 버전 Introduction Figure를 그릴 때, subplot만으로는 뭔가 아쉬울 때, 영역을 내마음대로 나누고 싶을 때, 그럴때 필요한게 바로 gridspec Features Figure를 그릴 때 영역을 내 자유자재로 나눌 수 있음 Usage import matplotlib.gridspec as gridspec # define gridspec spec = gridspec.GridSpec(ncols=3, nrows=5, figure=fig) # draw specific grid ax = fig.add_subplot(spec[i//3,i%3]) ax = fig.add_subplot(spec[i:i+1,i:i+2]) Example code import matplotlib.pyplot as plt impor.. 파이썬을 이용한 CDF, PDF 그리기 (편집중) 이 글을 읽으면 도움이 많이 된다..! https://mycourses.aalto.fi/pluginfile.php/146910/mod_resource/content/1/binning_tutorial.pdf 1. pdf log binning 해서 plot하기 data = 넣어주기 # data 는 1-D list 형태로 maxbin = math.ceil(np.log10(max(data)))hist, bins = np.histogram(data , bins=np.logspace(0, maxbin, num=nbins, endpoint=True, base=10.0, dtype=None) , normed=False )bin_centers = (bins[1:]+bins[:-1])*0.5 # histogram에서 bi.. 이전 1 다음