Mplfinance: Is it possible to do "bbox_inches='tight'" when saving a fig?

Created on 3 May 2020  路  2Comments  路  Source: matplotlib/mplfinance

In mpl-finance, when saving an image without using bbox_inches='tight' saved the image with big white areas surrounding the plot, Just like what happens with the current mplfinance.

How it should looks like with bbox_inches='tight':
descarga (2)

How it looks like now:
7e563426-ff13-467b-ae1c-238cde353116

Notice the big white margins

Is there any way to achieve what bbox_inches='tight' does with the current mplfinance package?

question

Most helpful comment

@3dvg
Eduardo
Yes, you can do this already. See "Specifying image attributes with savefig" just below cell number 8 in this notebook and see also cell number 9 in the same notebook.

You can specify bbox_inches='tight' when using the savefig kwarg:

mpf.plot( data, savefig=dict(fname='myfile',bbox_inches='tight') )

All 2 comments

I will look into this. Possibly will do. ( or it will become do-able through #17 )

@3dvg
Eduardo
Yes, you can do this already. See "Specifying image attributes with savefig" just below cell number 8 in this notebook and see also cell number 9 in the same notebook.

You can specify bbox_inches='tight' when using the savefig kwarg:

mpf.plot( data, savefig=dict(fname='myfile',bbox_inches='tight') )
Was this page helpful?
0 / 5 - 0 ratings

Related issues

obahat picture obahat  路  3Comments

ghost355 picture ghost355  路  5Comments

kitt-th picture kitt-th  路  5Comments

ismailbayram picture ismailbayram  路  4Comments

allahyarzadeh picture allahyarzadeh  路  3Comments