I am trying to add an arrow on a given date and price to mpf plot. To do this i have the following code: But it is producing the following error: Could you please advise how can i resolve this. Answer If your ultimate goal is to add an arrow to the title of the question, you can add it
Tag: mplfinance
mplFinance edit x-axis to show seconds
I am wondering if there is a way to have an MPLFinance plot show more keys(time) and seconds as well as minutes. I know you are able to add the minute, but can’t find anywhere to add the seconds. Answer You can tell mpf.plot() how you want to format the datetime axis using kwarg datetime_format=. You can use any valid
Changing margin on mplfinance plot when savefig
I have the following code which produces finance plot: But the image which it generated left a lot of space on all side, so i include the parameter tight_layout=True however now i a getting an image which looks like this: The title is inside the image. Could you advise how can i change the margin where the left and right
how do you set alpha vantage date as a column?
I am trying to plot data from Alpha Vantage. when I do I get: as you can see, ‘date’ is not on there. this is causing me problems when I start using mplfinance and matplotlib. Can anyone help? ps: my excel sheet looks like this date 1. open … 2021-02-03 243 2021-02-02 245 Answer Glancing at what you have shown
how to draw outside mplfinance plot?
I get the error message: Is there a way to plot outside the range? Answer The workaround for this is to set show_nontrading=True I tested with your code, modifying to: and get The reason this does not work with show_nontrading=False (the default, if unspecified, value) is because in that case the x-axis values are actually just integers representing the row