| 일 | 월 | 화 | 수 | 목 | 금 | 토 | 
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 | 
| 9 | 10 | 11 | 12 | 13 | 14 | 15 | 
| 16 | 17 | 18 | 19 | 20 | 21 | 22 | 
| 23 | 24 | 25 | 26 | 27 | 28 | 29 | 
| 30 | 
- list
- Redshift
- django
- numpy
- Google Excel
- Github
- Kotlin
- hive
- Tkinter
- string
- gas
- Excel
- array
- dataframe
- Apache
- google apps script
- c#
- PySpark
- 파이썬
- matplotlib
- math
- Java
- Presto
- GIT
- Google Spreadsheet
- PostgreSQL
- PANDAS
- SQL
- Python
- Today
- Total
목록Python (387)
달나라 노트
Python matplotlib를 사용하다 보면 아래와 같은 에러가 발생할 때가 있습니다. AttributeError: module 'backend_interagg' has no attribute 'FigureCanvas'. Did you mean: 'FigureCanvasAgg'? Error 이는 아주 간단하게 해결 가능한데 import matplotlib matplotlib.use('TkAgg') import matplotlib.pyplot as plt ... 위처럼 matplotlib.use('TkAgg') 라는 내용을 코드의 가장 상단에 적어주면 됩니다.
M1 이상의 Macbook으로 Python을 쓰다보면 아래와 같은 에러가 발생할 수 있습니다. Intel MKL WARNING: Support of Intel(R) Streaming SIMD Extensions 4.2 (Intel(R) SSE4.2) enabled only processors has been deprecated. Intel oneAPI Math Kernel Library 2025.0 will require Intel(R) Advanced Vector Extensions (Intel(R) AVX) instructions. M1 칩 때문에 발생하는 에러인데 numpy, matplotlib, pandas 등을 설치하면 자동으로 mkl이라는 모듈이 설치될 수 있습니다. 이때 mkl 모듈이 충돌을..
 Python matplotlib : colormaps (colormap 종류, cmap)
								
								
									Python matplotlib : colormaps (colormap 종류, cmap)
									matplotlib에서는 색상의 그라데이션을 사용할 때가 있습니다. 주로 어떤 데이터셋에서 숫자가 낮을 수록 흰색, 숫자가 높을 수록 검은색 이런 식으로 색상의 그라데이션을 통해 숫자의 크기를 나타낼 때가 있는데 이런 경우에 그라데이션을 자주 사용하죠. matplotlib에는 이미 내장된 다양한 종류의 그라데이션 세트가 있으며 이를 colormap이라고 합니다. colormap의 종류는 matplotlib.colormaps를 통해서 알 수 있습니다. from matplotlib import colormaps print(colormaps) -- Result 'magma', 'inferno', 'plasma', 'viridis', 'cividis', 'twilight', 'twilight_shifted', ..
 Python matplotlib : Polygon, add_patch (그래프 위에 다각형 그리기)
								
								
									Python matplotlib : Polygon, add_patch (그래프 위에 다각형 그리기)
									matplotlib에서는 좌표평면 위에 다각형을 그릴 수 있는 기능도 제공합니다. 이는 좌표평면 위에 그려진 그래프와는 별개의 다각형을 그릴 수 있는 기능입니다. Syntax plt.Polygon( xy=list_poly_coords, # 다각형 꼭지점 좌표 alpha=1, # 투명도 fill=True, # True -> 채우기, False -> 채우기 안함 color='forestgreen', # 종합적인 색상 -> 테두리 색상과 채우기 색상 동시에 결정 facecolor='red', # 채우기 색상 edgecolor='black', # 테두리 색상 linestyle='solid', # 테두리 스타일 {'-', '--', '-.', ':', '', (offset, on-off-seq), ...} lin..