• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

dinkelk/PyDyGraphs: An interactive charting library using Dygraphs for the Jupyt ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

dinkelk/PyDyGraphs

开源软件地址:

https://github.com/dinkelk/PyDyGraphs

开源编程语言:

Python 100.0%

开源软件介绍:

PyDyGraphs

An interactive charting library using Dygraphs for the Jupyter Notebook.

Intent

The Jupyter Notebook is an excellent tool for interacting with python and displaying data in real time. While tools like matplotlib can generate static plots in the Jupyter Notebook, interactive javascript plots are often more useful for exploring the data. This module can be readily included in an Jupyter Notebook and then used to generate beautiful time series plots with Dygraphs.

Screenshots

Simple Example SinglePlot

Subplot with Range Selector RangeSelector

Pandas Dataframe Plot Dataframe

How It Works

This python module generates javascript that interacts with the Dygraphs library, and passes it to the Jupyter Notebook kernel for execution.

Currently the PyDyGraphs module depends on Pandas to generate a JSON representation of the data for plotting. This required dependancy may be removed with future work. Pandas can be installed via pip.

Example

Run the included example:examples/PyDyGraphTester.ipynb, or paste this code into an Jupyter Notebook to generate an interactive timeseries plot:

# Import pydygraphs and numpy
import dygraphs.graph as dy
import numpy as np

# Create a figure
fig = dy.figure(width = 600, height = 400)

# Generate data for the plot
x = np.array(range(100))
y = [np.sin(np.random.rand(100)),-np.sin(np.random.rand(100))]

# Plot the data on the figure
fig.plot(x,y, color=['navy','magenta'])
fig.title("Figure 1")
fig.xlabel('Series')
fig.ylabel('Value')

# Show the figure in this cell of the notebook
fig.show()

Installation:

Simply clone this repository and include the dygraphs.graph module in your Jupyter Notebooks. Note: PyDyGraphs only supports Python 3.

Want to contribute:

Please submit a pull request or issue with any questions you might have!




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap