Before using Python to edit PowerPoint, you need to have the python-pptx package. Please note that to make the background transparent, you only have to specify transparent=True. Save the plotįinally, we save the figure into PNG format. Change the border color and make the line width largerįor axis in : ax.t_color('#43B7A4') ax.t_linewidth(4) 4.Change the font size and font color for the y-axis ticksĪx.tick_params(axis='y', colors='#43B7A4', labelsize=20).There are a few things I have made to polish the plots. Just one thing to remind is that I have a checking here to remove those None data in the price list since I found there are some missing data in the list. To get the price list, we just have to check the dictionary structure of the data and you can get it. page = requests.get(url, headers=header) temp_json = json.loads(page.text) 2. The rest should be easy to understand which is the common procedure to get the page data and load as JSON format. Import json import matplotlib.pyplot as plt top_name = top_df.replace('/', '') bottom_name = bottom_df.replace('/', '') for idx in range(2): name = file_path = url = ' ' + name + '=X?region=US&lang=en-US&includePrePost=false&interval=30m&useYfid=true&range=1mo&corsDomain=&.tsrc=finance' header = Format the plots such as colouring, font size or transparent background so as to align with the PPT theme.Extract the closing pricing and plot in a line chart.Get the data for the currencies exchange rate.Don’t worry! I will explain step-by-step and it would be pretty easy to follow. To generate the plot, you only need to follow the below codes. The only things left would be the two plots. Data Structure of top_df and bottom_df (Photo by cyda)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |