I am plotting data using matplotlib. I am following this [example](https://stackoverflow.com/questions/47684652/how-to-customize-marker-colors-and-shapes-in-scatter-plot) as base to plot with four labels. Below you can find the code. However, I am getting this error, 

```
Traceback (most recent call last):
  File "visualization_SH_Male_female.py", line 86, in <module>
    main()
  File "visualization_SH_Male_female.py", line 58, in main
    plt.scatter(x_list[indices], y_list[indices], marker=markers[i], color=colors[j])
TypeError: list indices must be integers or slices, not list

```

in this scatter plot. Can someone point how I can transform `indices` into integers?

```
import matplotlib
from sklearn.manifold import TSNE
import matplotlib.pyplot as plt
import csv
import numpy as np
from sklearn import preprocessing

def parse_features_from_csv(csv_file):
    feat_lst = []
    id_lst = []
    count = 0
    with open(csv_file) as fr:
        reader = csv.reader(fr, delimiter=',')
        for row in reader:
            s_feat = row[:-1]
            identifier = row[-1]
            if count < 50:
                if (
                        identifier == 'Alan_Cumming' or identifier == 'Chiwetel_Ejiofor' or identifier == 'James_Purefoy' or identifier == 'Johnathon_Schaech' or identifier == 'Will_Poulter'):
                    identifier = 0
                else:
                    identifier = 2
            else:  # >= 50
                if (
                        identifier == 'Alan_Cumming' or identifier == 'Chiwetel_Ejiofor' or identifier == 'James_Purefoy' or identifier == 'Johnathon_Schaech' or identifier == 'Will_Poulter'):
                    identifier = 1
                else:
                    identifier = 3

            s_feat = [float(i) for i in s_feat]
            feat_lst.append(s_feat)
            id_lst.append(identifier)
            count += 1
    return feat_lst, id_lst

def main():
    face_file = 'comb.csv'

    feat_lst, labels = parse_features_from_csv(face_file)
    labels = np.array(labels)

    X_embedded = TSNE(n_components=2).fit_transform(feat_lst)

    x_list = [x for [x, y] in X_embedded]
    y_list = [y for [x, y] in X_embedded]

    # generate a list of markers and another of colors
    markers = ["o", "<"]
    colors = ['r', 'g']

    for i in range(2):
        for j in range(2):
            lab = i + j
            indices = list(map(int, labels == lab))
            print(indices)
            plt.scatter(x_list[indices], y_list[indices], marker=markers[i], color=colors[j])
    plt.legend(['0', '1', '2', '3'])
    plt.grid()
    plt.show()

```