사용자 도구

사이트 도구


matplotlib

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판이전 판
다음 판
이전 판
matplotlib [2020/01/29 10:42] – [Embedded plot] rex8312matplotlib [2024/03/23 02:38] (현재) – 바깥 편집 127.0.0.1
줄 3: 줄 3:
 ===== Animation ===== ===== Animation =====
  
-  http://jakevdp.github.io/blog/2012/08/18/matplotlib-animation-tutorial/+  http://jakevdp.github.io/blog/2012/08/18/matplotlib-animation-tutorial/ 
 +  * [[https://towardsdatascience.com/animate-your-graphs-in-python-in-4-easy-steps-243dccad9a7|Animate your Graphs in Python in 4 Easy Steps! (GIF 파일 만들기)]]
  
  
줄 76: 줄 77:
   * https://towardsdatascience.com/everything-you-need-to-know-about-scatter-plots-for-data-visualisation-924144c0bc5   * https://towardsdatascience.com/everything-you-need-to-know-about-scatter-plots-for-data-visualisation-924144c0bc5
  
-====== imshow ======+===== imshow =====
  
 <code python> <code python>
줄 92: 줄 93:
     else:     else:
         c = (1 - min_diff) * w         c = (1 - min_diff) * w
 +    c = np.clip(c, 0, 1)
     cs.append(c)     cs.append(c)
     ax1.text(0,      ax1.text(0, 
줄 105: 줄 107:
  
 ===== Radar chart ===== ===== Radar chart =====
 +
 +  * https://matplotlib.org/3.1.1/gallery/specialty_plots/radar_chart.html#sphx-glr-gallery-specialty-plots-radar-chart-py
  
 <code python> <code python>
줄 122: 줄 126:
 </code> </code>
  
-====== Subplot ======+===== Subplot =====
  
   * https://matplotlib.org/3.1.1/gallery/recipes/create_subplots.html#sphx-glr-gallery-recipes-create-subplots-py   * https://matplotlib.org/3.1.1/gallery/recipes/create_subplots.html#sphx-glr-gallery-recipes-create-subplots-py
  
-====== Embedded plot ======+===== Embedded plot =====
  
 <code python> <code python>
줄 167: 줄 171:
 </code> </code>
  
-===== MAP-Elite archive ==== 
  
-<code python> 
-behavior_description = np.random.randint(0, 3, (20, 4)) 
-quality = np.random.random(20) 
  
-map_size behavior_description.max(0) - behavior_description.min(0) + 1 +===== Neural Net Weights/Activation =====
-height_ticks map_size[::2] +
-height np.product(height_ticks) +
-width_ticks map_size[1::2] +
-width np.product(width_ticks) +
-bd_map np.zeros((height, width))+
  
-bd_idxs = behavior_description - behavior_description.min(0)+  * [[https://matplotlib.org/3.1.1/gallery/specialty_plots/hinton_demo.html#sphx-glr-gallery-specialty-plots-hinton-demo-py|hinton diagram]]
  
-for bd_idx, qv in zip(bd_idxs, quality): 
-    y = 0 
-    for i, hi in enumerate(bd_idx[::2]): 
-        y += hi * np.product(height_ticks[i+1:]) 
-    x = 0 
-    for i, wi in enumerate(bd_idx[1::2]): 
-        x += wi * np.product(width_ticks[i+1:]) 
-    bd_map[y][x] = qv 
-     
-fig = plt.figure() 
-ax = fig.add_subplot(111) 
-im = ax.imshow(bd_map, cmap='jet', vmin=0, vmax=1) 
-fig.colorbar(im) 
-plt.show() 
-plt.close() 
-</code> 
  
matplotlib.1580294575.txt.gz · 마지막으로 수정됨: (바깥 편집)