parameters: (
      indicator,
      new=True,
      axes=None,
      kref=None,
      legend_on=False,
      text_on=False,
      text_color='k',
      label=None,
      width=0.4,
      color='r',
      edgecolor='r',
      zero_on=False,
      *args,
      **kwargs
  )
return_statement: return gcf()
docstring: 绘制indicator柱状图
      
      :param Indicator indicator: Indicator实例
      :param axes:       指定的坐标轴
      :param new:        是否在新窗口中显示，只在没有指定axes时生效
      :param kref:       参考的K线数据，以便绘制日期X坐标
      :param legend_on:  是否打开图例
      :param text_on:    是否在左上角显示指标名称及其参数
      :param text_color: 指标名称解释文字的颜色，默认为黑色
      :param str label:  label显示文字信息，text_on 及 legend_on 为 True 时生效
      :param zero_on:    是否需要在y=0轴上绘制一条直线
      :param width:      Bar的宽度
      :param color:      Bar的颜色
      :param edgecolor:  Bar边缘颜色
      :param args:       pylab plot参数
      :param kwargs:     pylab plot参数
docstring_summary: 绘制indicator柱状图
      
      :param Indicator indicator: Indicator实例
      :param axes:       指定的坐标轴
      :param new:        是否在新窗口中显示，只在没有指定axes时生效
      :param kref:       参考的K线数据，以便绘制日期X坐标
      :param legend_on:  是否打开图例
      :param text_on:    是否在左上角显示指标名称及其参数
      :param text_color: 指标名称解释文字的颜色，默认为黑色
      :param str label:  label显示文字信息，text_on 及 legend_on 为 True 时生效
      :param zero_on:    是否需要在y=0轴上绘制一条直线
      :param width:      Bar的宽度
      :param color:      Bar的颜色
      :param edgecolor:  Bar边缘颜色
      :param args:       pylab plot参数
      :param kwargs:     pylab plot参数
docstring_tokens: 绘制indicator柱状图 : param Indicator indicator : Indicator实例 : param axes : 指定的坐标轴 : param new : 是否在新窗口中显示，只在没有指定axes时生效 : param kref : 参考的K线数据，以便绘制日期X坐标 : param legend_on : 是否打开图例 : param text_on : 是否在左上角显示指标名称及其参数 : param text_color : 指标名称解释文字的颜色，默认为黑色 : param str label : label显示文字信息，text_on 及 legend_on 为 True 时生效 : param zero_on : 是否需要在y = 0轴上绘制一条直线 : param width : Bar的宽度 : param color : Bar的颜色 : param edgecolor : Bar边缘颜色 : param args : pylab plot参数 : param kwargs : pylab plot参数
function: def ibar(
      indicator,
      new=True,
      axes=None,
      kref=None,
      legend_on=False,
      text_on=False,
      text_color='k',
      label=None,
      width=0.4,
      color='r',
      edgecolor='r',
      zero_on=False,
      *args,
      **kwargs
  ):
      """绘制indicator柱状图
      
      :param Indicator indicator: Indicator实例
      :param axes:       指定的坐标轴
      :param new:        是否在新窗口中显示，只在没有指定axes时生效
      :param kref:       参考的K线数据，以便绘制日期X坐标
      :param legend_on:  是否打开图例
      :param text_on:    是否在左上角显示指标名称及其参数
      :param text_color: 指标名称解释文字的颜色，默认为黑色
      :param str label:  label显示文字信息，text_on 及 legend_on 为 True 时生效
      :param zero_on:    是否需要在y=0轴上绘制一条直线
      :param width:      Bar的宽度
      :param color:      Bar的颜色
      :param edgecolor:  Bar边缘颜色
      :param args:       pylab plot参数
      :param kwargs:     pylab plot参数
      """
      if not indicator:
          print("indicator is None")
          return
  
      if not axes:
          axes = create_figure() if new or gca() is None else gca()
  
      if not label:
          label = "%s %.2f" % (indicator.long_name, indicator[-1])
  
      line_color = trans_color(color)
  
      py_indicator = [None if x == constant.null_price else x for x in indicator]
      if kref:
          width = 12*60*60*1000
          x_value = [r.datetime() for r in kref.get_datetime_list()]
          source = ColumnDataSource(dict(datetime=x_value, value=py_indicator))
          if legend_on:
              axes.vbar(x='datetime', top='value', legend_label=label, width=width, 
                        color=line_color, source=source)
              axes.legend.location = "top_left"
          else:
              axes.vbar(x='datetime', top='value', width=width, color=line_color, 
                        source=source)
          axes.add_tools(HoverTool(tooltips=[("index", "$index"), ('指标', indicator.name),
                                   ('日期', get_date_format(kref)), ("值", "@value{0.0000}")],
                       formatters = { "datetime": "datetime"}))
          axes.xaxis[0].formatter = DatetimeTickFormatter()
      else:
          width = 0.5
          x_value = list(range(len(indicator)))
          source = ColumnDataSource(dict(datetime=x_value, value=py_indicator))
          if legend_on:
              axes.vbar(x='datetime', top='value', legend_label=label, width=width, 
                        color=line_color, source=source)
              axes.legend.location = "top_left"
          else:
              axes.vbar(x='datetime', top='value', width=width, color=line_color, 
                        source=source)
          axes.add_tools(HoverTool(tooltips=[("index", "$index"), ('指标', indicator.name),
                                   ("值", "@value{0.0000}")]))
  
      if text_on:
          label = Label(
              x=int(axes.plot_width * 0.01),
              y=int(axes.plot_height * 0.88),
              x_units='screen', y_units='screen',
              text=label,
              render_mode='css',
              text_font_size='14px',
              text_color=trans_color(text_color),
              background_fill_color='white', 
              background_fill_alpha=0.5
          )
          axes.add_layout(label)
  
      axes.tags.append(line_color)
      return gcf()
function_tokens: def ibar ( indicator , new = True , axes = None , kref = None , legend_on = False , text_on = False , text_color = 'k' , label = None , width = 0.4 , color = 'r' , edgecolor = 'r' , zero_on = False , * args , * * kwargs ) : if not indicator : print ( "indicator is None" ) return if not axes : axes = create_figure ( ) if new or gca ( ) is None else gca ( ) if not label : label = "%s %.2f" % ( indicator . long_name , indicator [ - 1 ] ) line_color = trans_color ( color ) py_indicator = [ None if x == constant . null_price else x for x in indicator ] if kref : width = 12 * 60 * 60 * 1000 x_value = [ r . datetime ( ) for r in kref . get_datetime_list ( ) ] source = ColumnDataSource ( dict ( datetime = x_value , value = py_indicator ) ) if legend_on : axes . vbar ( x = 'datetime' , top = 'value' , legend_label = label , width = width , color = line_color , source = source ) axes . legend . location = "top_left" else : axes . vbar ( x = 'datetime' , top = 'value' , width = width , color = line_color , source = source ) axes . add_tools ( HoverTool ( tooltips = [ ( "index" , "$index" ) , ( '指标', in d cator.nam e ), ( '日期', ge t date_format(kre f )),  ( " 值 ,  "@va l e{0.0000}")], formatters = { "datetime" : "datetime" } ) ) axes . xaxis [ 0 ] . formatter = DatetimeTickFormatter ( ) else : width = 0.5 x_value = list ( range ( len ( indicator ) ) ) source = ColumnDataSource ( dict ( datetime = x_value , value = py_indicator ) ) if legend_on : axes . vbar ( x = 'datetime' , top = 'value' , legend_label = label , width = width , color = line_color , source = source ) axes . legend . location = "top_left" else : axes . vbar ( x = 'datetime' , top = 'value' , width = width , color = line_color , source = source ) axes . add_tools ( HoverTool ( tooltips = [ ( "index" , "$index" ) , ( '指标', in d cator.nam e ), ( "值",  " value{0.0000}")] ) ) if text_on : label = Label ( x = int ( axes . plot_width * 0.01 ) , y = int ( axes . plot_height * 0.88 ) , x_units = 'screen' , y_units = 'screen' , text = label , render_mode = 'css' , text_font_size = '14px' , text_color = trans_color ( text_color ) , background_fill_color = 'white' , background_fill_alpha = 0.5 ) axes . add_layout ( label ) axes . tags . append ( line_color ) return gcf ( )