Unverified Commit 05f230d1 authored by Mark Daoust's avatar Mark Daoust Committed by GitHub
Browse files

Smaller figure grid, remove tics from bar plots.

parent b2e03585
......@@ -541,9 +541,6 @@
},
"cell_type": "code",
"source": [
"import matplotlib.pyplot as plt\n",
"%matplotlib inline\n",
"\n",
"plt.figure(figsize=(10,10))\n",
"for i in range(25):\n",
" plt.subplot(5,5,i+1)\n",
......@@ -882,6 +879,8 @@
"\n",
"def plot_value_array(predictions_array, true_label):\n",
" plt.grid('off')\n",
" plt.xticks([])\n",
" plt.yticks([])\n",
" thisplot = plt.bar(range(10), predictions_array, color=\"#777777\")\n",
" plt.ylim([0, 1]) \n",
" predicted_label = np.argmax(predictions_array)\n",
......@@ -961,16 +960,15 @@
"source": [
"# Plot the first X test images, their predicted label, and the true label\n",
"# Color correct predictions in blue, incorrect predictions in red\n",
"num_images = int(50)\n",
"plt.figure(figsize=(24,20))\n",
"num_rows = 5\n",
"num_cols = 3\n",
"num_images = num_rows*num_cols\n",
"plt.figure(figsize=(2*2*num_cols, 2*num_rows))\n",
"for i in range(num_images):\n",
" plt.subplot(10,num_images / 5,2*i+1)\n",
" plt.subplot(num_rows, 2*num_cols, 2*i+1)\n",
" plot_image(predictions[i], test_labels[i], test_images[i])\n",
" \n",
" plt.subplot(10,num_images / 5,2*i+2)\n",
" plt.xticks([])\n",
" plt.yticks([])\n",
" plot_value_array(predictions[i], test_labels[i])"
" plt.subplot(num_rows, 2*num_cols, 2*i+2)\n",
" plot_value_array(predictions[i], test_labels[i])\n",
],
"execution_count": 0,
"outputs": []
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment