code: def plotvolume(
      self, data, opens, highs, lows, closes, volumes, label
  ):
      pmaster = data.plotinfo.plotmaster
      if pmaster is data:
          pmaster = None
      voloverlay = self.pinf.sch.voloverlay and pmaster is None
  
      # if sefl.pinf.sch.voloverlay:
      if voloverlay:
          rowspan = self.pinf.sch.rowsmajor
      else:
          rowspan = self.pinf.sch.rowsminor
  
      ax = self.newaxis(data.volume, rowspan=rowspan)
  
      # if self.pinf.sch.voloverlay:
      if voloverlay:
          volalpha = self.pinf.sch.voltrans
      else:
          volalpha = 1.0
  
      maxvol = volylim = max(volumes)
      if maxvol:
          # Plot the volume (no matter if as overlay or standalone)
          vollabel = label
          (volplot,) = plot_volume(
              ax,
              self.pinf.xdata,
              opens,
              closes,
              volumes,
              colorup=self.pinf.sch.volup,
              colordown=self.pinf.sch.voldown,
              alpha=volalpha,
              label=vollabel,
          )
  
          nbins = 6
          prune = "both"
          # if self.pinf.sch.voloverlay:
          if voloverlay:
              # store for a potential plot over it
              nbins = int(nbins / self.pinf.sch.volscaling)
              prune = None
  
              volylim /= self.pinf.sch.volscaling
              ax.set_ylim(0, volylim, auto=True)
          else:
              # plot a legend
              handles, labels = ax.get_legend_handles_labels()
              if handles:
                  # location can come from the user
                  loc = (
                      data.plotinfo.legendloc
                      or self.pinf.sch.legendindloc
                  )
  
                  # Legend done here to ensure it includes all plots
                  legend = ax.legend(
                      loc=loc,
                      numpoints=1,
                      frameon=False,
                      shadow=False,
                      fancybox=False,
                      prop=self.pinf.prop,
                  )
  
          locator = mticker.MaxNLocator(nbins=nbins, prune=prune)
          ax.yaxis.set_major_locator(locator)
          ax.yaxis.set_major_formatter(MyVolFormatter(maxvol))
  
      if not maxvol:
          ax.set_yticks([])
          return None
  
      return volplot
  
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 8 for calling the Plot_OldSync obj's underlying member method code with example usage: obj.plotvolume(data, opens, highs, lows, closes, volumes, label) and returns: volplot, None