Skip to content

Commit 3c22782

Browse files
Update README.md
1 parent f738cac commit 3c22782

File tree

1 file changed

+31
-37
lines changed

1 file changed

+31
-37
lines changed

README.md

Lines changed: 31 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,39 @@
1313

1414
# Contents
1515

16-
- **[Basic Usage](#usage)**
16+
- **[The New API](https://github.com/matplotlib/mplfinance#newapi)**
17+
- **[Basic Usage](https://github.com/matplotlib/mplfinance#usage)**
1718
- **[Adding Custom Data to Ohlcv Plots](https://github.com/matplotlib/mplfinance/blob/master/examples/addplot.ipynb)**
1819
- Customizing the Appearance of Plots (presently in development)
1920
- Technical Studies (presently in development)
20-
- **[Latest Release Info](#release)**
21-
- **[Some Background History About This Package](#history)**
22-
- **[Old API Availability](#oldapi)**
21+
- **[Latest Release Info](https://github.com/matplotlib/mplfinance#release)**
22+
- **[Some Background History About This Package](https://github.com/matplotlib/mplfinance#history)**
23+
- **[Old API Availability](https://github.com/matplotlib/mplfinance#oldapi)**
24+
25+
---
26+
## <a name="newapi"></a>The New API
27+
28+
This repository, `matplotlib/mplfinance`, contains a new **matplotlib finance** API that makes it easier to create financial plots. It interfaces nicely with **Pandas** DataFrames.
29+
30+
*More importantly, **the new API automatically does the extra matplotlib work that the user previously had to do "manually" with the old API.*** (The old API is still available within this package; see below).
31+
32+
The conventional way to import the new API is as follows:
33+
34+
```python
35+
import mplfinance as mpf
36+
```
37+
38+
The most common usage is then to call
39+
40+
```python
41+
mpf.plot(data)
42+
```
43+
44+
where `data` is a `Pandas DataFrame` object containing Open, High, Low and Close data, with a Pandas `DatetimeIndex`.
45+
46+
Details on how to call the new API can be found below under **[Basic Usage](https://github.com/matplotlib/mplfinance#usage)**, as well as in the jupyter notebooks in the **[examples](https://github.com/matplotlib/mplfinance/blob/master/examples/)** folder.
47+
48+
I am very interested to hear from you regarding what you think of the new `mplfinance`, plus any suggestions you may have for improvement. You can reach me at [email protected]
2349

2450
---
2551

@@ -504,22 +530,13 @@ mpf.plot(df[700:850],type='bars',volume=True,no_xgaps=True,mav=(20,40))
504530
For more examples of using mplfinance, please see the jupyter notebooks in the `examples` directory.
505531

506532
---
507-
508-
## COMING SOON:
509-
510-
- customize appearance of plot (colors, date format, etc)
511-
- show trading signals on plot
512-
- technical studies, such as:
513-
- Trading Envelope, Bollinger Bands
514-
- MACD
515-
- save plot to file
516533

517534
# <a name="release"></a>Release Notes
518535

519536
| Version | Description | Release Date |
520537
|----------|--------------|----------------|
521538
| 0.12.x | Ability plot arbitrary user data (in addition to basic OHLCV data).<br> - both line and scatter plots available.<br> - optionally plot on either the "main" or "lower" (aka "volume") axis. | 2020-01-09 |
522-
| 0.11.x | Basic Plotting from Pandas DataFrame of OHLC bars and candlesticks.<br> - optional display of volume<br> - optional display of (up to 3 different) moving averages.<br> - old API still available by importing from "mplfinance/original_flavor" | 2019-13-20 |
539+
| 0.11.x | Basic Plotting from Pandas DataFrame of OHLC bars and candlesticks.<br> - optional display of volume<br> - optional display of (up to 3 different) moving averages.<br> - old API still available by importing from "mplfinance/original_flavor" | 2019-12-20 |
523540
| 0.10.x | Old mpl-finance API set up as its own package<br> (i.e. removed from the matplotlib package). | 2016-09-08 |
524541

525542
---
@@ -529,28 +546,6 @@ My name is Daniel Goldfarb. In November 2019, I became the maintainer of `matpl
529546

530547
It is my intention to archive the `matplotlib/mpl-finance` repository soon, and direct everyone to `matplotlib/mplfinance`. The main reason for the rename is to avoid confusion with the hyphen and the underscore: As it was, `mpl-finance` was *installed with the hyphen, but imported with an underscore `mpl_finance`.* Going forward it will be a simple matter of both installing and importing `mplfinance`.
531548

532-
## The new API
533-
534-
At present (Dec 2019) this repository, `matplotlib/mplfinance`, contains an initial 'alpha', version of the new API for people to play with and provide feedback or pull requests for enhancements.
535-
536-
My own take on the old `mpl-finance` API is that the methods were too low-level, and too cumbersome to use. The new API in this current package automatically does the extra matplotlib work that the caller previously had to do "manually, on their own" with the old API.
537-
538-
The conventional way to import the new API is as follows:
539-
540-
```python
541-
import mplfinance as mpf
542-
```
543-
544-
The most common usage is to then call `mpf.plot(data)` where `data` is a `Pandas DataFrame` object containing Open, High, Low and Close data, with a Pandas `DatetimeIndex`.
545-
546-
---
547-
### For details on how to call the new API, see the jupyter notebook(s) in the examples folder:
548-
549-
### https://github.com/matplotlib/mplfinance/blob/master/examples/mplfinance_plot.ipynb
550-
551-
---
552-
I am very interested to hear from you regarding how you were using the old `mpl-finance` (if you were), what you think of the new `mplfinance`, plus any suggestions you may have for improvement. You can reach me at [email protected]
553-
554549
---
555550
### <a name="oldapi"></a>old API availability
556551

@@ -572,4 +567,3 @@ where `<method>` indicates the method you want to import, for example:
572567
```python
573568
from mplfinance.original_flavor import candlestick_ohlc
574569
```
575-

0 commit comments

Comments
 (0)