Skip to content

Commit 2ccaa96

Browse files
author
Chris Agostino
committed
updated some bugs in plotting_utils
1 parent 7dd3fa8 commit 2ccaa96

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

chroptiks/plotting_utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ def scatter(x,y, plotdata=True, fig=None, ax=None, makefigax=True,
6767
facecolor=None, cmap='plasma', edgecolor='k',
6868
alpha=1, color='k', marker='o',
6969
s=5, vmin=None, vmax=None, label='',
70+
ccode=None,
7071
#for plot2dhist
7172
binlabel='',bin_y=False,
7273
lim=True, setplotlims=True, bin_stat_y='mean',
@@ -84,6 +85,7 @@ def scatter(x,y, plotdata=True, fig=None, ax=None, makefigax=True,
8485
edgecolor=edgecolor,
8586
alpha=alpha,
8687
color=color,
88+
c = ccode,
8789
marker=marker,
8890
s=s,
8991
vmin=vmin,
@@ -247,9 +249,10 @@ def plot2dhist(x,y,
247249

248250
hist, xedges, yedges = np.histogram2d(x,y,bins = (int(nx),int(ny)), range=[xlim, ylim ])
249251
extent= [np.min(xedges),np.max(xedges),np.min(yedges),np.max(yedges)]
252+
set_aesthetics(xlim=xlim, ylim=ylim, aspect=aspect, xlabel=xlabel, ylabel=ylabel, fig=fig, ax=ax, makefigax=False)
253+
250254
if len(ccode)==0:
251255
if data:
252-
set_aesthetics(xlim=xlim, ylim=ylim, aspect=aspect, xlabel=xlabel, ylabel=ylabel, fig=fig, ax=ax, makefigax=False)
253256

254257
ax.imshow((hist.transpose())**dens_scale, cmap='gray_r',extent=extent,origin='lower',
255258
aspect='auto',alpha=0.9)

0 commit comments

Comments
 (0)