**. Plotly 는 Python 프로그램에서 Chart를 출력해주는 라이브러리 입니다.
# 홈페이지 참조 ( https://plot.ly/python/ )
# 설치 페이지 ( https://plot.ly/python/getting-started )
# 1. python-pip 설치
$ sudo apt-get install python-pip
# 2. Plotly 설치
$ sudo pip install plotly
$ python -c "import plotly; plotly.tools.set_credentials_file(username='DemoAccount', api_key='lr1c37zw81', stream_ids=['ylosqsyet5', 'h2ct8btk1s', 'oxz4fm883b'])"
# 예제
# /usr/bin/python
# -*- coding: utf-8 -*-
import plotly.plotly as py
from plotly.graph_objs import *
trace0 = Scatter(
x=[1, 2, 3, 4],
y=[10, 15, 13, 17]
)
trace1 = Scatter(
x=[1, 2, 3, 4],
y=[16, 5, 11, 9]
)
data = Data([trace0, trace1])
unique_url = py.plot(data, filename = 'basic-line')
# 실행
$ python test.py
'Test Code > Linux' 카테고리의 다른 글
[Crunchbang] 시작시 자동 로그인 설정 (0) | 2014.06.08 |
---|---|
[Crunchbang] 파일 매니저에서 더블 클릭 사용하기 (0) | 2014.06.01 |
[Crunchbang] R package 및 R Studio 설치 (0) | 2014.05.29 |
[ubuntu] wxPython 설치 및 예제 (0) | 2014.05.09 |
Shell 스크립트 - 기본 (0) | 2014.05.07 |