프로그래밍/Python

[python] asciichartpy - 터미널(콘솔) 환경에 깔끔하고 읽기 쉬운 텍스트 기반의 ASCII 아트 그래프를 그려주는 라이브러리

홍반장水_ 2025. 10. 22. 09:19
반응형

 

[python] asciichartpy -  터미널(콘솔) 환경에 깔끔하고 읽기 쉬운 텍스트 기반의 ASCII 아트 그래프를 그려주는 라이브러리

 

pip install asciichartpy

 

https://pypi.org/project/asciichartpy/

 

Client Challenge

JavaScript is disabled in your browser. Please enable JavaScript to proceed. A required part of this site couldn’t load. This may be due to a browser extension, network issues, or browser settings. Please check your connection, disable any ad blockers, o

pypi.org

 

 

import asciichartpy 

data = [1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1]
print("ASCll Line Chart Example")
print(asciichartpy.plot(data, {'height': 10}))

 

import asciichartpy as ac

series1 = [20, 25, 22, 28, 30, 24, 35, 32, 26]
series2 = [10, 15, 12, 18, 20, 14, 25, 22, 16]

# 두 개의 계열을 하나의 차트에 표시
print(ac.plot([series1, series2], {'height': 15, 'colors': [ac.red, ac.blue]}))
반응형