@@ -995,6 +995,51 @@ def draw_barplot(data, **kwargs):
995995 return
996996
997997
998+ @app .cell
999+ def _ (overhead_df , palette_for_tools , plt , sns ):
1000+ def draw_barplot_ram (data , ** kwargs ):
1001+ """
1002+ Draw grouped barplot of mean pkg_overhead_per_core per frequency, with error bars per tool.
1003+ """
1004+ sns .barplot (
1005+ data = data ,
1006+ x = "target_frequency" ,
1007+ y = "ram_overhead_per_core" ,
1008+ hue = "tool" ,
1009+ estimator = "median" ,
1010+ palette = palette_for_tools ,
1011+ errorbar = ("pi" , 50 ), capsize = .2 ,
1012+ err_kws = {"color" : ".3" , "linewidth" : 1.2 },
1013+ ** kwargs
1014+ )
1015+
1016+ # Facet by cluster
1017+ g_bar_ram = sns .FacetGrid (
1018+ overhead_df ,
1019+ col = "processor_description" ,
1020+ col_wrap = 3 ,
1021+ margin_titles = True ,
1022+ height = 3.7 ,
1023+ aspect = 1.5
1024+ )
1025+
1026+ plt .suptitle ("" , fontsize = 18 )
1027+ g_bar_ram .map_dataframe (draw_barplot_ram )
1028+
1029+ # Beautify
1030+ g_bar_ram .set_axis_labels ("Frequency (Hz)" , "RAM domain overhead\n per core with IQR (W)" , fontsize = 14 )
1031+ g_bar_ram .set_titles (col_template = "{col_name}" , fontsize = 12 )
1032+ g_bar_ram .add_legend (fontsize = 16 , ncol = 5 , bbox_to_anchor = (0.0 , - 0.3175 , 0.5 , 0.5 ))
1033+
1034+ for axis_ram in g_bar_ram .axes :
1035+ axis_ram .tick_params (axis = "x" , labelsize = 14 )
1036+ axis_ram .tick_params (axis = "y" , labelsize = 14 )
1037+ axis_ram .set_title (label = axis_ram .get_title (), fontsize = 16 )
1038+ plt .savefig ("ram_overhead.png" , bbox_inches = "tight" , dpi = 600 )
1039+ plt .show ()
1040+ return
1041+
1042+
9981043@app .cell
9991044def _ (
10001045 alumet_frequency ,
0 commit comments