Plot the Data Points

Learn how digits are formed by plotting some of the data points.

Code to plot data points

We saw earlier how we might plot a rectangular array of numbers using the imshow() function. We want to do the same here, but we need to convert that list of comma-separated numbers into a suitable array. Here are the steps to do that:

  1. Split that long text string of comma-separated values into individual values, using the commas as the place to do the splitting.

  2. Ignore the first value and the label, and take the remaining list of 28×28=78428 \times 28 = 784 ...