title: Scatter plot of 1-D bimodal data from sklearn make_blobs()
body: <p>sklearn <code>make_blobs()</code> function can be used to Generate isotropic Gaussian blobs for clustering.</p>
  
  <p>I am trying to plot the data generated by <code>make_blobs()</code> function.</p>
  
  <pre><code>import numpy as np
  from sklearn.datasets import make_blobs
  import matplotlib.pyplot as plt
  
  arr, blob_labels = make_blobs(n_samples=1000, n_features=1, 
                                  centers=1, random_state=1)
  a = plt.hist(arr, bins=np.arange(int(np.min(arr))-1,int(np.max(arr))+1,0.5), width = 0.3)
  </code></pre>
  
  <p>this piece of code gives a normal distribution plot, which makes sense.</p>
  
  <p><a href="https://i.stack.imgur.com/BD0Yu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BD0Yu.png" alt="enter image description here"></a></p>
  
  <pre><code>blobs, blob_labels = make_blobs(n_samples=1000, n_features=2, 
                                  centers=2, random_state=1)
  
  a = plt.scatter(blobs[:, 0], blobs[:, 1], c=blob_labels)
  </code></pre>
  
  <p>this piece of code gives a 2-clusters plot, which also makes sense.</p>
  
  <p><a href="https://i.stack.imgur.com/cyJDZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cyJDZ.png" alt="enter image description here"></a></p>
  
  <p>I am wondering that is there a way to plot the data generated by <code>make_blobs()</code> function with params <code>centers=2 n_features=1</code>.</p>
  
  <pre><code>arr, blob_labels = make_blobs(n_samples=1000, n_features=1, 
                                  centers=2, random_state=1)
  </code></pre>
  
  <p>I've tried <code>plt.hist()</code>, which gives another normal distribution plot.</p>
  
  <p>I have no idea how to use <code>plt.scatter()</code> with the data.</p>
  
  <p>I cannot image what the plot should look like.</p>