-
i checked the documentation there is no option to add threshold of interaction in the plot_barcode. Is there any method that can decide the threshold for the plot_barcode? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
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) |
Beta Was this translation helpful? Give feedback.
-
Hello, |
Beta Was this translation helpful? Give feedback.
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
(I haven't actually tested that code but it should be a good starting point)