Skip to content

Commit f0b0998

Browse files
committed
Support plotting datas on same y-axis
1 parent 233be6f commit f0b0998

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

backtrader/plot/plot.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,9 @@ def plotdata(self, data, indicators):
595595
else:
596596
if data.plotinfo.plotmaster is None:
597597
ax = self.newaxis(data, rowspan=self.pinf.sch.rowsmajor)
598+
elif getattr(data.plotinfo, 'sameaxis', False):
599+
axdatamaster = self.pinf.daxis[data.plotinfo.plotmaster]
600+
ax = axdatamaster
598601
else:
599602
axdatamaster = self.pinf.daxis[data.plotinfo.plotmaster]
600603
ax = axdatamaster.twinx()

0 commit comments

Comments
 (0)