Skip to content

threshold for fp.plot_barcode(). #171

Answered by cbouy
tjrong123 asked this question in Q&A
Discussion options

You must be logged in to vote

There's no such option, the point of the barcode plot is to show all the individual interactions in every frame.

But from the dataframe you can calculate the mean and then apply a threshold yourself, and then make a regular barplot with matplotlib or any other plotting library.

In the simplest case that would be something like

df = fp.to_dataframe()
dfavg = df.mean()
dfavg = dfavg.loc[dfavg > 0.3].to_frame()
dfavg.plot.bar()

(I haven't actually tested that code but it should be a good starting point)

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by tjrong123
Comment options

You must be logged in to vote
4 replies
@cbouy
Comment options

cbouy Apr 3, 2024
Maintainer

@Noah603
Comment options

@cbouy
Comment options

cbouy Apr 3, 2024
Maintainer

@Noah603
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants