Skip to content

Commit

Permalink
Merge histogram fixes into main (#1)
Browse files Browse the repository at this point in the history
* Fix automatic log generation for non-Unix systems

* Replace 2D histogram with joint scatterplot + kde

* Replot: Fix priority of jointplots, allowing `jointscatter`
  • Loading branch information
zmenciso authored Feb 10, 2023
1 parent e09f6ce commit 1e8321b
Show file tree
Hide file tree
Showing 3 changed files with 3,673 additions and 1,883 deletions.
43 changes: 22 additions & 21 deletions plot_functions/replot.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,17 @@ def usage():


def draw(y, df, cmap):
if 'line' in param['ptype']:
ax = sns.lineplot(data=df,
x=param['x'],
y=y,
hue=param['hue'],
style=param['style'],
size=param['size'],
alpha=param['alpha'],
estimator=param['stat'] if param['stat'] else 'mean',
lw=param['width'] if param['width'] else 2,
ci=param['ci'],
palette=cmap)
if 'joint' in param['ptype']:
ax = sns.jointplot(data=df,
x=param['x'],
y=y,
kind=re.sub('joint', '', param['ptype']),
height=param['figsize'][0],
hue=param['hue'],
palette=cmap,
marginal_ticks=True)

if 'scatter' in param['ptype']:
elif 'scatter' in param['ptype']:
ax = sns.scatterplot(data=df,
x=param['x'],
y=y,
Expand All @@ -79,14 +76,18 @@ def draw(y, df, cmap):
s=param['width'] if param['width'] else 16,
palette=cmap)

elif 'joint' in param['ptype']:
ax = sns.jointplot(data=df,
x=param['x'],
y=y,
kind=re.sub('joint', '', param['ptype']),
height=param['figsize'][0],
hue=param['hue'],
palette=cmap)
if 'line' in param['ptype']:
ax = sns.lineplot(data=df,
x=param['x'],
y=y,
hue=param['hue'],
style=param['style'],
size=param['size'],
alpha=param['alpha'],
estimator=param['stat'] if param['stat'] else 'mean',
lw=param['width'] if param['width'] else 2,
ci=param['ci'],
palette=cmap)

elif 'heat' in param['ptype']:
# TODO: Rounding is cringe, remove it
Expand Down
Loading

0 comments on commit 1e8321b

Please sign in to comment.