In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "how to write the financial code of candle diagram". The content of the explanation in this article is simple and clear, and it is easy to learn and understand. let's study and learn how to write the financial code of candle diagram.
Show candle chart financial code
Import tushare as ts
Import matplotlib.pyplot as plt
Import matplotlib
From matplotlib.dates import date2num, DateFormatter
Import mpl_finance as mpf
Import pandas as pd
% matplotlib inline
Stock_data = ts.get_k_data (code='600036', start='2019-01-01-01, end='2019-10-22')
Print (stock_data.head ())
# use of candlestick2_ochl
Fig, ax = plt.subplots (figsize= (12,5))
Mpf.candlestick2_ochl (ax, stock_data ['open'], stock_data [' close'], stock_data ['high'], stock_data [' low'])
Width=0.6, colorup='r', colordown='g')
Ax.set_xticklabels (stock_data ['date'])
Plt.grid (True)
Plt.xticks (rotation=45)
Plt.ylabel ('Stock Price')
Plt.xlabel ('Date')
Plt.show ()
Thank you for your reading. The above is the content of "how to write the financial code of candle diagram". After the study of this article, I believe you have a deeper understanding of how to write the financial code of candle diagram. The specific use of the situation also needs to be verified by practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.