[plot]LineCollection: edges(끈킨 선 여러개)를 빨리 그릴 때!?
원래 코드 (겁나 느림 주의) # xs = [[fn1, tn1], [fn2, tn2]...] # ys = [[fn1, tn1], [fn2, tn2]...] plt.plot(xs.T, ys.T, lw = 1, c = 'r') plt.show() 개선된 코드: 빠르다!!! fn = np.array(list(zip(fx,fy))) tn = np.array(list(zip(tx,ty))) ptrs = np.array(list(zip(fn,tn))) ln_coll = matplotlib.collections.LineCollection(ptrs, lw = lw*.05, colors='r') fig, ax = plt.subplots() ax.add_collection(ln_coll) ax..
[plot]matplotlib arrow
arrow_params = {'length_includes_head': True, 'shape': 'right'}#, # 'head_starts_at_zero': True} plt.arrow(x, y, dx, dy, alpha = .3, label = lb_road[rr], overhang = .2, ec = None, color = None, fc = cmap[rr%100], linewidth=0, width = .0003, head_width=.001, head_length=.001, **arrow_params) figure는 figsize=(20,20) 기반으로 했을 때 width, head_width, head_length가 저정도가 적절하..