Skip to content

Commit f58d178

Browse files
authored
Fixing comments of max. number of panels
Previously the comments say the max number of panels is 10. So I fixed it to be consistent with the current version, max. panels equal 32.
1 parent 1b3a5ab commit f58d178

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/mplfinance/_panels.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ def _build_panels( figure, config ):
2222
------
2323
The following items are used from `config`:
2424
25-
num_panels : integer (0-9) or None
25+
num_panels : integer (0-31) or None
2626
number of panels to create
2727
2828
addplot : dict or None
2929
value for the `addplot=` kwarg passed into `mplfinance.plot()`
3030
31-
volume_panel : integer (0-9) or None
31+
volume_panel : integer (0-31) or None
3232
panel id (0-number_of_panels)
3333
34-
main_panel : integer (0-9) or None
34+
main_panel : integer (0-31) or None
3535
panel id (0-number_of_panels)
3636
3737
panel_ratios : sequence or None
@@ -63,11 +63,12 @@ def _build_panels( figure, config ):
6363
addplot = config['addplot']
6464
volume = config['volume']
6565
volume_panel = config['volume_panel']
66+
num_panels = config['num_panels']
6667
main_panel = config['main_panel']
6768
panel_ratios = config['panel_ratios']
6869

6970
if not _valid_panel_id(main_panel):
70-
raise ValueError('main_panel id must be integer 0 to 9, but is '+str(main_panel))
71+
raise ValueError('main_panel id must be integer 0 to 31, but is '+str(main_panel))
7172

7273
if num_panels is None: # then infer the number of panels:
7374
pset = {0} # start with a set including only panel zero
@@ -84,12 +85,12 @@ def _build_panels( figure, config ):
8485
if panel in backwards_panel_compatibility:
8586
panel = backwards_panel_compatibility[panel]
8687
if not _valid_panel_id(panel):
87-
raise ValueError('addplot panel must be integer 0 to 9, but is "'+str(panel)+'"')
88+
raise ValueError('addplot panel must be integer 0 to 31, but is "'+str(panel)+'"')
8889
pset.add(panel)
8990

9091
if volume is True:
9192
if not _valid_panel_id(volume_panel):
92-
raise ValueError('volume_panel must be integer 0 to 9, but is "'+str(volume_panel)+'"')
93+
raise ValueError('volume_panel must be integer 0 to 31, but is "'+str(volume_panel)+'"')
9394
pset.add(volume_panel)
9495

9596
pset.add(main_panel)

0 commit comments

Comments
 (0)