Questions tagged [mplfinance]

questions relating to python package "mplfinance" (which is part of the "matplotlib" organization)

How to Install

# at the Anaconda prompt if using the Anaconda distribution
conda install -c conda-forge mplfinance

# if not using Anaconda
pip install --upgrade mplfinance
163 questions
3
votes
2 answers

Plot multiple mplfinance plots sharing x axis

I am trying to plot 5 charts one under the other with mplfinance. This works: for coin in coins: mpf.plot(df_coins[coin], title=coin, type='line', volume=True, show_nontrading=True) However each plot is a separate image in my Python Notebook…
P i
  • 29,020
  • 36
  • 159
  • 267
3
votes
3 answers

Matplotlib / Mplfinance Correct usage of 'y_on_right'?

Using Mplfinance. I am hoping someone can clarify the correct usage of the 'y_on_right' parameter. I believe I am using mpf.make_addplot() correctly but it will not move the y axis to the other side of the chart. Using the docs provided. TIA. …
cwfmoore
  • 225
  • 3
  • 11
3
votes
1 answer

Matplotib Finance (mplfinance) formatting axes of chart unsing mpf.plot()

The MPL finance is great, however I cant seem to tweak the formatting of the axes. In the image I would like to show only the date, without the 00:00 time. Also the price, I would like to add a $ currency and decimal places (variable). import…
cwfmoore
  • 225
  • 3
  • 11
3
votes
2 answers

find list of colors in mplfinance for seq_col to draw lines

Can't find anything in the dokumentation: https://pypi.org/project/mplfinance/ Need to draw lines in different colors, found just theese color codes: 'b','r','c','k','g' A few more colors would be great - didn't find a list in the…
Chris0815
  • 69
  • 6
3
votes
3 answers

matplotlib / mplfinance is it possible to add a title to the plot?

I have made a plot with mplfinance: Is it possible to add an title to the mplfinance plot(like plt.title(stock)? Or is it possible a chart like that with matplotlib? apdict =…
Yvar
  • 155
  • 4
  • 14
3
votes
2 answers

Overlaying data in a candlestick chart

My very 1st need is to overlay a curve over a candlestick chart. To draw this candlestick chart, mplfinance appears very nice. Unfortunately, I have found no way to overlay additional curve to the candlestick. Considering example below, if anyone of…
pierre_j
  • 895
  • 2
  • 11
  • 26
3
votes
2 answers

Is there a logarithmic scale setting for mplfinance?

This is the code I am using to plot stock price charts with mplfinance and I would like the graph to be log scaled. How can I accomplish this? import mplfinance as mpf # Data reading and processing steps omitted mpf.plot(data, type='line')
JakeBoggs
  • 274
  • 4
  • 17
3
votes
2 answers

How to use pandas dataframe to plot point and figure chart

I am using Pandas dataframe to manipulate a financial time series consists of closing prices and time. I would like to display the results in Point and Figure chart of Xs and Os. However, I can't find any visualization package in Python to do…
2
votes
1 answer

How to draw a circle containing some values given a range of indices and patch it to a MatPlotLib panel properly? Python related

I have been struggling trying to make a program draw a circle containing the corresponding values of a specific range of indices in a MatplotLibAxes object, here's the data input stored in a variable called df: Index Start Date Open Price High…
NoahVerner
  • 937
  • 2
  • 9
  • 24
2
votes
1 answer

Shading regions inside an mplfinance chart

I am using matplotlib v 3.7.0, mplfinance version '0.12.9b7', and Python 3.10. I am trying to shade regions of a plot, and although my logic seems correct, the shaded areas are not being displayed on the plot. This is my code: import yfinance as…
Homunculus Reticulli
  • 65,167
  • 81
  • 216
  • 341
2
votes
1 answer

how to make the mplfinance charts always display years

the mplfinance chart will only display years when the dates of the data are crossing different years (here 2014-2015) like: otherwise, the dates on the chart will look like: how to make the year information always be displayed on the chart?
kay
  • 147
  • 1
  • 8
2
votes
0 answers

How to change the x-axis ticks using mpl finance [solved]

Im making a program that creates an OHLC price graph for every asset in the list I provide, but im trying to change the ticks of my x-axis to make it quarterly. I found a solution, but the ticks are not in the same month every year, so it is not…
2
votes
0 answers

How to hide data label, and show data label when my mouse point a candle?

I want to do something like this picture: enter image description here When my mouse point a candle and then show the candle data label. How can I get it? I know i can use axes.text() to set data label, but it will alway show on the graph. Can…
Ryan
  • 25
  • 3
2
votes
1 answer

OHLC and Volume Data on the same Panel using mplfinance

Is there a way to plot the volume and OHLC data on the same panel? I tried putting the panel IDs same for both but that only plots the volume data (I guess the volume data is plotted onto later, and hence replaces the OHLC data?). kwargs = { …
Archit
  • 23
  • 2
2
votes
1 answer

Matplotlib (or mplfinance) two animation.FuncAnimation with different intervals

In python matplotlib finance Is it possible to have two different figures with animation.FuncAnimation in mplfinance where one has 12 axis with different style and another figure has two planes one for bar and another for volume. Another reason is…
1
2
3
10 11