plotly.js
来源:互联网 发布:linux piwik安装 编辑:程序博客网 时间:2024/06/04 18:15
Plotly.js已经开源了,可以在线下生成独立的html文件,因此现在通过python使用plotly完全免费了。本文介绍基于python使用plotly的方法。
Plotly for Python is now entirely open source, free, and self-hosted
安装方法
pip install plotly
需要升级的话,可以输入:
pip install plotly –upgrade
使用方法
最简单的使用方法是参照plotly网站给出的案例,见这里(https://plot.ly/python/)
Initialization for Online Plotting
如果不上传到plotly网站,此处可以忽略。
import plotly plotly.tools.set_credentials_file(username='your-name', api_key='your-pass-word')
Initialization for Offline Plotting
- Use plotly.offline.plot() to create and standalone HTML that is saved locally and opened inside your web browser.
- Use plotly.offline.iplot() when working offline in a Jupyter Notebook to display the plot in the notebook.
数据准备
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])
plotly.offline.plot
plotly.offline.plot(data, filename = '/Users/chengjun/GitHub/cjc2016/vis/basic-line.html')
cheatsheet
更多简单的使用参见:
https://images.plot.ly/plotly-documentation/images/python_cheat_sheet.pdf
Plotly Python resources:
- Plotly matplotlib figure converter — https://plot.ly/matplotlib/getting-started/
- Using Plotly with Python offline — https://plot.ly/python/offline/
- Saving static images (PNG, PDF, etc) — https://plot.ly/python/static-image-export/
- Creating HTML or PDF reports in Python — https://plot.ly/python/#report-generation
- Security & Plotly’s server at your company — https://plot.ly/products/on-premise/
- Creating dashboards with Plotly and Python — https://plot.ly/python/dashboard/
- Connecting to databases — https://plot.ly/python/#databases
- Plotly and IPython / Jupyter notebook — https://plot.ly/ipython-notebooks/
0 0
- plotly.js
- plotly.js笔记
- plotly使用指南
- plotly 笔记
- How I hacked plot.ly by exploiting an SVG vulnerability in plotly.js
- plotly和R
- matlab plotly可视化
- Dash Based On Plotly
- Python使用plotly
- python-plotly画图
- Plotly(在线可视化数据制作)
- Shiny Apps Gallery using Plotly in R
- 如何在Matlab中使用Plotly绘图
- python绘图——matplotlib,seaborn,plotly
- Python数据可视化:顶级绘图库plotly
- anaconda 中安装seaborn ,plotly,jieba
- Candlestick charts using Plotly and Quantmod
- 多维数据可视化(echart,plotly,matlab)
- 《关于痴者》---大学之后的学习工作
- A*算法
- 三整数排序
- Sensor传感器(二),实现摇一摇
- 使用Spark分析拉勾网招聘信息(二): 获取数据
- plotly.js
- 深度学习中的 Batch_Size的作用
- C++STL的next_permutation
- 分布式session共享
- linux驱动开发:input子系统二
- 圆形里面写字
- WebSocket(壹) 握手连接
- asynchttpclien使用Post数据上传
- java 类加载器