'Create a total of 700 synthetic samples from the 3 Gaussian distributions ,How to plot all the samples on a scatter plot

I tried to do

sigma = 1
size = 700
sample = np.zeros(shape = (size,2))
for i in range (size):
    x = random.randint(1, 3)
    if(x == 1):
        s = np.random.normal(random.uniform(-1,1), sigma, 1)
        sample[i][1]
        sample[i][2] = 1
    if(x == 2):
        s = np.random.normal(random.uniform(-2.5, 2.5), sigma, 1)
        sample[i][1] = s
        sample[i][2] = 2
    if(x == 3):
        s = np.random.normal(random.uniform(-4.5, 4.5), sigma, 1)
        sample[i][1]
        sample[i][2] = 3
test_data = pd.DataFrame(sample, columns=['x1', 'x2', 'label'])

How can I plot the pionts that I have generated ? I do not have X axis and Y axis how can I show the Gaussian variable as points?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source