code: def pie_plot(df, value='value', category='variable',
               ax=None, legend=False, title=True, cmap=None,
               **kwargs):
      
      for col in set(SORT_IDX) - set([category]):
          if len(df[col].unique()) > 1:
              msg = 'Can not plot multiple {}s in pie_plot with value={},' +\
                  ' category={}'
              raise ValueError(msg.format(col, value, category))
  
      if ax is None:
          fig, ax = plt.subplots()
  
      # get data, set negative values to explode
      _df = df.groupby(category)[value].sum()
      where = _df > 0
      explode = tuple(0 if _ else 0.2 for _ in where)
      _df = _df.abs()
  
      # explicitly get colors
      defaults = default_props(reset=True, num_colors=len(_df.index),
                               colormap=cmap)['color']
      rc = run_control()
      color = []
      for key, c in zip(_df.index, defaults):
          if 'color' in rc and \
             category in rc['color'] and \
             key in rc['color'][category]:
              c = rc['color'][category][key]
          color.append(c)
  
      # plot data
      _df.plot(kind='pie', colors=color, ax=ax, explode=explode, **kwargs)
  
      # add legend
      ax.legend(loc='center left', bbox_to_anchor=(1.0, 0.5), labels=_df.index)
      if not legend:
          ax.legend_.remove()
  
      # remove label
      ax.set_ylabel('')
  
      return ax
docs: Plot data as a bar chart.
  
      Parameters
      ----------
      df : pd.DataFrame
          Data to plot as a long-form data frame
      value : string, optional
          The column to use for data values
          default: value
      category : string, optional
          The column to use for labels
          default: variable
      ax : matplotlib.Axes, optional
      legend : bool, optional
          Include a legend
          default: False
      title : bool or string, optional
          Display a default or custom title.
      cmap : string, optional
          A colormap to use.
          default: None
      kwargs : Additional arguments to pass to the pd.DataFrame.plot() function