highfestiva / finplot

Performant and effortless finance plotting for Python
MIT License
885 stars 180 forks source link

Generating plot image without showing of the window (without call of fplt.show()) #422

Open Alfavisioner opened 1 year ago

Alfavisioner commented 1 year ago

Hi! Thank you for great job and for high speed.

I would like to migrate from mathplotlib. It is extremely slow in case of candles.

I use mathplotlib to generate trades chart image for backtesting purpose. mathplotlib have posibility to disable showing of the window dialogs, just to generate image in the backgound. Images are later used in html.

Finplot works great in the Window mode. But it is not possible to generate screenshots, without showing of the window. Or showing of windows it in the background mode.

Unfortunately i cannot use finplot on server side.

Something like fplt.screenshot_only() without interactive functionality, just as quick rendering engine.

Is it possible to do that?

P.S, I saw issue #104, but did not find answer.

highfestiva commented 1 year ago

Unfortunately I think not. I'm no expert on Qt, but this would involve creating some virtual or off-screen window and screenshotting that, is my guess. I have no idea how to perform such a stunt. Let me know if you find a solution.