title: How to resolve Python error while generating Pie chart : ValueError: 'explode' must be of length 'x'
body: <p>Can anyone help me to resolve below error while generating Pie chart with Explode option.
  ValueError: 'explode' must be of length 'x'</p>
  
  <pre><code>import pandas as pd
  import numpy as np
  import matplotlib.pyplot as plt
  import datetime as dt
  
  figureObject, axesObject = plt.subplots()
  labels = "ABC", "XYZ"
  delay = [delay1, delay2]
  colors  = ("red", "green", "orange", "cyan", "brown", 
  "grey","blue","indigo", "beige", "yellow")
  explode = (0, 0.1, 0, 0)
  
  # Draw the pie chart
  axesObject.pie(delay,
      explode=explode,
      labels=labels,
      colors=colors,
      shadow=True,
      autopct='%1.2f',
      startangle=90,
      wedgeprops = { 'linewidth' : 2, 'edgecolor' : "cyan" })
  
    plt.legend(patches, labels, loc="best") 
  
   # Aspect ratio - equal means pie is a circle
    axesObject.axis('equal')
    plt.show()
  </code></pre>
  
  <p>additional information: I am using anaconda 3.6 version. 
  I am able to generate pie chart without explode, but when I use explode I am getting  an error - ValueError: 'explode' must be of length 'x'.</p>
  
  <p>Please help me, how to overcome this issue.</p>