Python Forum
xlsxwriter + mplfinance: Plot Stock Chart in Excel Worksheet
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
xlsxwriter + mplfinance: Plot Stock Chart in Excel Worksheet
#2
I was able to insert charts into multiple sheets. However, the chart was first saved on the local drive and then inserted in spreadsheet.

for ticker in ticker:
	workbook.add_worksheet(ticker) 
	activeSheet = workbook.get_worksheet_by_name(ticker)
	filt2 = (dfInit["Ticker"] == ticker)
	mpf.plot(dfInit[filt2], title = ticker, type = "candle", style = "classic", savefig = ticker + ".png")
	activeSheet.insert_image(1, 1, ticker + ".png")
Can we do the same without saving the png to the local drive?
Reply


Messages In This Thread
RE: xlsxwriter + mplfinance: Plot Stock Chart in Excel Worksheet - by KMV - Mar-09-2021, 09:44 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Create simple live plot of stock data dram 2 2,955 Jan-27-2023, 04:34 AM
Last Post: CucumberNox
  Create Excel Line Chart Programmatically dee 3 1,219 Dec-30-2022, 08:44 PM
Last Post: dee
  Changing the initial worksheet name in an MS Excel file azizrasul 3 1,002 Oct-02-2022, 07:56 PM
Last Post: azizrasul
  Sample labels from excel file in order to put them on x-axis and y-axis of a plot hobbyist 11 4,451 Sep-14-2021, 08:29 AM
Last Post: hobbyist
  Xlsxwriter: Create Multiple Sheets Based on Dataframe's Sorted Values KMV 2 3,537 Mar-09-2021, 12:24 PM
Last Post: KMV
  Python Matplotlib: Create chart for every 4 columns in Excel file JaneTan 2 2,811 Feb-28-2021, 05:02 AM
Last Post: JaneTan
  How to plot intraday data of several days in one plot mistermister 3 2,949 Dec-15-2020, 07:43 PM
Last Post: deanhystad
  xlsxwriter in windows dfstrottersfan 2 2,369 Sep-23-2020, 11:41 AM
Last Post: dfstrottersfan
  How to plot gantt chart using matplotlib Mekala 1 2,668 Jul-16-2020, 07:21 PM
Last Post: Marbelous
  Write tables from Word (.docx) to Excel (.xlsx) using xlsxwriter jackie 1 3,234 May-27-2020, 11:47 PM
Last Post: mcmxl22

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020