<div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace">Hello,<br><br></div><div style="font-family:monospace,monospace;display:inline" class="gmail_default">I was trying to change the looks of the colorbar of slice plots; first I found out I could create a new colorbar in a new position. I obtained something I like very much like this (for some dataset ds):<br><br></div><div style="font-family:monospace,monospace;display:inline" class="gmail_default">​myvar = 'density'<br>sl = yt.SlicePlot(ds, 'x', myvar, center='c', width=(3,'kpc'))<br>sl.hide_colorbar() <br>sl.hide_axes()<br>plot   = sl.plots[myvar]<br>fig    = plot.figure<br>new_ax = fig.add_axes((0.025,0.94,0.75,0.025))<br>​​<br>cb     = plot.figure.colorbar(plot.image, new_ax, extend='both', orientation='horizontal', format='%.0E'​)​<br>sl._setup_plots()<br><br></div><div style="font-family:monospace,monospace" class="gmail_default">​The only problem now is I cannot change the font properties of this new colorbar. Even trying​, e.g.:<br></div><br>sl.set_font({'family': 'sans-serif', 'style': 'normal', 'weight': 'normal', 'size': 36})<br><br><div style="font-family:monospace,monospace" class="gmail_default">​will change all fonts, including the default colorbar, all text and annotations, but not this new colorbar.<br></div><div style="font-family:monospace,monospace" class="gmail_default">I think plot.figure.colorbar does not accept any argument to edit the font.<br><br></div><div style="font-family:monospace,monospace" class="gmail_default">Do you know how I could change this? Or maybe have I gone down the wrong path?<br></div><div style="font-family:monospace,monospace" class="gmail_default">​I wouldn't like to do all manually with matplotlib, as I plan to add many more yt annotations to this plot, which all work very well.<br></div><br><div style="font-family:monospace,monospace" class="gmail_default">​Thank you!​</div><br><div style="font-family:monospace,monospace" class="gmail_default">​Best,​</div><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><span style="font-family:monospace,monospace">Salvatore</span></div></div></div></div>
</div>