Skip to content
Snippets Groups Projects
Commit d1a1f6cd authored by Alexander Böhmländer's avatar Alexander Böhmländer
Browse files

Adjusted new function sd_timeseries.

parent 0c8549be
No related branches found
No related tags found
No related merge requests found
......@@ -129,7 +129,22 @@ def annotate_heatmap(im, data=None, valfmt="{x:.2f}",
return texts
def sd_timeseries(min_exp, max_exp):
def sd_timeseries(sd_df, data_min, data_max):
(colormap, min_exp, max_exp) = omccolors.generate_omc(data_min,
data_max)
return colormap
fig, ax = plt.subplots()
c = ax.pcolormesh(times, bin_edges,
sd_df.T,
norm=mcolors.LogNorm(vmin=data_min, vmax=data_max),
cmap=colormap)
fig.colorbar(c, ax=ax, label=r'd$N$/dlog$d_\mathrm{p}$')
locator = mdates.AutoDateLocator()
formatter = mdates.ConciseDateFormatter(locator, tz='UTC', show_offset=False)
ax.get_xaxis().set_major_locator(locator)
ax.get_xaxis().set_major_formatter(formatter)
ax.set_ylabel(r'$d_\mathrm{p}$ / µm')
ax.set_xlabel(f'{times[0].tzinfo}')
return fig, ax
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment