Commit 1e14e2f8 authored by Marcus Wirtz's avatar Marcus Wirtz

Return fig,ax in skymap.heatmap

parent 77c48e8a
......@@ -31,9 +31,8 @@ def scatter(v, log10e, cblabel='log$_{10}$(Energy / eV)', fontsize=26, opath=Non
ax = fig.add_axes([0.1, 0.1, 0.85, 0.9], projection="hammer")
kwargs.setdefault('s', 8)
kwargs.setdefault('lw', 0)
kwargs.setdefault('vmin', np.min(log10e))
kwargs.setdefault('vmax', np.max(log10e))
events = ax.scatter(lons, lats, c=log10e, **kwargs)
kwargs.setdefault('c', log10e)
events = ax.scatter(lons, lats, **kwargs)
cbar = plt.colorbar(events, orientation='horizontal', shrink=0.85, pad=0.05, aspect=30, cmap=kwargs.get('cmap'))
cbar.set_label(cblabel, fontsize=fontsize)
......@@ -54,6 +53,8 @@ def scatter(v, log10e, cblabel='log$_{10}$(Energy / eV)', fontsize=26, opath=Non
plt.savefig(opath, bbox_inches='tight')
plt.clf()
return fig, ax
def smart_round(v, order=2, upper_border=True):
"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment