There's a specific fig[1].set_title(title)
call.
The title is specified in the plot (see the example, even if small).
I'm just creating a figure normally with matplotlib and save it to disk.
How are you reporting / generating them now?
Also, I think you can specify title withplt.title('Image Title')
Yes -- that's what I meant by The title is specified in the plot
. I make the plots manually - title, axes labels, ticks, etc. In that sense, the figure is entirely configured. ClearML just saves it as "untitled 00/plot image"
Did you try what I added? Also the screenshot is too small, nothing is readable
The screenshot is small since the data is private anyway, but it's enough to see:
"Metric: untitled 00" "plot image" as the image title The attached histogram has a title ("histogram of ...")
What versions of ClearML/matplotlib are you using?
ClearML 1.1.4, Matplotlib 3.3.0 (it's not the latest as we have some backward compatibility issues)
Without knowing anything, I'm assuming maybe ClearML patches plt.title
and not Axes.set_title
?
Sure! It's a bit intricate as it accommodates many of our different plotting functionalities, but this consists of the important bits (I realize we have some bad naming here, but fig[0]
is actually a Figure object, and fig[1]
is an Axes object):
` plt.switch_backend('agg')
sns.set_theme(...)
fig = plt.subplots(...)
sns.histplot(data, ax=fig[1], ...)
fig[1].set_xlim(...)
fig[1].set_ylim(...)
fig[1].legend(loc='best')
fig[1].set_xlabel(xlabel)
fig[1].set_ylabel(ylabel)
fig[1].set_title(title)
sns.despine(fig=fig[0], ...)
plt.savefig(...) `
Can you add a snippet of how you're presenting/generating the matplotlibs?