diff --git a/Cluster_Analysis.ipynb b/Cluster_Analysis.ipynb
index b1a955bd6f19807ba10f2ba3c20bc06ba00ce703..e429ba81edd98d9192048ddb07820be95818c8a9 100644
--- a/Cluster_Analysis.ipynb
+++ b/Cluster_Analysis.ipynb
@@ -1,5 +1,36 @@
 {
  "cells": [
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "# Purpose"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "This notebook is for the clustering analysis of ReqMemCPU, AllocCPUS, and Elapsed.\n",
+    "ReqMemCPU is the amount of RAM in gigs for each job as requested by the user.\n",
+    "AllocCPUS is the amount of cores that were used for each job.\n",
+    "Elapsed is the amount of time, in hours, that job took to run."
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "# Assumptions and Restrictions"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "Based on extensiive data and clustering exploration, this Notebook is set to graph up to 4 clusters (n_clusters = 4 in kmeans). In order to raise the number of clusters, more code will have to be added to add more 2d histograms of those extra cluster groups. And in order to lower the number of clusters, the code would have to be modified to expect fewer than 4 clusters as an input."
+   ]
+  },
   {
    "cell_type": "markdown",
    "metadata": {},
@@ -7,14 +38,55 @@
     "# Data Setup Options"
    ]
   },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "There are 5 decisions to make in the set up of the data.\n",
+    "\n",
+    "Date Range: Choose a start date and an end date of data that you want to see cluster analysis of. \n",
+    "            The format is yyyy-mm-dd\n",
+    "\n",
+    "Bracketing Values: Choose a minimum and maximum value for ReqMemCPU, AllocCPUS, and Elapsed.\n",
+    "                   These values will allow you to \"zoom in\" or \"zoom out\" on your data.\n",
+    "                   \n",
+    "1. Upper/LowerGB - min/max ReqMemCPU: most of the data lies between 1 and 150 gigs. \n",
+    "    Most of the ReqMemCPU above 150 are outliers\n",
+    "2. Upper/LowerAllocCPU - min/max AllocCPUS: most of the data lies between 1 and 260 cores. \n",
+    "    Most of the AllocCPUS above 260 are outliers\n",
+    "3. Upper/LowerElapsed - min/max Elapsed: 150.02 hours is the highest Elapsed goes to.\n",
+    "\n",
+    "Data Normalization: There are three choices for normalization of the data - 'none', '0-1', or 'log'\n",
+    "1. 'none' - no data normalization. Data is clustered and graphed as is.\n",
+    "2. '0-1'- all data in the date range and bracketing ranges chosen will be scaled to have values between 0 and 1.\n",
+    "    This would be useful if your bracketing ranges differ greatly from each other.\n",
+    "3. 'log' - all data in the date range and bracketing ranges chosen will be scaled to have log values.\n",
+    "    This would be useful if your bracketing ranges create data that is very large and would be easier to\n",
+    "    visualize with log values."
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "## Date Range"
+   ]
+  },
   {
    "cell_type": "code",
    "execution_count": null,
    "metadata": {},
    "outputs": [],
    "source": [
-    "# year-date-month\n",
-    "#start_date = '2020-10-09'"
+    "start_date = '2020-11-01'\n",
+    "end_date = '2020-11-23'"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "## Bracketing Values"
    ]
   },
   {
@@ -23,11 +95,9 @@
    "metadata": {},
    "outputs": [],
    "source": [
-    "# must run\n",
-    "\n",
     "# sets min and max parameters for ReqMemCPU\n",
     "LowerlimitGB = 0\n",
-    "UpperlimitGB = 50 # gigs per cpu"
+    "UpperlimitGB = 150"
    ]
   },
   {
@@ -36,11 +106,9 @@
    "metadata": {},
    "outputs": [],
    "source": [
-    "# must run\n",
-    "\n",
     "# sets min and max parameters for AllocCPUS\n",
     "LowerlimitAllocCPU = 0\n",
-    "UpperlimitAllocCPU = 50 #cpus"
+    "UpperlimitAllocCPU = 260"
    ]
   },
   {
@@ -49,11 +117,16 @@
    "metadata": {},
    "outputs": [],
    "source": [
-    "# must run\n",
-    "\n",
     "# sets min and max parameters for Elapsed\n",
     "LowerlimitElapsed = 0\n",
-    "UpperlimitElapsed = 150.02 #in hours - 6.25 days"
+    "UpperlimitElapsed = 150.02 # = 6.25 days"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "## Data Normalization"
    ]
   },
   {
@@ -110,10 +183,18 @@
    "metadata": {},
    "outputs": [],
    "source": [
-    "# must run\n",
-    "\n",
-    "# creates database of info from March 2020 using sqlite 3\n",
-    "db = sqlite3.connect('/data/rc/rc-team/slurm-since-March.sqlite3')"
+    "#connecting to database\n",
+    "db = sqlite3.connect('cluster_analysis_from_'+str(start_date)+'to'+str(end_date)+'.db')"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "#creating a database based on the start date\n",
+    "slurm2sql.slurm2sql(db, ['-S',start_date, '-E', end_date,'-a'])"
    ]
   },
   {
@@ -122,9 +203,6 @@
    "metadata": {},
    "outputs": [],
    "source": [
-    "# must run\n",
-    "\n",
-    "# df is starting database\n",
     "df = pd.read_sql('SELECT * FROM slurm', db)"
    ]
   },
@@ -134,11 +212,28 @@
    "metadata": {},
    "outputs": [],
    "source": [
-    "# must run\n",
-    "\n",
+    "#Deleting the database\n",
+    "os.remove('cluster_analysis_from_'+str(start_date)+'to'+str(end_date)+'.db')\n",
+    "os.remove('cluster_analysis_from_'+str(start_date)+'to'+str(end_date)+'.db-shm')\n",
+    "os.remove('cluster_analysis_from_'+str(start_date)+'to'+str(end_date)+'.db-wal')"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "# Dataset Creation"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
     "# df_1 is dataframe of all completed jobs\n",
     "df_1 = df[df.State.str.contains('COMPLETED')]\n",
-    "#df_completed.head(5)"
+    "df_1.head(5)"
    ]
   },
   {
@@ -147,8 +242,6 @@
    "metadata": {},
    "outputs": [],
    "source": [
-    "# must run\n",
-    "\n",
     "# dataset of needed columns for all graphs below\n",
     "df_completed = df_1.loc[:,['ReqMemCPU', 'Elapsed', 'AllocCPUS']]\n",
     "#df_1.head(5)"
@@ -160,8 +253,6 @@
    "metadata": {},
    "outputs": [],
    "source": [
-    "# must run\n",
-    "\n",
     "# converts units in ReqMemCPU column from bytes to gigs and rounds up to nearest whole number\n",
     "df_completed['ReqMemCPU'] = df_completed['ReqMemCPU'].div(1024**3).apply(np.ceil).apply(int)\n",
     "#df_completed.head()"
@@ -173,8 +264,6 @@
    "metadata": {},
    "outputs": [],
    "source": [
-    "# must run\n",
-    "\n",
     "# converts Elapsed time to hours (from seconds) and rounds up to nearest 2 decimal places\n",
     "df_completed['Elapsed'] = df_completed['Elapsed'].div(3600).round(2)"
    ]
@@ -185,8 +274,6 @@
    "metadata": {},
    "outputs": [],
    "source": [
-    "# must run\n",
-    "\n",
     "# creates dataset of ReqMemCPU, Elapsed, and AllocCPUS for completed jobs using the min and max parameters created above\n",
     "df_clustering = df_completed[(df_completed['ReqMemCPU'] <= UpperlimitGB) & \n",
     "                       (df_completed['ReqMemCPU'] >= LowerlimitGB) & \n",
@@ -198,6 +285,42 @@
     "df_clustering.head(5)"
    ]
   },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "# Elbow Method to Determine Number of Clusters"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "# sets up info for plotting the optimal number of clusters - uses df_runtime_cluster datasaet\n",
+    "Sum_of_squared_distances = []\n",
+    "K = range(1,10)\n",
+    "for k in K:\n",
+    "    km = KMeans(n_clusters=k)\n",
+    "    km = km.fit(df_clustering)\n",
+    "    Sum_of_squared_distances.append(km.inertia_)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "# the bend in the graph is the optimal number of clusters for graphs using the df_runtime_cluster dataset\n",
+    "plt.plot(K, Sum_of_squared_distances, 'bx-')\n",
+    "plt.xlabel('k')\n",
+    "plt.ylabel('Sum_of_squared_distances')\n",
+    "plt.title('Elbow Method For Optimal k')\n",
+    "plt.show()"
+   ]
+  },
   {
    "cell_type": "markdown",
    "metadata": {},
@@ -239,10 +362,8 @@
    "metadata": {},
    "outputs": [],
    "source": [
-    "# must run\n",
-    "\n",
     "# sets to clusters and returns the cluster points\n",
-    "kmeans_cluster = KMeans(n_clusters=3, random_state=111)\n",
+    "kmeans_cluster = KMeans(n_clusters=4, random_state=111)\n",
     "kmeans_cluster.fit(fit)\n",
     "print(kmeans_cluster.cluster_centers_)"
    ]
@@ -287,18 +408,19 @@
    "metadata": {},
    "outputs": [],
    "source": [
-    "# must run\n",
-    "\n",
     "# creates dataset of ReqMemCPU, Elapsed, and AllocCPUS using the parameters in the labels shown above\n",
     "\n",
     "#Purple\n",
-    "df_purple = df_clustering[kmeans_cluster.labels_ == 0]\n",
+    "df_0 = df_clustering[kmeans_cluster.labels_ == 0]\n",
     "\n",
     "#Green\n",
-    "df_green = df_clustering[kmeans_cluster.labels_ == 1]\n",
+    "df_1 = df_clustering[kmeans_cluster.labels_ == 1]\n",
+    "\n",
+    "#Yellow\n",
+    "df_2 = df_clustering[kmeans_cluster.labels_ == 2]\n",
     "\n",
     "#Red\n",
-    "df_red = df_clustering[kmeans_cluster.labels_ == 2]"
+    "df_3 = df_clustering[kmeans_cluster.labels_ == 3]"
    ]
   },
   {
@@ -307,24 +429,27 @@
    "metadata": {},
    "outputs": [],
    "source": [
-    "# voluntary\n",
-    "\n",
     "# returns the min and max ReqMemCPU, Elapsed, and AllocCPUS for each cluster using the datasets created above. \n",
     "# These are the parameters for the scatter plots of each cluster\n",
     "print(\"Purple Cluster\")\n",
-    "print(\"ReqMemCPU:\", \"min =\",df_purple.ReqMemCPU.min(),\" \",\"max =\",df_purple.ReqMemCPU.max())\n",
-    "print(\"Elapsed:\", \"min =\",df_purple.Elapsed.min(),\" \",\"max =\",df_purple.Elapsed.max())\n",
-    "print(\"AllocCPUS:\", \"min =\",df_purple.AllocCPUS.min(),\" \",\"max =\",df_purple.AllocCPUS.max())\n",
+    "print(\"ReqMemCPU:\", \"min =\",df_0.ReqMemCPU.min(),\" \",\"max =\",df_0.ReqMemCPU.max())\n",
+    "print(\"Elapsed:\", \"min =\",df_0.Elapsed.min(),\" \",\"max =\",df_0.Elapsed.max())\n",
+    "print(\"AllocCPUS:\", \"min =\",df_0.AllocCPUS.min(),\" \",\"max =\",df_0.AllocCPUS.max())\n",
+    "\n",
+    "print(\"\\nBlue Cluster\")\n",
+    "print(\"ReqMemCPU:\", \"min =\",df_1.ReqMemCPU.min(),\" \",\"max =\",df_1.ReqMemCPU.max())\n",
+    "print(\"Elapsed:\", \"min =\",df_1.Elapsed.min(),\" \",\"max =\",df_1.Elapsed.max())\n",
+    "print(\"AllocCPUS:\", \"min =\",df_1.AllocCPUS.min(),\" \",\"max =\",df_1.AllocCPUS.max())\n",
     "\n",
-    "print(\"\\nGreen Cluster\")\n",
-    "print(\"ReqMemCPU:\", \"min =\",df_green.ReqMemCPU.min(),\" \",\"max =\",df_green.ReqMemCPU.max())\n",
-    "print(\"Elapsed:\", \"min =\",df_green.Elapsed.min(),\" \",\"max =\",df_green.Elapsed.max())\n",
-    "print(\"AllocCPUS:\", \"min =\",df_green.AllocCPUS.min(),\" \",\"max =\",df_green.AllocCPUS.max())\n",
+    "print(\"\\nYellow Cluster\")\n",
+    "print(\"ReqMemCPU:\", \"min =\",df_2.ReqMemCPU.min(),\" \",\"max =\",df_2.ReqMemCPU.max())\n",
+    "print(\"Elapsed:\", \"min =\",df_2.Elapsed.min(),\" \",\"max =\",df_2.Elapsed.max())\n",
+    "print(\"AllocCPUS:\", \"min =\",df_2.AllocCPUS.min(),\" \",\"max =\",df_2.AllocCPUS.max())\n",
     "\n",
     "print(\"\\nRed Cluster\")\n",
-    "print(\"ReqMemCPU:\", \"min =\",df_red.ReqMemCPU.min(),\" \",\"max =\",df_red.ReqMemCPU.max())\n",
-    "print(\"Elapsed:\", \"min =\",df_red.Elapsed.min(),\" \",\"max =\",df_red.Elapsed.max())\n",
-    "print(\"AllocCPUS:\", \"min =\",df_red.AllocCPUS.min(),\" \",\"max =\",df_red.AllocCPUS.max())"
+    "print(\"ReqMemCPU:\", \"min =\",df_3.ReqMemCPU.min(),\" \",\"max =\",df_3.ReqMemCPU.max())\n",
+    "print(\"Elapsed:\", \"min =\",df_3.Elapsed.min(),\" \",\"max =\",df_3.Elapsed.max())\n",
+    "print(\"AllocCPUS:\", \"min =\",df_3.AllocCPUS.min(),\" \",\"max =\",df_3.AllocCPUS.max())"
    ]
   },
   {
@@ -333,25 +458,28 @@
    "metadata": {},
    "outputs": [],
    "source": [
-    "# must run\n",
-    "\n",
     "# Creates datasets used to make the 2d histograms that correspond to each cluster scatter plot. \n",
     "# The groupby does not change the data, but it does make a small enough dataset\n",
     "\n",
     "# for purple cluster \n",
-    "df_purlple_2d1 = df_purple.groupby(['ReqMemCPU','Elapsed']).sum().reset_index()\n",
-    "df_purlple_2d2 = df_purple.groupby(['AllocCPUS','Elapsed']).sum().reset_index()\n",
-    "df_purlple_2d3 = df_purple.groupby(['ReqMemCPU','AllocCPUS']).sum().reset_index()\n",
+    "df_0_2d1 = df_0.groupby(['ReqMemCPU','Elapsed']).sum().reset_index()\n",
+    "df_0_2d2 = df_0.groupby(['AllocCPUS','Elapsed']).sum().reset_index()\n",
+    "df_0_2d3 = df_0.groupby(['ReqMemCPU','AllocCPUS']).sum().reset_index()\n",
     "\n",
-    "# for green cluster\n",
-    "df_green_2d1 = df_green.groupby(['ReqMemCPU','Elapsed']).sum().reset_index()\n",
-    "df_green_2d2 = df_green.groupby(['AllocCPUS','Elapsed']).sum().reset_index()\n",
-    "df_green_2d3 = df_green.groupby(['ReqMemCPU','AllocCPUS']).sum().reset_index()\n",
+    "# for blue cluster\n",
+    "df_1_2d1 = df_1.groupby(['ReqMemCPU','Elapsed']).sum().reset_index()\n",
+    "df_1_2d2 = df_1.groupby(['AllocCPUS','Elapsed']).sum().reset_index()\n",
+    "df_1_2d3 = df_1.groupby(['ReqMemCPU','AllocCPUS']).sum().reset_index()\n",
+    "\n",
+    "# for yellow cluster\n",
+    "df_2_2d1 = df_2.groupby(['ReqMemCPU','Elapsed']).sum().reset_index()\n",
+    "df_2_2d2 = df_2.groupby(['AllocCPUS','Elapsed']).sum().reset_index()\n",
+    "df_2_2d3 = df_2.groupby(['ReqMemCPU','AllocCPUS']).sum().reset_index()\n",
     "\n",
     "# for red cluster\n",
-    "df_red_2d1 = df_red.groupby(['ReqMemCPU','Elapsed']).sum().reset_index()\n",
-    "df_red_2d2 = df_red.groupby(['AllocCPUS','Elapsed']).sum().reset_index()\n",
-    "df_red_2d3 = df_red.groupby(['ReqMemCPU','AllocCPUS']).sum().reset_index()"
+    "df_3_2d1 = df_3.groupby(['ReqMemCPU','Elapsed']).sum().reset_index()\n",
+    "df_3_2d2 = df_3.groupby(['AllocCPUS','Elapsed']).sum().reset_index()\n",
+    "df_3_2d3 = df_3.groupby(['ReqMemCPU','AllocCPUS']).sum().reset_index()"
    ]
   },
   {
@@ -360,14 +488,110 @@
    "metadata": {},
    "outputs": [],
    "source": [
-    "# must run\n",
+    "# Creating bins \n",
+    "\n",
+    "####Purple\n",
+    "purple_rqmem_min = np.min(df_0.ReqMemCPU.min())\n",
+    "purple_rqmem_max = np.max(df_0.ReqMemCPU.max())\n",
+    "  \n",
+    "purple_elapsed_min = np.min(df_0.Elapsed.min()) \n",
+    "purple_elapsed_max = np.max(df_0.Elapsed.max()) \n",
+    "\n",
+    "purple_alloc_min = np.min(df_0.AllocCPUS.min()) \n",
+    "purple_alloc_max = np.max(df_0.AllocCPUS.max())\n",
+    "  \n",
+    "    \n",
+    "x_purple_rqmem_elapsed_bins = list(range(purple_rqmem_max))\n",
+    "y_purple_rqmem_elapsed_bins = list(range(int(purple_elapsed_max)))\n",
+    "\n",
+    "x_purple_alloc_elapsed_bins = list(range(purple_alloc_max))\n",
+    "y_purple_alloc_elapsed_bins = list(range(int(purple_elapsed_max))) \n",
+    "\n",
+    "x_purple_reqmem_alloc_bins = list(range(purple_rqmem_max))\n",
+    "y_purple_reqmem_alloc_bins = list(range(int(purple_alloc_max))) \n",
+    "\n",
+    "\n",
+    "####Blue\n",
+    "blue_rqmem_min = np.min(df_1.ReqMemCPU.min())\n",
+    "blue_rqmem_max = np.max(df_1.ReqMemCPU.max())\n",
+    "  \n",
+    "blue_elapsed_min = np.min(df_1.Elapsed.min()) \n",
+    "blue_elapsed_max = np.max(df_1.Elapsed.max()) \n",
+    "\n",
+    "blue_alloc_min = np.min(df_1.AllocCPUS.min()) \n",
+    "blue_alloc_max = np.max(df_1.AllocCPUS.max())\n",
+    "  \n",
+    "    \n",
+    "x_blue_rqmem_elapsed_bins = list(range(blue_rqmem_max))\n",
+    "y_blue_rqmem_elapsed_bins = list(range(int(blue_elapsed_max)))\n",
+    "\n",
+    "x_blue_alloc_elapsed_bins = list(range(blue_alloc_max))\n",
+    "y_blue_alloc_elapsed_bins = list(range(int(blue_elapsed_max))) \n",
+    "\n",
+    "x_blue_reqmem_alloc_bins = list(range(blue_rqmem_max))\n",
+    "y_blue_reqmem_alloc_bins = list(range(int(blue_alloc_max))) \n",
+    "\n",
+    "####Yellow\n",
+    "yellow_rqmem_min = np.min(df_2.ReqMemCPU.min())\n",
+    "yellow_rqmem_max = np.max(df_2.ReqMemCPU.max())\n",
+    "  \n",
+    "yellow_elapsed_min = np.min(df_2.Elapsed.min()) \n",
+    "yellow_elapsed_max = np.max(df_2.Elapsed.max()) \n",
     "\n",
+    "yellow_alloc_min = np.min(df_2.AllocCPUS.min()) \n",
+    "yellow_alloc_max = np.max(df_2.AllocCPUS.max())\n",
+    "  \n",
+    "    \n",
+    "x_yellow_rqmem_elapsed_bins = list(range(yellow_rqmem_max))\n",
+    "y_yellow_rqmem_elapsed_bins = list(range(int(yellow_elapsed_max)))\n",
+    "\n",
+    "x_yellow_alloc_elapsed_bins = list(range(yellow_alloc_max))\n",
+    "y_yellow_alloc_elapsed_bins = list(range(int(yellow_elapsed_max)))\n",
+    "\n",
+    "x_yellow_reqmem_alloc_bins = list(range(yellow_rqmem_max)) # list range gives one bin per gig\n",
+    "y_yellow_reqmem_alloc_bins = list(range(yellow_alloc_max)) # list range gives one bin per cpu\n",
+    "\n",
+    "\n",
+    "####Red\n",
+    "red_rqmem_min = np.min(df_3.ReqMemCPU.min())\n",
+    "red_rqmem_max = np.max(df_3.ReqMemCPU.max())\n",
+    "  \n",
+    "red_elapsed_min = np.min(df_3.Elapsed.min()) \n",
+    "red_elapsed_max = np.max(df_3.Elapsed.max()) \n",
+    "\n",
+    "red_alloc_min = np.min(df_3.AllocCPUS.min()) \n",
+    "red_alloc_max = np.max(df_3.AllocCPUS.max())\n",
+    "  \n",
+    "    \n",
+    "x_red_rqmem_elapsed_bins = list(range(red_rqmem_max))\n",
+    "y_red_rqmem_elapsed_bins = list(range(int(red_elapsed_max)))\n",
+    "\n",
+    "x_red_alloc_elapsed_bins = list(range(int(red_alloc_max)))\n",
+    "y_red_alloc_elapsed_bins = list(range(int(red_elapsed_max)))\n",
+    "\n",
+    "x_red_reqmem_alloc_bins = list(range(red_rqmem_max)) # list range gives one bin per gig\n",
+    "y_red_reqmem_alloc_bins = list(range(red_alloc_max)) # list range gives one bin per cpu"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "# Plotting of the Clusters in 1d and 3d Graphs"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
     "figure = plt.figure()\n",
     "\n",
-    "figure.set_size_inches(20,40)\n",
+    "figure.set_size_inches(20,15)\n",
     "\n",
     "# ReqMem/Elapsed 2d Graph\n",
-    "rqmem_elapsed_clustergraph = figure.add_subplot(5,3,1)\n",
+    "rqmem_elapsed_clustergraph = figure.add_subplot(2,3,1)\n",
     "\n",
     "rqmem_elapsed_clustergraph.scatter(df_clustering['ReqMemCPU'],df_clustering['Elapsed'], \n",
     "                                   c=kmeans_cluster.labels_, cmap='rainbow')\n",
@@ -378,7 +602,7 @@
     "\n",
     "\n",
     "# Alloc/Elapsed 2d Graph\n",
-    "alloc_elapsed_clustergraph = figure.add_subplot(5,3,2)\n",
+    "alloc_elapsed_clustergraph = figure.add_subplot(2,3,2)\n",
     "alloc_elapsed_clustergraph.scatter(df_clustering['AllocCPUS'],df_clustering['Elapsed'], \n",
     "                                   c=kmeans_cluster.labels_, cmap='rainbow')\n",
     "alloc_elapsed_clustergraph.scatter(clusterpoints[:,2] ,clusterpoints[:,1], color='black')\n",
@@ -387,7 +611,7 @@
     "plt.title('Runtime/Core')\n",
     "\n",
     "# ReqMem/Alloc 2d Graph\n",
-    "rqmem_alloc_clustergraph = figure.add_subplot(5,3,3)\n",
+    "rqmem_alloc_clustergraph = figure.add_subplot(2,3,3)\n",
     "rqmem_alloc_clustergraph.scatter(df_clustering['ReqMemCPU'],df_clustering['AllocCPUS'], \n",
     "                                   c=kmeans_cluster.labels_, cmap='rainbow')\n",
     "rqmem_alloc_clustergraph.scatter(clusterpoints[:,0] ,clusterpoints[:,2], color='black')\n",
@@ -397,7 +621,7 @@
     "\n",
     "########### 3d Graphs\n",
     "# ReqMem/Alloc 3d Graph\n",
-    "rqmem_alloc_clustergraph_3d = figure.add_subplot(5,3,4, projection='3d')\n",
+    "rqmem_alloc_clustergraph_3d = figure.add_subplot(2,3,4, projection='3d')\n",
     "rqmem_alloc_clustergraph_3d.scatter(df_clustering['ReqMemCPU'], df_clustering['AllocCPUS'], df_clustering['Elapsed'], \n",
     "                                     c=kmeans_cluster.labels_ ,cmap='rainbow')\n",
     "rqmem_alloc_clustergraph_3d.scatter(clusterpoints[:,0] ,clusterpoints[:,2], color='black')\n",
@@ -412,7 +636,7 @@
     "\n",
     "\n",
     "# Alloc/Elapsed 3d Graph\n",
-    "alloc_elapsed_clustergraph_3d = figure.add_subplot(5,3,5, projection='3d')\n",
+    "alloc_elapsed_clustergraph_3d = figure.add_subplot(2,3,5, projection='3d')\n",
     "alloc_elapsed_clustergraph_3d.scatter(df_clustering['AllocCPUS'], df_clustering['ReqMemCPU'], df_clustering['Elapsed'], \n",
     "                                      c=kmeans_cluster.labels_ ,cmap='rainbow')\n",
     "alloc_elapsed_clustergraph_3d.scatter(clusterpoints[:,2] ,clusterpoints[:,1], color='black')\n",
@@ -427,7 +651,7 @@
     "\n",
     "\n",
     "# ReqMem/Elapsed 3d Graph\n",
-    "rqmem_elapsed_clustergraph_3d = figure.add_subplot(5,3,6, projection='3d')\n",
+    "rqmem_elapsed_clustergraph_3d = figure.add_subplot(2,3,6, projection='3d')\n",
     "rqmem_elapsed_clustergraph_3d.scatter(df_clustering['ReqMemCPU'], df_clustering['Elapsed'], df_clustering['AllocCPUS'], \n",
     "                                      c=kmeans_cluster.labels_ ,cmap='rainbow')\n",
     "rqmem_elapsed_clustergraph_3d.scatter(clusterpoints[:,0] ,clusterpoints[:,1], color='black')\n",
@@ -445,74 +669,10 @@
    ]
   },
   {
-   "cell_type": "code",
-   "execution_count": null,
+   "cell_type": "markdown",
    "metadata": {},
-   "outputs": [],
    "source": [
-    "# Creating bins \n",
-    "\n",
-    "####Purple\n",
-    "purple_rqmem_min = np.min(df_purple.ReqMemCPU.min())\n",
-    "purple_rqmem_max = np.max(df_purple.ReqMemCPU.max())\n",
-    "  \n",
-    "purple_elapsed_min = np.min(df_purple.Elapsed.min()) \n",
-    "purple_elapsed_max = np.max(df_purple.Elapsed.max()) \n",
-    "\n",
-    "purple_alloc_min = np.min(df_purple.AllocCPUS.min()) \n",
-    "purple_alloc_max = np.max(df_purple.AllocCPUS.max())\n",
-    "  \n",
-    "    \n",
-    "x_purple_rqmem_elapsed_bins = list(range(purple_rqmem_max))\n",
-    "y_purple_rqmem_elapsed_bins = list(range(int(purple_elapsed_max)))\n",
-    "\n",
-    "x_purple_alloc_elapsed_bins = list(range(purple_alloc_max))\n",
-    "y_purple_alloc_elapsed_bins = list(range(int(purple_elapsed_max))) \n",
-    "\n",
-    "x_purple_reqmem_alloc_bins = list(range(purple_rqmem_max))\n",
-    "y_purple_reqmem_alloc_bins = list(range(int(purple_alloc_max))) \n",
-    "\n",
-    "\n",
-    "####Green\n",
-    "green_rqmem_min = np.min(df_green.ReqMemCPU.min())\n",
-    "green_rqmem_max = np.max(df_green.ReqMemCPU.max())\n",
-    "  \n",
-    "green_elapsed_min = np.min(df_green.Elapsed.min()) \n",
-    "green_elapsed_max = np.max(df_green.Elapsed.max()) \n",
-    "\n",
-    "green_alloc_min = np.min(df_green.AllocCPUS.min()) \n",
-    "green_alloc_max = np.max(df_green.AllocCPUS.max())\n",
-    "  \n",
-    "    \n",
-    "x_green_rqmem_elapsed_bins = list(range(green_rqmem_max))\n",
-    "y_green_rqmem_elapsed_bins = list(range(int(green_elapsed_max)))\n",
-    "\n",
-    "x_green_alloc_elapsed_bins = list(range(green_alloc_max))\n",
-    "y_green_alloc_elapsed_bins = list(range(int(green_elapsed_max))) \n",
-    "\n",
-    "x_green_reqmem_alloc_bins = list(range(green_rqmem_max))\n",
-    "y_green_reqmem_alloc_bins = list(range(int(green_alloc_max))) \n",
-    "\n",
-    "\n",
-    "####Red\n",
-    "red_rqmem_min = np.min(df_red.ReqMemCPU.min())\n",
-    "red_rqmem_max = np.max(df_red.ReqMemCPU.max())\n",
-    "  \n",
-    "red_elapsed_min = np.min(df_red.Elapsed.min()) \n",
-    "red_elapsed_max = np.max(df_red.Elapsed.max()) \n",
-    "\n",
-    "red_alloc_min = np.min(df_red.AllocCPUS.min()) \n",
-    "red_alloc_max = np.max(df_red.AllocCPUS.max())\n",
-    "  \n",
-    "    \n",
-    "x_red_rqmem_elapsed_bins = list(range(red_rqmem_max))\n",
-    "y_red_rqmem_elapsed_bins = list(range(int (red_elapsed_max)))\n",
-    "\n",
-    "x_red_alloc_elapsed_bins = list(range(red_alloc_max))\n",
-    "y_red_alloc_elapsed_bins = list(range(int (red_elapsed_max)))\n",
-    "\n",
-    "x_red_reqmem_alloc_bins = list(range(red_rqmem_max)) # list range gives one bin per gig\n",
-    "y_red_reqmem_alloc_bins = list(range(red_alloc_max)) # list range gives one bin per cpu"
+    "# Plotting of Each Cluster Group in 2d Histograms"
    ]
   },
   {
@@ -521,265 +681,169 @@
    "metadata": {},
    "outputs": [],
    "source": [
+    "xaxis_min = 0\n",
+    "xaxis_max = 140\n",
+    "\n",
+    "yaxis_min = 0\n",
+    "yaxis_max = 100\n",
+    "\n",
     "fig = plt.figure()\n",
-    "fig.set_size_inches(20,20)\n",
+    "fig.set_size_inches(20,10)\n",
+    "#fig.tight_layout()\n",
     "\n",
-    "#####Green\n",
-    "ax = fig.add_subplot(331)\n",
-    "rqmem_elapsed_green_hist = ax.hist2d(df_green_2d1['ReqMemCPU'],df_green_2d1['Elapsed'], \n",
-    "                                bins =[x_green_rqmem_elapsed_bins, y_green_rqmem_elapsed_bins], \n",
+    "\n",
+    "#####Blue\n",
+    "ax = fig.add_subplot(431)\n",
+    "rqmem_elapsed_blue_hist = ax.hist2d(df_1_2d1['ReqMemCPU'],df_1_2d1['Elapsed'], \n",
+    "                                bins =[x_blue_rqmem_elapsed_bins, y_blue_rqmem_elapsed_bins], \n",
     "                                      cmap = plt.cm.Blues)\n",
     "ax.set_xlabel('ReqMemCPU(gigs)')\n",
     "ax.set_ylabel('Elapsed(hours)')\n",
-    "ax.set_title('Green Cluster')\n",
-    "ax.set_xlim(0,40)\n",
-    "ax.set_ylim(0,140)\n",
+    "ax.set_title('Blue Cluster')\n",
+    "ax.set_xlim(xaxis_min,xaxis_max)\n",
+    "ax.set_ylim(yaxis_min,yaxis_max)\n",
     "\n",
     "\n",
-    "ax2 = fig.add_subplot(332)\n",
-    "alloc_elapsed_green_hist = ax2.hist2d(df_green_2d2['AllocCPUS'],df_green_2d2['Elapsed'], \n",
-    "                                bins =[x_green_alloc_elapsed_bins, y_green_alloc_elapsed_bins],\n",
+    "ax2 = fig.add_subplot(432)\n",
+    "alloc_elapsed_blue_hist = ax2.hist2d(df_1_2d2['AllocCPUS'],df_1_2d2['Elapsed'], \n",
+    "                                bins =[x_blue_alloc_elapsed_bins, y_blue_alloc_elapsed_bins],\n",
     "                                      cmap = plt.cm.Blues)\n",
     "ax2.set_xlabel('AllocCPUS')\n",
     "ax2.set_ylabel('Elapsed(hours)')\n",
-    "ax2.set_title('Green Cluster')\n",
-    "ax2.set_xlim(0,40)\n",
-    "ax2.set_ylim(0,140)\n",
+    "ax2.set_title('Blue Cluster')\n",
+    "ax2.set_xlim(xaxis_min,xaxis_max)\n",
+    "ax2.set_ylim(yaxis_min,yaxis_max)\n",
     "\n",
     "\n",
-    "ax3 = fig.add_subplot(333)\n",
-    "reqmem_alloc_green_hist = ax3.hist2d(df_green_2d3['ReqMemCPU'],df_green_2d3['AllocCPUS'], \n",
-    "                                bins =[x_green_reqmem_alloc_bins, y_green_reqmem_alloc_bins],\n",
+    "ax3 = fig.add_subplot(433)\n",
+    "reqmem_alloc_blue_hist = ax3.hist2d(df_1_2d3['ReqMemCPU'],df_1_2d3['AllocCPUS'], \n",
+    "                                bins =[x_blue_reqmem_alloc_bins, y_blue_reqmem_alloc_bins],\n",
     "                                     cmap = plt.cm.Blues)\n",
     "ax3.set_xlabel('ReqMemCPU(gigs)')\n",
     "ax3.set_ylabel('AllocCPUS')\n",
-    "ax3.set_title('Green Cluster')\n",
-    "ax3.set_xlim(0,40)\n",
-    "ax3.set_ylim(0,140)\n",
+    "ax3.set_title('Blue Cluster')\n",
+    "ax3.set_xlim(xaxis_min,xaxis_max)\n",
+    "ax3.set_ylim(yaxis_min,yaxis_max)\n",
+    "\n",
     "\n",
     " \n",
     "####Purple\n",
-    "ax4 = fig.add_subplot(334) # This represents a (3x3) grid (row x col) and we are plotting the (1) subplot. The last number increments row-wise.\n",
-    "rqmem_elapsed_purple_hist = ax4.hist2d(df_purlple_2d1['ReqMemCPU'],df_purlple_2d1['Elapsed'], \n",
+    "ax4 = fig.add_subplot(434) # This represents a (3x3) grid (row x col) and we are plotting the (1) subplot. The last number increments row-wise.\n",
+    "rqmem_elapsed_purple_hist = ax4.hist2d(df_0_2d1['ReqMemCPU'],df_0_2d1['Elapsed'], \n",
     "                                bins =[x_purple_rqmem_elapsed_bins, y_purple_rqmem_elapsed_bins], \n",
     "                                      cmap = plt.cm.Blues)\n",
     "ax4.set_xlabel('ReqMemCPU(gigs)')\n",
     "ax4.set_ylabel('Elapsed(hours)')\n",
     "ax4.set_title('Purple Cluster')\n",
-    "ax4.set_xlim(0,40)\n",
-    "ax4.set_ylim(0,140)\n",
+    "ax4.set_xlim(xaxis_min,xaxis_max)\n",
+    "ax4.set_ylim(yaxis_min,yaxis_max)\n",
     "\n",
     "\n",
-    "ax5 = fig.add_subplot(335) # Second subplot\n",
-    "alloc_elapsed_purple_hist = ax5.hist2d(df_purlple_2d2['AllocCPUS'],df_purlple_2d2['Elapsed'], \n",
+    "\n",
+    "ax5 = fig.add_subplot(435) # Second subplot\n",
+    "alloc_elapsed_purple_hist = ax5.hist2d(df_0_2d2['AllocCPUS'],df_0_2d2['Elapsed'], \n",
     "                                bins =[x_purple_alloc_elapsed_bins, y_purple_alloc_elapsed_bins], \n",
     "                                       cmap = plt.cm.Blues)\n",
     "ax5.set_xlabel('AllocCPUS')\n",
     "ax5.set_ylabel('Elapsed(hours)')\n",
     "ax5.set_title('Purple Cluster')\n",
-    "ax5.set_xlim(0,40)\n",
-    "ax5.set_ylim(0,140)\n",
+    "ax5.set_xlim(xaxis_min,xaxis_max)\n",
+    "ax5.set_ylim(yaxis_min,yaxis_max)\n",
     "\n",
     "\n",
-    "ax6 = fig.add_subplot(336)\n",
-    "reqmem_alloc_purple_hist = ax6.hist2d(df_purlple_2d3['ReqMemCPU'],df_purlple_2d3['AllocCPUS'], \n",
+    "ax6 = fig.add_subplot(436)\n",
+    "reqmem_alloc_purple_hist = ax6.hist2d(df_0_2d3['ReqMemCPU'],df_0_2d3['AllocCPUS'], \n",
     "                                bins =[x_purple_reqmem_alloc_bins, y_purple_reqmem_alloc_bins], \n",
     "                                      cmap = plt.cm.Blues) # use magma or\n",
     "ax6.set_xlabel('ReqMemCPU(gigs)')\n",
     "ax6.set_ylabel('AllocCPUS')\n",
     "ax6.set_title('Purple Cluster')\n",
-    "ax6.set_xlim(0,40)\n",
-    "ax6.set_ylim(0,140)\n",
+    "ax6.set_xlim(xaxis_min,xaxis_max)\n",
+    "ax6.set_ylim(yaxis_min,yaxis_max)\n",
     "\n",
     "\n",
     "#####Red\n",
-    "ax7 = fig.add_subplot(337)\n",
-    "rqmem_elapsed_red_hist = ax7.hist2d(df_red_2d1['ReqMemCPU'],df_red_2d1['Elapsed'], \n",
+    "ax7 = fig.add_subplot(437)\n",
+    "rqmem_elapsed_red_hist = ax7.hist2d(df_3_2d1['ReqMemCPU'],df_3_2d1['Elapsed'], \n",
     "                                bins =[x_red_rqmem_elapsed_bins, y_red_rqmem_elapsed_bins],\n",
     "                                    cmap = plt.cm.Blues)\n",
     "ax7.set_xlabel('ReqMemCPU(gigs)')\n",
     "ax7.set_ylabel('Elapsed(hours)')\n",
     "ax7.set_title('Red Cluster')\n",
-    "ax7.set_xlim(0,40)\n",
-    "ax7.set_ylim(0,140)\n",
+    "ax7.set_xlim(xaxis_min,xaxis_max)\n",
+    "ax7.set_ylim(yaxis_min,yaxis_max)\n",
     "\n",
     "\n",
-    "ax8 = fig.add_subplot(338)\n",
-    "alloc_elapsed_red_hist = ax8.hist2d(df_red_2d2['AllocCPUS'],df_red_2d2['Elapsed'], \n",
+    "ax8 = fig.add_subplot(438)\n",
+    "alloc_elapsed_red_hist = ax8.hist2d(df_3_2d2['AllocCPUS'],df_3_2d2['Elapsed'], \n",
     "                                bins =[x_red_reqmem_alloc_bins, y_red_reqmem_alloc_bins],\n",
     "                                    cmap = plt.cm.Blues)\n",
     "ax8.set_xlabel('AllocCPUS')\n",
     "ax8.set_ylabel('Elapsed(hours)')\n",
     "ax8.set_title('Red Cluster')\n",
-    "ax8.set_xlim(0,40)\n",
-    "ax8.set_ylim(0,140)\n",
+    "ax8.set_xlim(xaxis_min,xaxis_max)\n",
+    "ax8.set_ylim(yaxis_min,yaxis_max)\n",
     "\n",
     "\n",
-    "ax9 = fig.add_subplot(339)\n",
-    "reqmem_alloc_red_hist = ax9.hist2d(df_red_2d3['ReqMemCPU'],df_red_2d3['AllocCPUS'], \n",
+    "ax9 = fig.add_subplot(439)\n",
+    "reqmem_alloc_red_hist = ax9.hist2d(df_3_2d3['ReqMemCPU'],df_3_2d3['AllocCPUS'], \n",
     "                                bins =[x_red_reqmem_alloc_bins, y_red_reqmem_alloc_bins],\n",
     "                                   cmap = plt.cm.Blues)\n",
     "ax9.set_xlabel('ReqMemCPU(gigs)')\n",
     "ax9.set_ylabel('AllocCPUS')\n",
     "ax9.set_title('Red Cluster')\n",
-    "ax9.set_xlim(0,40)\n",
-    "ax9.set_ylim(0,140)\n",
+    "ax9.set_xlim(xaxis_min,xaxis_max)\n",
+    "ax9.set_ylim(yaxis_min,yaxis_max)\n",
     "\n",
     "\n",
     "\n",
-    "# sets the spacing\n",
-    "# top = space between title and graphs - increase number to bring title down and decrease to bring title up\n",
-    "# left = space to the left\n",
-    "# wspace = padding on both sides of graphs\n",
-    "# hspace = padding on top and bottom of graphs\n",
-    "\n",
-    "figure.subplots_adjust(left=0.0, wspace=0.2, top=.92, hspace=0.3)\n",
-    "figure.suptitle('Clusters', fontsize=20)\n",
-    "\n",
-    "plt.show()"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "# Creating bins \n",
-    "\n",
-    "#### Reqmem/Elapsed\n",
-    "x_rqmem_elapsed_min = np.min(LowerlimitGB)\n",
-    "x_rqmem_elapsed_max = np.max(UpperlimitGB)\n",
-    "  \n",
-    "y_rqmem_elapsed_min = np.min(LowerlimitElapsed) \n",
-    "y_rqmem_elapsed_max = np.max(UpperlimitElapsed) \n",
-    "  \n",
-    "x_rqmem_elapsed_bins = np.linspace(x_rqmem_elapsed_min, x_rqmem_elapsed_max, 50) \n",
-    "y_rqmem_elapsed_bins = np.linspace(y_rqmem_elapsed_min, y_rqmem_elapsed_max, 20) \n",
-    "\n",
-    "####Alloc/Elapsed\n",
-    "x_alloc_elapsed_min = np.min(LowerlimitAllocCPU)\n",
-    "x_alloc_elapsed_max = np.max(UpperlimitAllocCPU)\n",
-    "  \n",
-    "y_alloc_elapsed_min = np.min(LowerlimitElapsed) \n",
-    "y_alloc_elapsed_max = np.max(UpperlimitElapsed)\n",
-    "\n",
-    "x_alloc_elapsed_bins = np.linspace(x_alloc_elapsed_min, x_alloc_elapsed_max, 50) \n",
-    "y_alloc_elapsed_bins = np.linspace(y_alloc_elapsed_min, y_alloc_elapsed_max, 20) \n",
-    "\n",
-    "\n",
-    "###Alloc/Reqmem\n",
-    "x_reqmem_alloc_min = np.min(LowerlimitGB)\n",
-    "x_reqmem_alloc_max = np.max(UpperlimitGB)\n",
-    "  \n",
-    "y_reqmem_alloc_min = np.min(LowerlimitAllocCPU) \n",
-    "y_reqmem_alloc_max = np.max(UpperlimitAllocCPU)\n",
-    "\n",
-    "x_reqmem_alloc_bins = np.linspace(x_reqmem_alloc_min, x_reqmem_alloc_max, 50) \n",
-    "y_reqmem_alloc_bins = np.linspace(y_reqmem_alloc_min, y_reqmem_alloc_max, 20) \n"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "fig = plt.figure()\n",
-    "fig.set_size_inches(20,20)\n",
-    " \n",
-    "####Purple\n",
-    "ax = fig.add_subplot(331) # This represents a (3x3) grid (row x col) and we are plotting the (1) subplot. The last number increments row-wise.\n",
-    "rqmem_elapsed_purple_hist = ax.hist2d(df_purlple_2d1['ReqMemCPU'],df_purlple_2d1['Elapsed'], \n",
-    "                                bins =[x_rqmem_elapsed_bins, y_rqmem_elapsed_bins], \n",
-    "                                      cmap = plt.cm.Greys)\n",
-    "ax.set_xlabel('ReqMemCPU(gigs)')\n",
-    "ax.set_ylabel('Elapsed(hours)')\n",
-    "ax.set_title('Purple Cluster')\n",
-    "\n",
-    "\n",
-    "ax2 = fig.add_subplot(332) # Second subplot\n",
-    "alloc_elapsed_purple_hist = ax2.hist2d(df_purlple_2d2['AllocCPUS'],df_purlple_2d2['Elapsed'], \n",
-    "                                bins =[x_alloc_elapsed_bins, y_alloc_elapsed_bins], \n",
-    "                                       cmap = plt.cm.Greys)\n",
-    "ax2.set_xlabel('AllocCPUS')\n",
-    "ax2.set_ylabel('Elapsed(hours)')\n",
-    "ax2.set_title('Purple Cluster')\n",
-    "\n",
-    "\n",
-    "ax3 = fig.add_subplot(333)\n",
-    "reqmem_alloc_purple_hist = ax3.hist2d(df_purlple_2d3['ReqMemCPU'],df_purlple_2d3['AllocCPUS'], \n",
-    "                                bins =[x_reqmem_alloc_bins, y_reqmem_alloc_bins], \n",
-    "                                      cmap = plt.cm.Greys) # use magma or\n",
-    "ax3.set_xlabel('ReqMemCPU(gigs)')\n",
-    "ax3.set_ylabel('AllocCPUS')\n",
-    "ax3.set_title('Purple Cluster')\n",
-    "\n",
-    "\n",
-    "#####Green\n",
-    "ax4 = fig.add_subplot(334)\n",
-    "rqmem_elapsed_green_hist = ax4.hist2d(df_green_2d1['ReqMemCPU'],df_green_2d1['Elapsed'], \n",
-    "                                bins =[x_rqmem_elapsed_bins, y_rqmem_elapsed_bins], \n",
-    "                                      cmap = plt.cm.Greys)\n",
-    "ax4.set_xlabel('ReqMemCPU(gigs)')\n",
-    "ax4.set_ylabel('Elapsed(hours)')\n",
-    "ax4.set_title('Green Cluster')\n",
-    "\n",
-    "\n",
-    "ax5 = fig.add_subplot(335)\n",
-    "alloc_elapsed_green_hist = ax5.hist2d(df_green_2d2['AllocCPUS'],df_green_2d2['Elapsed'], \n",
-    "                                bins =[x_alloc_elapsed_bins, y_alloc_elapsed_bins],\n",
-    "                                      cmap = plt.cm.Greys)\n",
-    "ax5.set_xlabel('AllocCPUS')\n",
-    "ax5.set_ylabel('Elapsed(hours)')\n",
-    "ax5.set_title('Green Cluster')\n",
-    "\n",
-    "\n",
-    "ax6 = fig.add_subplot(336)\n",
-    "reqmem_alloc_green_hist = ax6.hist2d(df_green_2d3['ReqMemCPU'],df_green_2d3['AllocCPUS'], \n",
-    "                                bins =[x_reqmem_alloc_bins, y_reqmem_alloc_bins],\n",
-    "                                     cmap = plt.cm.Greys)\n",
-    "ax6.set_xlabel('ReqMemCPU(gigs)')\n",
-    "ax6.set_ylabel('AllocCPUS')\n",
-    "ax6.set_title('Green Cluster')\n",
+    "#####Yellow\n",
+    "ax10 = fig.add_subplot(4,3,10)\n",
+    "rqmem_elapsed_yellow_hist = ax10.hist2d(df_2_2d1['ReqMemCPU'],df_2_2d1['Elapsed'], \n",
+    "                                bins =[x_yellow_rqmem_elapsed_bins, y_yellow_rqmem_elapsed_bins],\n",
+    "                                    cmap = plt.cm.Blues)\n",
+    "ax10.set_xlabel('ReqMemCPU(gigs)')\n",
+    "ax10.set_ylabel('Elapsed(hours)')\n",
+    "ax10.set_title('Yellow Cluster')\n",
+    "ax10.set_xlim(xaxis_min,xaxis_max)\n",
+    "ax10.set_ylim(yaxis_min,yaxis_max)\n",
     "\n",
     "\n",
-    "#####Red\n",
-    "ax7 = fig.add_subplot(337)\n",
-    "rqmem_elapsed_red_hist = ax7.hist2d(df_red_2d1['ReqMemCPU'],df_red_2d1['Elapsed'], \n",
-    "                                bins =[x_rqmem_elapsed_bins, y_rqmem_elapsed_bins],\n",
-    "                                    cmap = plt.cm.Greys)\n",
-    "ax7.set_xlabel('ReqMemCPU(gigs)')\n",
-    "ax7.set_ylabel('Elapsed(hours)')\n",
-    "ax7.set_title('Red Cluster')\n",
+    "ax11 = fig.add_subplot(4,3,11)\n",
+    "alloc_elapsed_yellow_hist = ax11.hist2d(df_2_2d2['AllocCPUS'],df_2_2d2['Elapsed'], \n",
+    "                                bins =[x_yellow_reqmem_alloc_bins, y_yellow_reqmem_alloc_bins],\n",
+    "                                    cmap = plt.cm.Blues)\n",
+    "ax11.set_xlabel('AllocCPUS')\n",
+    "ax11.set_ylabel('Elapsed(hours)')\n",
+    "ax11.set_title('Yellow Cluster')\n",
+    "ax11.set_xlim(xaxis_min,xaxis_max)\n",
+    "ax11.set_ylim(yaxis_min,yaxis_max)\n",
     "\n",
     "\n",
-    "ax8 = fig.add_subplot(338)\n",
-    "alloc_elapsed_red_hist = ax8.hist2d(df_red_2d2['AllocCPUS'],df_red_2d2['Elapsed'], \n",
-    "                                bins =[x_reqmem_alloc_bins, y_reqmem_alloc_bins],\n",
-    "                                    cmap = plt.cm.Greys)\n",
-    "ax8.set_xlabel('AllocCPUS')\n",
-    "ax8.set_ylabel('Elapsed(hours)')\n",
-    "ax8.set_title('Red Cluster')\n",
+    "ax12 = fig.add_subplot(4,3,12)\n",
+    "reqmem_alloc_yellow_hist = ax12.hist2d(df_2_2d3['ReqMemCPU'],df_2_2d3['AllocCPUS'], \n",
+    "                                bins =[x_yellow_reqmem_alloc_bins, y_yellow_reqmem_alloc_bins],\n",
+    "                                   cmap = plt.cm.Blues)\n",
+    "ax12.set_xlabel('ReqMemCPU(gigs)')\n",
+    "ax12.set_ylabel('AllocCPUS')\n",
+    "ax12.set_title('Yellow Cluster')\n",
+    "ax12.set_xlim(xaxis_min,xaxis_max)\n",
+    "ax12.set_ylim(yaxis_min,yaxis_max)\n",
     "\n",
     "\n",
-    "ax9 = fig.add_subplot(339)\n",
-    "reqmem_alloc_red_hist = ax9.hist2d(df_red_2d3['ReqMemCPU'],df_red_2d3['AllocCPUS'], \n",
-    "                                bins =[x_reqmem_alloc_bins, y_reqmem_alloc_bins],\n",
-    "                                   cmap = plt.cm.Greys)\n",
-    "ax9.set_xlabel('ReqMemCPU(gigs)')\n",
-    "ax9.set_ylabel('AllocCPUS')\n",
-    "ax9.set_title('Red Cluster')\n",
     "\n",
     "# sets the spacing\n",
     "# top = space between title and graphs - increase number to bring title down and decrease to bring title up\n",
     "# left = space to the left\n",
     "# wspace = padding on both sides of graphs\n",
     "# hspace = padding on top and bottom of graphs\n",
+    "#bottom = the bottom of the subplots of the figure\n",
+    "#top = the top of the subplots of the figure\n",
     "\n",
-    "figure.subplots_adjust(left=0.0, wspace=0.2, top=.92, hspace=0.3)\n",
+    "fig.subplots_adjust(left=0.0, wspace=0.2, top=3, hspace=.2)\n",
     "figure.suptitle('Clusters', fontsize=20)\n",
     "\n",
+    "\n",
     "plt.show()"
    ]
   },