Skip to content

Instantly share code, notes, and snippets.

@ahmedfgad
Created May 24, 2019 15:33
Show Gist options
  • Save ahmedfgad/b94be84265c89588b7830977657f742a to your computer and use it in GitHub Desktop.
Save ahmedfgad/b94be84265c89588b7830977657f742a to your computer and use it in GitHub Desktop.
import numpy
import matplotlib.pyplot
input_data = numpy.array([[1, 4],
[4, 1],
[3, 2],
[2, 1]])
output_data = numpy.array([0, 0, 1, 1])
matplotlib.pyplot.scatter(input_data[:2, 0], input_data[:2, 1], color='blue', linewidths=5)
matplotlib.pyplot.scatter(input_data[2:, 0], input_data[2:, 1], color='red', linewidths=5)
matplotlib.pyplot.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment