matplotlib 썸네일형 리스트형 Scatter plot with subfigures with open('attn_result.pickle', 'rb') as fr: attn_result = pickle.load(fr) ref_cam = 'cam0' # tgt_cam_num = 3 image_ref = attn_result['cam0']['image'] # image_tgt = attn_result['cam'+str(tgt_cam_num)]['image'] Hh, Wh = image_ref.shape[:2] # Hl Wl nhead ncam npts 2 position = attn_result['cam0']['sample_position'] weight = attn_result['cam0']['attention_weight'] Hl, Wl = position.shape[:2] scale_.. 더보기 how to plot a histogram : matplotlib import matplotlib.pyplot as plt# the histogram of the data bins = [] for i in range(-1000, 1001): bins.append(i) values, bins, patches = plt.hist(np.squeeze(np.array(steers)), np.squeeze(np.array(bins)), normed=False) plt.xlabel('Steering Angle (x1000.0)') plt.ylabel('Occurrence') plt.grid(True) plt.axis([-500, 500, 0, 1000]) plt.show() # for CDF plot cdf = [] acc_value = 0 for i in range(0, len.. 더보기 이전 1 다음