Skip to content

Commit 8a21aab

Browse files
authored
Merge pull request #2 from matplotlib/master
Update fork with latest version from origin
2 parents a84047b + 385b27c commit 8a21aab

File tree

190 files changed

+142164
-1682
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

190 files changed

+142164
-1682
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ __pycache__
66
*.egg-info
77
.tox/
88
.cache/
9+
*.code-workspace

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@ matrix:
88
- python: 3.8
99
install:
1010
- pip install tox-travis
11-
script: tox
11+
script:
12+
- tox
13+
- /bin/bash scripts/check_version.sh $TRAVIS_PULL_REQUEST

CONTRIBUTING.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
- Contributing can as simple as **asking questions**, participating in discussions, suggesting enhancements, etc. **All of these are valuable!** There are many ways to contribute.
2+
3+
- All of the usual/typical open source contribution guidelines apply (see for example, **[Matplotlib Contributing](https://matplotlib.org/3.1.1/devel/contributing.html)** and **[Open Source Guide to Contributing](https://opensource.guide/how-to-contribute/)**). Therefore, here, on this page, we will mention just a few items that we may be particular about in **mplfinance**.
4+
5+
6+
- Coding:
7+
- If you write code, please don't use tabs; rather use spaces.
8+
- If you add a significant feature --that is, a feature for which explaining its usage takes more than just a few sentences-- please also create a "tutorial notebook" for that feature. **[For examples of tutorial notebooks, please see the jupyter notebooks in the examples folder.](https://github.com/matplotlib/mplfinance/tree/master/examples)**
9+
- If you add a significant feature, please also create a regression test file **[in the tests folder](https://github.com/matplotlib/mplfinance/tree/master/tests)**, similar to the other regression tests that are there. *Often, the simplest way to do this is to take a few of the examples from the feature's "tutorial notebook"* (see previous point).

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include LICENSE

README.md

Lines changed: 26 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,32 @@
11
[![Build Status](https://travis-ci.org/matplotlib/mplfinance.svg?branch=master)](https://travis-ci.org/matplotlib/mplfinance)
22

33
# mplfinance
4-
## matplotlib utilities for the visualization, and visual analysis, of financial data
4+
matplotlib utilities for the visualization, and visual analysis, of financial data
55

6-
---
6+
## Installation
7+
```bash
8+
pip install --upgrade mplfinance
9+
```
10+
- mplfinance requires [matplotlib](https://pypi.org/project/matplotlib/) and [pandas](https://pypi.org/project/pandas/)
711

8-
# Installation
9-
##    `pip install --upgrade mplfinance`
10-
- mplfinance requires [matplotlib](https://pypi.org/project/matplotlib/) and [pandas](https://pypi.org/project/pandas/)
12+
---
1113

14+
## <a name="announcements"></a>**&roarr; [Latest Release Information](https://github.com/matplotlib/mplfinance/blob/master/RELEASE_NOTES.md) &loarr;**
1215
---
1316

14-
# Contents
17+
## <a name="tutorials"></a>Contents and Tutorials
1518

1619
- **[The New API](https://github.com/matplotlib/mplfinance#newapi)**
17-
- **[Basic Usage](https://github.com/matplotlib/mplfinance#usage)**
18-
- **[Adding Your Own Technical Studies to Plots](https://github.com/matplotlib/mplfinance/blob/master/examples/addplot.ipynb)**
19-
- **[Saving the Plot to a File](https://github.com/matplotlib/mplfinance/blob/master/examples/savefig.ipynb)**
20-
- **[Customizing the Appearance of Plots](https://github.com/matplotlib/mplfinance/blob/master/examples/customization_and_styles.ipynb)**
21-
- **[Price-Movement Plots (Renko, P&F, etc)](https://github.com/matplotlib/mplfinance/blob/master/examples/price-movement_plots.ipynb)**
22-
- Technical Studies (presently in development)
23-
- **[Latest Release Info](https://github.com/matplotlib/mplfinance#release)**
20+
- **[Tutorials](https://github.com/matplotlib/mplfinance#tutorials)**
21+
- **[Basic Usage](https://github.com/matplotlib/mplfinance#usage)**
22+
- **[Customizing the Appearance of Plots](https://github.com/matplotlib/mplfinance/blob/master/markdown/customization_and_styles.md)** (New features: June 2020)
23+
- **[Adding Your Own Technical Studies to Plots](https://github.com/matplotlib/mplfinance/blob/master/examples/addplot.ipynb)**
24+
- **[Subplots: Multiple Plots on a Single Figure](https://github.com/matplotlib/mplfinance/blob/master/markdown/subplots.md)** (**New features: August 2020**)
25+
- **[Price-Movement Plots (Renko, P&F, etc)](https://github.com/matplotlib/mplfinance/blob/master/examples/price-movement_plots.ipynb)**
26+
- **[Trends, Support, Resistance, and Trading Lines](https://github.com/matplotlib/mplfinance/blob/master/examples/using_lines.ipynb)**
27+
- **[Saving the Plot to a File](https://github.com/matplotlib/mplfinance/blob/master/examples/savefig.ipynb)**
28+
- **[Animation/Updating your plots in realtime](https://github.com/matplotlib/mplfinance/blob/master/markdown/animation.md)** (**New: August 2020**)
29+
- **&roarr; [Latest Release Info](https://github.com/matplotlib/mplfinance/blob/master/RELEASE_NOTES.md) &loarr;**
2430
- **[Some Background History About This Package](https://github.com/matplotlib/mplfinance#history)**
2531
- **[Old API Availability](https://github.com/matplotlib/mplfinance#oldapi)**
2632

@@ -51,7 +57,7 @@ I am very interested to hear from you regarding what you think of the new `mplfi
5157

5258
---
5359

54-
# <a name="usage"></a>Basic Usage
60+
## <a name="usage"></a>Basic Usage
5561
Start with a Pandas DataFrame containing OHLC data. For example,
5662

5763

@@ -163,7 +169,6 @@ daily.tail(3)
163169
</table>
164170

165171

166-
---
167172
<br>
168173

169174
After importing mplfinance, plotting OHLC data is as simple as calling `mpf.plot()` on the dataframe
@@ -178,7 +183,6 @@ mpf.plot(daily)
178183
![png](https://raw.githubusercontent.com/matplotlib/mplfinance/master/readme_files/readme_4_1.png)
179184

180185

181-
---
182186
<br>
183187

184188
The default plot type, as you can see above, is `'ohlc'`. Other plot types can be specified with the keyword argument `type`, for example, `type='candle'`, `type='line'`, `type='renko'`, or `type='pnf'`
@@ -377,7 +381,7 @@ intraday.tail(3)
377381

378382

379383

380-
The above dataframe contains Open,High,Low,Close data at 1 minute intervervals for the S&P 500 stock index for November 5, 6, 7 and 8, 2019. Let's look at the last hour of trading on November 6th, with a 7 minute and 12 minute moving average.
384+
The above dataframe contains Open,High,Low,Close data at 1 minute intervals for the S&P 500 stock index for November 5, 6, 7 and 8, 2019. Let's look at the last hour of trading on November 6th, with a 7 minute and 12 minute moving average.
381385

382386

383387
```python
@@ -568,22 +572,6 @@ mpf.plot(df[700:850],type='bars',volume=True,mav=(20,40))
568572

569573
For more examples of using mplfinance, please see the jupyter notebooks in the **[`examples`](https://github.com/matplotlib/mplfinance/blob/master/examples/)** directory.
570574

571-
---
572-
573-
# <a name="release"></a>Release Notes
574-
575-
| Version | Description | Release Date |
576-
|:---------|:-------------|:---------------|
577-
| 0.12.3a3 | - `linecolor` kwarg for line plots<br> - implement save figure to in-memory buffer<br> -- Thank you Caleb Coffin @coffincw for contributing the above. | 2020-03-04 |
578-
| 0.12.3a2 | - implement custom markers (issue#30)<br> - fix minor issue with chart `type` validator<br> -- Thank you Amir Atashin @amiaty for contributing the above.<br> - add internal functions: `_bypass_kwarg_validation()` and `_kwarg_not_implemented()` | 2020-02-21 |
579-
| 0.12.3a1 | - fix issue#28: math.log crash on zero in data<br> - remove "Implemented" field from kwarg dicts<br> - yahoo style show colors for `ohlc bars` | 2020-02-16 |
580-
| 0.12.3a0 | - kwarg `block=False` for non-blocking call to `mpf.plot()`<br> - customize aspect ratio, figure title, y-labels<br> - customize colors and other `style` aspects of plot<br> - `no_xgaps` now defaults to True: use `show_nontrading=True` to set no_xgaps to false<br> - secondary y-axis available to `make_addplot()`<br> - bug fix for volume widths | 2020-02-12 |
581-
| 0.12.0a3 | Increase mav limit from 3 to 7 different mavs | 2020-01-16 |
582-
| 0.12.0a2 | Ability to save plot to a file (pdf, svg, png, jpg, ...) | 2020-01-14 |
583-
| 0.12.0a1 | Ability to 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 |
584-
| 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 |
585-
| 0.10.x | Old mpl-finance API set up as its own package<br> (i.e. removed from the matplotlib package). | 2016-09-08 |
586-
587575
---
588576

589577
## <a name="history"></a>Some History
@@ -592,9 +580,12 @@ My name is Daniel Goldfarb. In November 2019, I became the maintainer of `matpl
592580
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`.
593581

594582
---
595-
### <a name="oldapi"></a>old API availability
583+
## <a name="oldapi"></a>Old API availability
584+
585+
**With this new ` mplfinance ` package installed, in addition to the new API, users can still access the old API**.<br> The old API may be removed someday, but for the foreseeable future we will keep it ... at least until we are very confident that users of the old API can accomplish the same things with the new API.
586+
587+
To access the old API with the new ` mplfinance ` package installed, change the old import statments
596588

597-
With this new ` mplfinance ` package installed, in addition to the new API, users can still access the old API (at least for the next several months) by changing their import statments<br>
598589
**from:**
599590

600591
```python
@@ -615,10 +606,3 @@ where `<method>` indicates the method you want to import, for example:
615606
```python
616607
from mplfinance.original_flavor import candlestick_ohlc
617608
```
618-
619-
---
620-
621-
622-
```python
623-
624-
```

0 commit comments

Comments
 (0)