Skip to content

Commit

Permalink
Plots: allow passing DataFrame to dplot
Browse files Browse the repository at this point in the history
  • Loading branch information
tritemio committed May 2, 2017
1 parent 61bd7bd commit 0960a70
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions fretbursts/burst_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2051,17 +2051,23 @@ def dplot_1ch(d, func, pgrid=True, ax=None,
func(d, **kwargs)
return ax


def dplot(d, func, **kwargs):
"""Main plot wrapper for single and multi-spot measurements."""
if d.nch == 1:
if hasattr(d, '__array__'):
nch = d.shape[1]
else:
nch = d.nch
if nch == 1:
return dplot_1ch(d=d, func=func, **kwargs)
elif d.nch == 8:
elif nch == 8:
return dplot_8ch(d=d, func=func, **kwargs)
elif d.nch == 16:
elif nch == 16:
return dplot_16ch(d=d, func=func, **kwargs)
elif d.nch == 48:
elif nch == 48:
return dplot_48ch(d=d, func=func, **kwargs)


##
# ALEX join-plot using seaborn
#
Expand Down

0 comments on commit 0960a70

Please sign in to comment.