def plot_bit_for_bit(case, var_name, model_data, bench_data, diff_data):
plot_title = "<STR_LIT>"<EOL>plot_name = case + "<STR_LIT:_>" + var_name + "<STR_LIT>"<EOL>plot_path = os.path.join(os.path.join(livvkit.output_dir, "<STR_LIT>", "<STR_LIT>"))<EOL>functions.mkdir_p(plot_path)<EOL>m_ndim = np.ndim(model_data)<EOL>b_ndim = np.ndim(bench_data)<EOL>if m_ndim != b_ndim:<EOL><INDENT>return "<STR_LIT>"<EOL><DEDENT>if m_ndim == <NUM_LIT:3>:<EOL><INDENT>model_data = model_data[-<NUM_LIT:1>]<EOL>bench_data = bench_data[-<NUM_LIT:1>]<EOL>diff_data = diff_data[-<NUM_LIT:1>]<EOL>plot_title = "<STR_LIT>"+var_name+"<STR_LIT>"<EOL><DEDENT>elif m_ndim == <NUM_LIT:4>:<EOL><INDENT>model_data = model_data[-<NUM_LIT:1>][<NUM_LIT:0>]<EOL>bench_data = bench_data[-<NUM_LIT:1>][<NUM_LIT:0>]<EOL>diff_data = diff_data[-<NUM_LIT:1>][<NUM_LIT:0>]<EOL>plot_title = "<STR_LIT>"+var_name+"<STR_LIT>"<EOL><DEDENT>plt.figure(figsize=(<NUM_LIT:12>, <NUM_LIT:3>), dpi=<NUM_LIT>)<EOL>plt.clf()<EOL>_max = np.amax([np.amax(model_data), np.amax(bench_data)])<EOL>_min = np.amin([np.amin(model_data), np.amin(bench_data)])<EOL>plt.subplot(<NUM_LIT:1>, <NUM_LIT:3>, <NUM_LIT:1>)<EOL>plt.xlabel("<STR_LIT>")<EOL>plt.ylabel(var_name)<EOL>plt.xticks([])<EOL>plt.yticks([])<EOL>plt.imshow(model_data, vmin=_min, vmax=_max, interpolation='<STR_LIT>', cmap=colormaps.viridis)<EOL>plt.colorbar()<EOL>plt.subplot(<NUM_LIT:1>, <NUM_LIT:3>, <NUM_LIT:2>)<EOL>plt.xlabel("<STR_LIT>")<EOL>plt.xticks([])<EOL>plt.yticks([])<EOL>plt.imshow(bench_data, vmin=_min, vmax=_max, interpolation='<STR_LIT>', cmap=colormaps.viridis)<EOL>plt.colorbar()<EOL>plt.subplot(<NUM_LIT:1>, <NUM_LIT:3>, <NUM_LIT:3>)<EOL>plt.xlabel("<STR_LIT>")<EOL>plt.xticks([])<EOL>plt.yticks([])<EOL>plt.imshow(diff_data, interpolation='<STR_LIT>', cmap=colormaps.viridis)<EOL>plt.colorbar()<EOL>plt.tight_layout(rect=(<NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT>, <NUM_LIT>))<EOL>plt.suptitle(plot_title)<EOL>plot_file = os.path.sep.join([plot_path, plot_name])<EOL>if livvkit.publish:<EOL><INDENT>plt.savefig(os.path.splitext(plot_file)[<NUM_LIT:0>]+'<STR_LIT>', dpi=<NUM_LIT>)<EOL><DEDENT>plt.savefig(plot_file)<EOL>plt.close()<EOL>return os.path.join(os.path.relpath(plot_path,<EOL>os.path.join(livvkit.output_dir, "<STR_LIT>")),<EOL>plot_name)<EOL>
Create a bit for bit plot