일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- GIT
- Mac
- Github
- google apps script
- SQL
- hive
- numpy
- PANDAS
- matplotlib
- gas
- math
- Google Excel
- list
- PostgreSQL
- django
- Tkinter
- Java
- c#
- Excel
- string
- array
- Python
- Apache
- PySpark
- Redshift
- 파이썬
- dataframe
- Google Spreadsheet
- Kotlin
- Today
- Total
목록2024/04/01 (4)
달나라 노트
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 모듈이 충돌을..
matplotlib에서는 색상의 그라데이션을 사용할 때가 있습니다. 주로 어떤 데이터셋에서 숫자가 낮을 수록 흰색, 숫자가 높을 수록 검은색 이런 식으로 색상의 그라데이션을 통해 숫자의 크기를 나타낼 때가 있는데 이런 경우에 그라데이션을 자주 사용하죠. matplotlib에는 이미 내장된 다양한 종류의 그라데이션 세트가 있으며 이를 colormap이라고 합니다. colormap의 종류는 matplotlib.colormaps를 통해서 알 수 있습니다. from matplotlib import colormaps print(colormaps) -- Result 'magma', 'inferno', 'plasma', 'viridis', 'cividis', 'twilight', 'twilight_shifted', ..