I have my dataset that has multiple features and based on that the dependent variable is defined to be 0 or 1. I want to get a scatter plot such that all my positive examples are marked with 'o' and negative ones with 'x'. I am using python and here is the code for the beginning.
import numpy as np import matplotlib.pyplot as plt import pandas as pd # Importing the dataset dataset = pd.read_csv('/home/Dittu/Desktop/Project/creditcard.csv')
now I know how to make scatter plots for two different classes.
fig = plt.figure() ax1 = fig.add_subplot(111) ax1.scatter(x[:4], y[:4], s=10, c='b', marker="s", label='first') ax1.scatter(x[40:],y[40:], s=10, c='r', marker="o", label='second') plt.show()
but how to segregate both class of examples and the plot them or plot them with distinct marks without separating?