{"id":15582,"date":"2021-04-19T05:25:29","date_gmt":"2021-04-18T21:25:29","guid":{"rendered":"https:\/\/www.tejwin.com\/?post_type=insight&#038;p=15582"},"modified":"2026-03-03T13:26:05","modified_gmt":"2026-03-03T05:26:05","slug":"matplotlib","status":"publish","type":"insight","link":"https:\/\/tejwin20260323.j.webweb.today\/en\/insight\/matplotlib\/","title":{"rendered":"Matplotlib"},"content":{"rendered":"\n<p>A plot is better than countless words<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/tejwin20260323.j.webweb.today\/wp-content\/uploads\/image-223.png\" alt=\"\" class=\"wp-image-15583\" width=\"840\" height=\"560\" srcset=\"https:\/\/tejwin20260323.j.webweb.today\/wp-content\/uploads\/image-223.png 720w, https:\/\/tejwin20260323.j.webweb.today\/wp-content\/uploads\/image-223-300x200.png 300w, https:\/\/tejwin20260323.j.webweb.today\/wp-content\/uploads\/image-223-150x100.png 150w\" sizes=\"(max-width: 840px) 100vw, 840px\" \/><\/figure>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p id=\"52bf\">After two weeks of some complicated articles, let\u2019s take a break and turn to our previous topic<strong>&nbsp;\u201cData Analysis\u201d&nbsp;<\/strong>and introduce another important tool when working on the data analysis-<strong>&nbsp;data visualization!<\/strong><\/p>\n\n\n\n<p id=\"a3d8\">If you forget what we have done few weeks ago, you can go back, review on them and come back again~~<\/p>\n<\/blockquote>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_81 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a11aba60d927\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"ez-toc-cssicon\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a11aba60d927\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/tejwin20260323.j.webweb.today\/en\/insight\/matplotlib\/#Highlights_of_this_article\" >Highlights of this article<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/tejwin20260323.j.webweb.today\/en\/insight\/matplotlib\/#Links_related_to_this_article\" >Links related to this article<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/tejwin20260323.j.webweb.today\/en\/insight\/matplotlib\/#What_is_the_difference_between_Matplotlib_and_other_packages\" >What is the difference between Matplotlib and other packages?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/tejwin20260323.j.webweb.today\/en\/insight\/matplotlib\/#How_to_use_Matplotlib\" >How to use Matplotlib?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/tejwin20260323.j.webweb.today\/en\/insight\/matplotlib\/#Data_CollectingTEJAPI\" >Data Collecting(TEJAPI)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/tejwin20260323.j.webweb.today\/en\/insight\/matplotlib\/#Basic_Plotting_Single-Axis_Dual-Axis_Scatter_Histogram_Box\" >Basic Plotting (Single-Axis, Dual-Axis, Scatter, Histogram, Box)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/tejwin20260323.j.webweb.today\/en\/insight\/matplotlib\/#Financial_Time-Series_Data_Plotting\" >Financial Time-Series Data Plotting<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/tejwin20260323.j.webweb.today\/en\/insight\/matplotlib\/#Conclusion\" >Conclusion<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/tejwin20260323.j.webweb.today\/en\/insight\/matplotlib\/#Links_related_to_this_article_again\" >Links related to this article again!<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\" id=\"70d2\"><span class=\"ez-toc-section\" id=\"Highlights_of_this_article\"><\/span><strong>Highlights of this article <\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Matplotlib Intro\/Application<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"5f9d\"><span class=\"ez-toc-section\" id=\"Links_related_to_this_article\"><\/span><strong>Links related to this article<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>1\ufe0f\u20e3 API Official Website:&nbsp;<a href=\"https:\/\/api.tej.com.tw\/\" rel=\"noreferrer noopener\" target=\"_blank\"><strong>TEJ API Official Website<\/strong><\/a><\/li>\n\n\n\n<li>2\ufe0f\u20e3 The Product Package:&nbsp;<a href=\"https:\/\/eshop.tej.com.tw\/E-Shop\/Edata_caseIntro\/1\" rel=\"noreferrer noopener\" target=\"_blank\"><strong>TEJ E SHOP<\/strong><\/a><\/li>\n\n\n\n<li>3\ufe0f\u20e3 Source Code:&nbsp;<a href=\"https:\/\/github.com\/tejtw\/TEJAPI_Python_Medium_DataAnalysis\" rel=\"noreferrer noopener\" target=\"_blank\"><strong>TEJ GITHUB<\/strong><\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"27f6\"><span class=\"ez-toc-section\" id=\"What_is_the_difference_between_Matplotlib_and_other_packages\"><\/span>What is the difference between Matplotlib and other packages?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p id=\"0801\">There are many packages that could be used in Python to do the data visualization. In addition to Matplotlib,<strong>&nbsp;there are other packages to plot such as plotly, seaborn, cufflinks, etc.<\/strong>&nbsp;The logic and syntax are similar when working on those packages, but&nbsp;<strong>because the connection between Matplotlib and pandas is relatively closer,<\/strong>&nbsp;we will use it for the introduction in this article.<br><strong>If you want to read the whole document of Matplotlib, you could go through this link:&nbsp;<\/strong><a href=\"https:\/\/matplotlib.org\/\" rel=\"noreferrer noopener\" target=\"_blank\"><strong>Matplotlib<\/strong><\/a><strong>\ud83d\udc4d\ud83d\udc4d<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"0135\"><span class=\"ez-toc-section\" id=\"How_to_use_Matplotlib\"><\/span>How to use Matplotlib?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p id=\"744f\">Let\u2019s code step by step!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"fa6a\"><span class=\"ez-toc-section\" id=\"Data_CollectingTEJAPI\"><\/span>Data Collecting(TEJAPI)<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p id=\"8659\">We first get the stock price data of TSMC(2330) and UMC(2303) from the TEJ API.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import tejapi\ntejapi.ApiConfig.api_key = \"your key\"\nTSMC = tejapi.get(\n    'TWN\/EWPRCD', \n    coid = '2330',\n    mdate={'gte':'2020-06-01', 'lte':'2021-04-12'}, \n    opts={'columns': &#91;'mdate','open_d','high_d','low_d','close_d', 'volume']}, \n    paginate=True\n    )\nUMC = tejapi.get(\n    'TWN\/EWPRCD', \n    coid = '2303',\n    mdate={'gte':'2020-06-01', 'lte':'2021-04-12'},\n    opts={'columns': &#91;'mdate','open_d','high_d','low_d','close_d', 'volume']}, \n    paginate=True\n    )\nUMC = UMC.set_index('mdate')\nTSMC = TSMC.set_index('mdate')<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"afb9\"><span class=\"ez-toc-section\" id=\"Basic_Plotting_Single-Axis_Dual-Axis_Scatter_Histogram_Box\"><\/span>Basic Plotting (Single-Axis, Dual-Axis, Scatter, Histogram, Box)<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p id=\"e8c2\"><strong>* Single-Axis Plot<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>TSMC&#91;'5_MA'] = TSMC&#91;'close_d'].rolling(5).mean()\nplt.figure(figsize = (10, 6))\nplt.plot(TSMC&#91;'close_d'], lw=1.5, label = 'Stock Price') \nplt.plot(TSMC&#91;'5_MA'], lw=1.5, label = '5-Day MA')\nplt.legend(loc = 0)                                        \nplt.xlabel('Date')                                       \nplt.ylabel('Stock Price')\nplt.title('TSMC Stock Price vs 5-Day MA')\nplt.grid()\nplt.show()<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/tejwin20260323.j.webweb.today\/wp-content\/uploads\/1qehaPaKcGNNPe1rQ4Exk7Q.png\" alt=\"\"\/><\/figure>\n\n\n\n<p id=\"d7db\"><strong>Introduction of different functions:<\/strong><\/p>\n\n\n\n<p id=\"cf6b\"><strong>plt.plot()<\/strong>: Set the information of the plot such as length of width, color, name, etc.<br><strong>plt.figure(figsize = (10,6))<\/strong>: Size of the plot<br><strong>plt.legend()<\/strong>: Location of the legend<br><strong>plt.grid()<\/strong>: Add the grid<br><strong>plt.xlabel()<\/strong>: Name of X axis<br><strong>plt.ylabel()<\/strong>: Name of Y axis<br><strong>plt.title()<\/strong>: Name of title<\/p>\n\n\n\n<p id=\"4c2c\"><strong>* Dual-Axis Plot<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>fig, ax1 = plt.subplots(figsize=(10,8))\nplt.plot(TSMC&#91;'close_d'], lw=1.5, label = '2330.TW')                                       \nplt.xlabel('Date')\nplt.ylabel('Stock Price')\nplt.title('TSMC VS UMC Stock Price')\nplt.legend(loc=1)\nax2 = ax1.twinx()\nplt.plot(UMC&#91;'close_d'], lw=1.5, color = \"r\",label = '2303.TW')                       \nplt.ylabel('Stock Price')\nplt.legend(loc=2)\nplt.show()\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/tejwin20260323.j.webweb.today\/wp-content\/uploads\/13NKdZGdtmBvwOCLDnaUckQ.png\" alt=\"\"\/><\/figure>\n\n\n\n<p id=\"3ad6\">There is often a need for dual-axis plots because it is not convenient for reading if the units or magnitudes of the 2 data are different and placed on the same axis.<\/p>\n\n\n\n<p id=\"4b6f\">We use&nbsp;<strong>fig, ax1 = plt.subplots() and ax2 = ax1.twinx()<\/strong>&nbsp;to generate the second chart but&nbsp;<strong>share the X-axis of the first chart.&nbsp;<\/strong>It could be understood as making two pictures with exactly the same unit on the X-axis and then stack them up!<\/p>\n\n\n\n<p id=\"ccf5\"><strong>* Scatter Plot, Histogram, and Box Plot<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>##Scatter Plot\nfrom sklearn.linear_model import LinearRegression\nplt.figure(figsize = (10, 6))\nplt.scatter(TSMC&#91;'close_d'], UMC&#91;'close_d'], color = 'navy')\n##Regression Line\nreg = LinearRegression().fit(np.array(TSMC&#91;'close_d'].tolist()).reshape(-1,1),  UMC&#91;'close_d'])\npred = reg.predict(np.array(TSMC&#91;'close_d'].tolist()).reshape(-1,1))\nplt.plot(TSMC&#91;'close_d'], pred, linewidth = 2, color = 'r',label = '\u8ff4\u6b78\u7dda')\nplt.xlabel('TSMC')\nplt.ylabel('UMC')\nplt.title('TSMC vs UMC')\nplt.show()\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/tejwin20260323.j.webweb.today\/wp-content\/uploads\/1NvvuLCrV3sNSi7t5Qzg8_g.png\" alt=\"\"\/><\/figure>\n\n\n\n<p id=\"da86\">First, let\u2019s introduce the scatter plot. It could be used&nbsp;<strong>to see the relationship between the two data<\/strong>. If we use the regression line at the same time, the correlation between the two data will be more easily observed.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>##Histogram\nret_tsmc = np.log(TSMC&#91;'close_d']\/TSMC&#91;'close_d'].shift(1)).tolist()\nplt.figure(figsize = (10, 6))\nplt.hist(ret_tsmc, bins = 25)\nplt.xlabel('Log Return')\nplt.ylabel('Frequency')\nplt.title('Log Return vs Frequency')\nplt.show()<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/tejwin20260323.j.webweb.today\/wp-content\/uploads\/18-YdrhYxh9MeQXFk3T0c2Q.png\" alt=\"\"\/><\/figure>\n\n\n\n<p id=\"eb53\">Second, let\u2019s introduce the histogram. We can&nbsp;<strong>use the histogram to<\/strong>&nbsp;<strong>understand the distribution and the frequencies of the yearly log return.<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>##Box Plot\nrv = np.random.standard_normal((1000,2))\nplt.figure(figsize = (10, 6))\nplt.boxplot(rv)\nplt.xlabel('dataset')\nplt.ylabel('value')\nplt.title('ramdon variable box plot')\nplt.show()<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/tejwin20260323.j.webweb.today\/wp-content\/uploads\/12o3uSd45wUT4tNj9sBUtUA.png\" alt=\"\"\/><\/figure>\n\n\n\n<p id=\"f721\">The last is the box plot, which could be used to display the statistical characteristics of the dataset and&nbsp;<strong>compare multiple datasets at the same time.<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"7ffe\"><span class=\"ez-toc-section\" id=\"Financial_Time-Series_Data_Plotting\"><\/span>Financial Time-Series Data Plotting<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p id=\"7c48\">Let\u2019s combine the plot we\u2019ve mentioned above with the financial data!<\/p>\n\n\n\n<p id=\"597b\"><strong>* Data Collecting<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>tickers = &#91;'2330', '1301', '2317', '2454' , '2882']\ndf  =  tejapi.get(\n        'TWN\/EWPRCD', \n        coid = tickers,\n        mdate={'gte':'2020-06-01', 'lte':'2021-04-12'}, \n        opts={'columns': &#91;'mdate', 'coid','close_d']}, \n        paginate=True\n        )\ndf = df.sort_values(&#91;'coid', 'mdate']).set_index('mdate')\ndata = df.pivot_table(index = df.index, columns = 'coid', values = 'close_d')\ndata\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter caption-align-center\"><img decoding=\"async\" src=\"https:\/\/tejwin20260323.j.webweb.today\/wp-content\/uploads\/1mBCvlwzteXdUnsJYGPPzIw.png\" alt=\"\"\/><figcaption class=\"wp-element-caption\">Historical Stock Price DataFrame<\/figcaption><\/figure>\n\n\n\n<p id=\"c112\"><strong>*Pandas built-in statistical function<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>data.describe()<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter caption-align-center\"><img decoding=\"async\" src=\"https:\/\/tejwin20260323.j.webweb.today\/wp-content\/uploads\/1IuJ7oPVws8WPjWbugIH1oQ.png\" alt=\"\"\/><figcaption class=\"wp-element-caption\">Descriptive Statistics<\/figcaption><\/figure>\n\n\n\n<p id=\"b58a\">We can use Pandas to present the descriptive statistics of the underlying assets&nbsp;<strong>with one-line code!<\/strong>&nbsp;It is really a clear and convenient way to process the data!!<\/p>\n\n\n\n<p id=\"2c16\"><strong>* Pandas built-in plotting<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>##Average Rate of Return \ndata.pct_change().mean().plot(kind = 'bar', figsize=(10,6))<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter caption-align-center\"><img decoding=\"async\" src=\"https:\/\/tejwin20260323.j.webweb.today\/wp-content\/uploads\/1Fc2MciriBuj8NVr4exz9tw.png\" alt=\"\"\/><figcaption class=\"wp-element-caption\">Average Rate of Return<\/figcaption><\/figure>\n\n\n\n<p id=\"c53d\">We can directly use the pandas to plot what we want. Isn\u2019t it very convenient?<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>##Cumulative Log Return\nret = np.log(data\/data.shift(1))\nret.cumsum().apply(np.exp).plot(figsize = (10,6))<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/tejwin20260323.j.webweb.today\/wp-content\/uploads\/1mT8vBPDtKBnRh-QKwwlt-g.png\" alt=\"\"\/><\/figure>\n\n\n\n<p id=\"e45f\">We use the<strong>&nbsp;DataFrame + the apply&nbsp;<\/strong>method to perform cumsum() function on the data after the log has been taken, and then perform np.exp() on the result in order to find the cumulative log return.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>##High\/Low\/Avg\nwindows = 20\ndata&#91;'min'] = data&#91;'2330'].rolling(windows).min()\ndata&#91;'mean'] = data&#91;'2330'].rolling(windows).mean()\ndata&#91;'max'] = data&#91;'2330'].rolling(windows).max()\nax = data&#91;&#91;'min', 'mean', 'max']].plot(figsize = (10, 6), style=&#91;'g--', 'r--', 'g--'], lw=1.2)\ndata&#91;'2330'].plot(ax=ax, lw=2.5)<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter caption-align-center\"><img decoding=\"async\" src=\"https:\/\/tejwin20260323.j.webweb.today\/wp-content\/uploads\/1fmjwzfX2aq2YkdrJe2wozA.png\" alt=\"\"\/><figcaption class=\"wp-element-caption\">TSMC 20 Days High, Low and Avg Price<\/figcaption><\/figure>\n\n\n\n<p id=\"e5eb\">Here we use the same concept to find out the 20 days high, low, and the average price of TSMC, and&nbsp;<strong>style = [\u2018g- -\u2019] to indicate the color and line presentation mode.<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>##Technical Analysis\n##Long-short term moving avg.\ndata&#91;'SMA_5'] = data&#91;'2330'].rolling(window = 5).mean()\ndata&#91;'SMA_20'] = data&#91;'2330'].rolling(window = 20).mean()\ndata&#91;&#91;'2330', 'SMA_5', 'SMA_20']].plot(figsize = (10,6))\nata.dropna(inplace = True)\ndata&#91;'Positions'] = np.where(data&#91;'SMA_5'] &gt; data&#91;'SMA_20'], 1, -1)\nax = data&#91;&#91;'2330', 'SMA_5', 'SMA_20', 'Positions']].plot(figsize = (10, 6), secondary_y = 'Positions')\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/tejwin20260323.j.webweb.today\/wp-content\/uploads\/1iHDVKkPaSNhDRue_MqBw-w.png\" alt=\"\"\/><\/figure>\n\n\n\n<p id=\"5aee\">Finally, with the application of a little technical analysis, we can find the long-short term moving averages and the intersection through np.where() function. Therefore, it could be seen that when the&nbsp;<strong>Position changes from 1 to -1, the trading signal point is generated.<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"f4a2\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p id=\"ea4a\">There are multiple ways to display the plots. We can only introduce the most basic methods here. If you have a high interest in plotting, you could do like explore more application websites or read documents of those packages~<br>Then, we will&nbsp;<strong>go further into financial data analysis and applications in the next article<\/strong>, please look forward to it \u2757\ufe0f\u2757\ufe0f<\/p>\n\n\n\n<p id=\"0dc2\">Finally, if you like this topic, please click \ud83d\udc4f below, giving us more support and encouragement. Additionally, if you have any questions or suggestions, please leave a message or email us, we will try our best to reply to you.\ud83d\udc4d\ud83d\udc4d<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"7069\"><span class=\"ez-toc-section\" id=\"Links_related_to_this_article_again\"><\/span>Links related to this article again!<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>1\ufe0f\u20e3 API Official Website:&nbsp;<\/strong><a href=\"https:\/\/api.tej.com.tw\/\" rel=\"noreferrer noopener\" target=\"_blank\"><strong>TEJ API Official Website<\/strong><\/a><\/li>\n\n\n\n<li><strong>2\ufe0f\u20e3 The Product Package:&nbsp;<\/strong><a href=\"https:\/\/eshop.tej.com.tw\/E-Shop\/Edata_caseIntro\/1\" rel=\"noreferrer noopener\" target=\"_blank\"><strong>TEJ E-SHOP<\/strong><\/a><\/li>\n\n\n\n<li><strong>3\ufe0f\u20e3 Source Code:&nbsp;<\/strong><a href=\"https:\/\/github.com\/tejtw\/TEJAPI_Python_Medium_DataAnalysis\" rel=\"noreferrer noopener\" target=\"_blank\"><strong>TEJ GITHUB<\/strong><\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>A plot is better than countless words After two weeks of some complicated articles, let\u2019s take a break and turn to our previous topic&nbsp;\u201cData Analysis\u201d&nbsp;and introduce another important tool when working on the data analysis-&nbsp;data visualization! If you forget what we have done few weeks ago, you can go back, review on them and come [&hellip;]<\/p>\n","protected":false},"featured_media":15583,"template":"","tags":[3584,3585,3176,3007],"insight-category":[690,50,3509],"class_list":["post-15582","insight","type-insight","status-publish","has-post-thumbnail","hentry","tag-data-visualization","tag-matplotlib","tag-python-2","tag-tejapi-data-analysis","insight-category-data-analysis","insight-category-fintech","insight-category-fintech-en"],"acf":[],"_links":{"self":[{"href":"https:\/\/tejwin20260323.j.webweb.today\/en\/wp-json\/wp\/v2\/insight\/15582","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tejwin20260323.j.webweb.today\/en\/wp-json\/wp\/v2\/insight"}],"about":[{"href":"https:\/\/tejwin20260323.j.webweb.today\/en\/wp-json\/wp\/v2\/types\/insight"}],"version-history":[{"count":1,"href":"https:\/\/tejwin20260323.j.webweb.today\/en\/wp-json\/wp\/v2\/insight\/15582\/revisions"}],"predecessor-version":[{"id":44101,"href":"https:\/\/tejwin20260323.j.webweb.today\/en\/wp-json\/wp\/v2\/insight\/15582\/revisions\/44101"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tejwin20260323.j.webweb.today\/en\/wp-json\/wp\/v2\/media\/15583"}],"wp:attachment":[{"href":"https:\/\/tejwin20260323.j.webweb.today\/en\/wp-json\/wp\/v2\/media?parent=15582"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tejwin20260323.j.webweb.today\/en\/wp-json\/wp\/v2\/tags?post=15582"},{"taxonomy":"insight-category","embeddable":true,"href":"https:\/\/tejwin20260323.j.webweb.today\/en\/wp-json\/wp\/v2\/insight-category?post=15582"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}