Skip to content

Commit 7c73ceb

Browse files
committed
change label in other plot to MB
1 parent dfe8960 commit 7c73ceb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmb2.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,8 +1082,8 @@
10821082
"source": [
10831083
"# for each device, plot a bar that shows the data traffic (incoming and outgoing) and amount of packets\n",
10841084
"# aggregate data\n",
1085-
"df_device_in_total = (df_device_traffic.iloc[::2].agg(['sum']) // 1000).transpose()# even rows, incoming traffic\n",
1086-
"df_device_out_total = (df_device_traffic.iloc[1::2].agg(['sum']) //1000).transpose()# odd rows, outgoing traffic\n",
1085+
"df_device_in_total = (df_device_traffic.iloc[::2].agg(['sum']) // 1000000).transpose()# even rows, incoming traffic, convert to MB\n",
1086+
"df_device_out_total = (df_device_traffic.iloc[1::2].agg(['sum']) //1000000).transpose()# odd rows, outgoing traffic, convert to MB\n",
10871087
"\n",
10881088
"df_device_in_total_num = df_device_in_total['sum'].to_numpy()\n",
10891089
"df_device_out_total_num = df_device_out_total['sum'].to_numpy()\n",
@@ -1096,7 +1096,7 @@
10961096
"# plot data traffic per device\n",
10971097
"fig, ax = plt.subplots(figsize=(15,5))\n",
10981098
"plt.xlabel('Devices')\n",
1099-
"plt.ylabel('Data [kB]')\n",
1099+
"plt.ylabel('Data [MB]')\n",
11001100
"plt.title('Data traffic per Device')\n",
11011101
"plot_x_devices_traffic = np.arange(len(devices_labels))\n",
11021102
"plt.xticks(plot_x_devices_traffic, devices_labels, rotation=60, ha=\"right\")\n",

0 commit comments

Comments
 (0)