Skip to content
Snippets Groups Projects
Commit c4455745 authored by tomrink's avatar tomrink
Browse files

snapshot...

parent f87a4bcd
No related branches found
No related tags found
No related merge requests found
...@@ -292,7 +292,7 @@ def make_time_domain_hist(values, edges): ...@@ -292,7 +292,7 @@ def make_time_domain_hist(values, edges):
plt.show() plt.show()
def scatter_density(x, y, color=None, fname=None, fig=None): def scatter_density(x, y, color=None, fname=None, fig=None, x_rng=None, y_rng=None):
if fig is None: if fig is None:
fig = plt.figure() fig = plt.figure()
ax = fig.add_subplot(1, 1, 1, projection='scatter_density') ax = fig.add_subplot(1, 1, 1, projection='scatter_density')
...@@ -300,6 +300,9 @@ def scatter_density(x, y, color=None, fname=None, fig=None): ...@@ -300,6 +300,9 @@ def scatter_density(x, y, color=None, fname=None, fig=None):
ax.scatter_density(x, y, color=color) ax.scatter_density(x, y, color=color)
else: else:
ax.scatter_density(x, y) ax.scatter_density(x, y)
if x_rng is not None and y_rng is not None:
ax.set_xlim(x_rng[0], x_rng[1])
ax.set_ylim(y_rng[0], y_rng[1])
if fname is not None: if fname is not None:
fig.savefig(fname) fig.savefig(fname)
......
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