title: How can I make a transparent background?
body: <p>I have a .csv file which contains some data where x, y, x1, y1 are the coordinate points, and p is the value.  My below code is working very well for plotting, but when I am plotting the data, I am getting a background color like the purple color. I don't want any color in the background. I want the background will be <strong>Transparent</strong>. My ultimate goal is overlying this result over an image. I am new in Python. Any help will be highly appreciated.</p>
  
  <p><strong>Download link of the .csv file  <a href="http://www.filedropper.com/flowerfeature" rel="nofollow noreferrer">here</a> or <a href="http://s000.tinyupload.com/?file_id=11379631698372073093" rel="nofollow noreferrer">link-2</a> or <a href="https://megaupload.nz/P1A8p5w4n7/flower_feature_csv" rel="nofollow noreferrer">link-3</a></strong></p>
  
  <p>I am getting below result <a href="https://i.stack.imgur.com/2Y6LZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2Y6LZ.png" alt="result"></a></p>
  
  <p><strong>My Code</strong></p>
  
  <pre><code>import matplotlib.pyplot as plt
  from scipy import ndimage
  import numpy as np
  import pandas as pd
  from skimage import transform
  from PIL import Image
  import cv2
  
  x_dim=1200
  y_dim=1200
  
  # Read CSV 
  df = pd.read_csv("flower_feature.csv")
  
  # Create numpy array of zeros os same size
  array = np.zeros((x_dim, y_dim), dtype=np.uint8)
  
  for index, row in df.iterrows():
      x = np.int(row["x"])
      y = np.int(row["y"])
      x1 = np.int(row["x1"])
      y1 = np.int(row["y1"])
      p = row["p"]
      array[x:x1,y:y1] = p
  
  map = ndimage.filters.gaussian_filter(array, sigma=16)
  plt.imshow(map)
  plt.show()
  </code></pre>
  
  <p><strong>As per Ghassen's suggestion I am getting below results. I am still not getting the transparent background.</strong>    </p>
  
  <p>When Alpha =0</p>
  
  <p><a href="https://i.stack.imgur.com/HDtSP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HDtSP.png" alt="alpha=0"></a></p>
  
  <p>When alpha =0.5</p>
  
  <p><a href="https://i.stack.imgur.com/g2fVq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/g2fVq.png" alt="alpha =0.5"></a></p>
  
  <p>When alpha =1</p>
  
  <p><a href="https://i.stack.imgur.com/SfSBw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SfSBw.png" alt="alpha=1"></a></p>