code: def calcrows(self, strategy):
      # Calculate the total number of rows
      rowsmajor = self.pinf.sch.rowsmajor
      rowsminor = self.pinf.sch.rowsminor
      nrows = 0
  
      datasnoplot = 0
      for data in strategy.datas:
          if not data.plotinfo.plot:
              # neither data nor indicators nor volume add rows
              datasnoplot += 1
              self.dplotsup.pop(data, None)
              self.dplotsdown.pop(data, None)
              self.dplotsover.pop(data, None)
  
          else:
              pmaster = data.plotinfo.plotmaster
              if pmaster is data:
                  pmaster = None
              if pmaster is not None:
                  # data doesn't add a row, but volume may
                  if self.pinf.sch.volume:
                      nrows += rowsminor
              else:
                  # data adds rows, volume may
                  nrows += rowsmajor
                  if (
                      self.pinf.sch.volume
                      and not self.pinf.sch.voloverlay
                  ):
                      nrows += rowsminor
  
      if False:
          # Datas and volumes
          nrows += (len(strategy.datas) - datasnoplot) * rowsmajor
          if self.pinf.sch.volume and not self.pinf.sch.voloverlay:
              nrows += (len(strategy.datas) - datasnoplot) * rowsminor
  
      # top indicators/observers
      nrows += len(self.dplotstop) * rowsminor
  
      # indicators above datas
      nrows += sum(len(v) for v in self.dplotsup.values())
      nrows += sum(len(v) for v in self.dplotsdown.values())
  
      self.pinf.nrows = nrows
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import bisect
  import collections
  import datetime
  import itertools
  import math
  import operator
  import sys
  import matplotlib
  import numpy
  import matplotlib.dates
  import matplotlib.font_manager
  import matplotlib.legend
  import matplotlib.ticker
  from ..utils.py3 import range, with_metaclass, string_types, integer_types
  from ..None import AutoInfoClass, MetaParams, TimeFrame, date2num
  from .finance import plot_candlestick, plot_ohlc, plot_volume, plot_lineonclose
  from .formatters import MyVolFormatter, MyDateFormatter, getlocator
  from .None import locator
  from .multicursor import MultiCursor
  from .scheme import PlotScheme
  from .utils import tag_box_style
label_desc: Use image node_id 5 for calling the Plot_OldSync obj's underlying member method code with example usage: obj.calcrows(strategy) without return types