Giter VIP home page Giter VIP logo

python_dataee's Introduction

#画k线蜡烛图

python_dataEE/plot/kline_candle.py

python: jupyter-notbook #建议使用jupyter-notbook

from kline_candle import Kline_js
import tushare as ts
df = ts.get_hist_data('hs300', ktype='5')
Kline_js('hs300_k-line-5min',
         df,
         ma=('ma10', 'ma20'),
         width=800, height=400,
         )

image

params:

name, df, prices_cols=None, ma=('ma10',), width=1600, height=750, kline_xaxis_pos='top', render_path=None

  • name: str #图例名称
  • df: pandas.DataFrame #columns包含 prices_cols、‘volume’
  • prices_cols : list #默认 [u'open', u'close', u'low', u'high']
  • ma=('ma10',): list or tuple #移动平均周期
  • width=1600, height=750 # 默认图片大小
  • kline_xaxis_pos='top' #k-line图例默认在上方
  • render_path: str #html file path to save

https://github.com/willowj/python_dataEE/blob/master/plot/kline_candle.py

required modules :

pyecharts

pandas

tushare (for test)

python_dataee's People

Contributors

willowj avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.