반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
Tags
- Tkinter
- SQL
- c#
- array
- Google Excel
- Excel
- PANDAS
- numpy
- Kotlin
- PostgreSQL
- Github
- GIT
- 파이썬
- django
- PySpark
- string
- Redshift
- Mac
- Python
- Google Spreadsheet
- google apps script
- hive
- dataframe
- matplotlib
- Apache
- gas
- Java
- list
- math
Archives
- Today
- Total
목록set_xlim (1)
달나라 노트
Python matplotlib : xlim, ylim, set_xlim, set_ylim (x축 최대 최소값 설정하기, y축 최대 최소값 설정하기, max/min x label, max/min y label, subplots)
matplotlib를 이용하여 그래프를 그리면 matplotlib는 자동으로 존재하는 모든 좌표를 고려해서 적당하게 x축과 y축의 최대값/최소값을 정해줍니다. 그러나 xlim method를 이용하면 표시될 x축의 최대값/최소값을 설정할 수 있으며 ylim method를 이용하면 표시될 y축의 최대값/최소값을 설정할 수 있습니다. import matplotlib.pyplot as plt list_x = [1, 2, 3, 4, 5] list_y = [2, 3, 4, 5, 6] plt.plot(list_x, list_y, color='skyblue', marker='o', markerfacecolor='blue', markersize=6) plt.show() 위 예시를 보면 존재하는 5개의 좌표값을 모두 고려..
Python/Python matplotlib
2022. 1. 16. 03:08