Skip to content

Plotting multiple gates on single plot #253

Answered by whitews
ksebby asked this question in Q&A
Discussion options

You must be logged in to vote

Hi Karl,

The Session.plot_gate() method doesn't have any options to plot 2 gates. However, the plot objects returned are Bokeh figure instances so can be modified to add extra items. There are private helper methods to render the various gate shapes, so you could use these to achieve this. I'll add an example below to show how this is done. Be aware the plot_utils render functions are not public though I have no plans to change them so should be stable to use.

import bokeh
from bokeh.plotting import show

import flowkit as fk

bokeh.io.output_notebook()

# Create Session, add a sample
session = fk.Session()

data1_sample = fk.Sample("../../../data/gate_ref/data1.fcs")
session.add_samples(d…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ksebby
Comment options

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