You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I experienced a weird formatting of the llable next to the CMS logo. It creates a vertical offset of the llabel relative to the CMS logo. I have played around with different parameters like loc, fontsize, pad, but none fixed the issue. In fact the addition of a fondsize=18 argument increased the vertical offset.
This is a snipped of the code:
figsize = (len(features) * 1.6, len(ds) * 1.1)
fig2 = plt.figure(figsize=figsize)
plt.style.use(mplhep.style.CMS)
mplhep.cms.label(llabel='Private Work', data=False, fontsize=18)
corrcoef_str = np.round(corrcoef, decimals=2).astype(str)
for i, _ in enumerate(corrcoef.tolist()):
for j, _ in enumerate(corrcoef.tolist()[i]):
corrcoef_str[i][j] = "{:.2f}".format(corrcoef[i][j])
# plot the coefficients in a heatmap
im = plt.imshow(corrcoef, vmin=-1, vmax=1)
im_ratio = corrcoef.shape[0] / corrcoef.shape[1]
plt.colorbar(im, aspect=im_ratio * 20)
plt.xticks(np.arange(len(features)), labels=features, rotation=90)
plt.yticks(np.arange(len(ds)), labels=ds)
# set the grid
plt.xticks(np.arange(corrcoef.shape[1] + 1) - .5, minor=True)
plt.yticks(np.arange(corrcoef.shape[0] + 1) - .5, minor=True)
plt.grid(which="minor", color="black", linestyle='-', linewidth=.25)
# annotate the the heatmap with the values in each cell
for i in range(corrcoef.shape[0]):
for j in range(corrcoef.shape[1]):
plt.annotate(str(corrcoef_str[i][j]), xy=(j, i), ha='center', va='center', color='black',
fontsize=21)
plt.savefig(os.path.join(save_path, f'corrcoef_fold{f}_ensemble{e}.pdf'))
Hello,
I experienced a weird formatting of the llable next to the CMS logo. It creates a vertical offset of the llabel relative to the CMS logo. I have played around with different parameters like loc, fontsize, pad, but none fixed the issue. In fact the addition of a fondsize=18 argument increased the vertical offset.
This is a snipped of the code:
I will append screenshots of the labels with and without the fontsize argument as well as files specifying my technical setup. My setup is embedded in an analysis framework called coulmnflow.
venv_requirements.txt
model_specifications.txt
venv_requirements.txt
model_specifications.txt
The text was updated successfully, but these errors were encountered: