Commit 970de6b5 authored by John-Paul Robinson's avatar John-Paul Robinson
Browse files

Add all nodes power plot and update all plots for shared x axis

Create a meta-pattern plot for all nodes.
Clean up all multi-node plots with a shared x-axis and correct
legend placement on subplots.
parent 3aa25b34
......@@ -212,7 +212,11 @@
"\n",
"This is just to see the data for each node in one plot and get a feel for how the nodes behave relative to each other. Plot nodes in individual subplotes to decern individual behavior of specific nodes. It does give a sense of how the total power adds up. \n",
"\n",
"Inspect the nodes in the first rack."
"Inspect the nodes in the first rack.\n",
"\n",
"Plot help on [shared x-axis](https://stackoverflow.com/a/37738851)\n",
"on [correct pandas legend use](https://stackoverflow.com/a/59797261)\n",
"and [subplot legend placement](https://stackoverflow.com/a/27017307)"
]
},
{
......@@ -222,9 +226,10 @@
"outputs": [],
"source": [
"num_nodes=36\n",
"fig, axes = plt.subplots(num_nodes,1, figsize=(20,30))\n",
"fig, axes = plt.subplots(num_nodes,1, sharex=True, figsize=(20,30))\n",
"for i in range(num_nodes):\n",
" m6_hourly_pwr['2020-02-01':'2021-02-21'].iloc[:,i+1:i+2].plot(ax=axes[i], legend=\"left\")"
" m6_hourly_pwr['2020-02-01':'2021-02-21'].iloc[:,i+1:i+2].plot(ax=axes[i], legend=True)\n",
" axes[i].legend(loc='lower left')"
]
},
{
......@@ -277,9 +282,35 @@
"outputs": [],
"source": [
"num_nodes=len(power_missing)\n",
"fig, axes = plt.subplots(num_nodes,1, figsize=(20,30))\n",
"fig, axes = plt.subplots(num_nodes,1, sharex=True, figsize=(20,30))\n",
"for i, node in enumerate(power_missing):\n",
" m6_hourly_pwr[node].plot(ax=axes[i], legend=\"left\")"
" m6_hourly_pwr[node].plot(ax=axes[i], legend=True)\n",
" axes[i].legend(loc='lower left')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Plot all nodes power\n",
"\n",
"Create overview plot of all nodes to observe meta-patterns."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"num_nodes=len(m6_hourly_pwr.iloc[:,1:].columns)\n",
"\n",
"fig, axes = plt.subplots(num_nodes,1, sharex=True, figsize=(20,num_nodes))\n",
"for i, node in enumerate(m6_hourly_pwr.iloc[:,1:].columns):\n",
" if (i == num_nodes):\n",
" break\n",
" m6_hourly_pwr[node]['2020-02-01':'2021-02-21'].plot(ax=axes[i], legend=True)\n",
" axes[i].legend(loc='lower left')\n"
]
},
{
......
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