I’m trying to write some functions for my research that are reusable. Specifically I would like to implement a Bode plot. This is a stacked plot of two figures with some specific relationship between them. I’m struggling to figure out the best way to implement this in a way that’s compatible with the rest of bokeh’s functions.
What I would like to be able to do:
- Include my bode plot as an element in other layouts.
- display it using
- anything else that you can do to a
Columnthat doesn’t conflict with the set of things that make a bode plot what it is (linked x axes and log scaling mainly).
Based on the above, I started by trying to make a class that derives from
bokeh.models.Column. This seems to have two problems however:
- I can specify that my class requires two figures, and then place them correctly in the
Column, but I can’t figure out how to specify anything about those figures. I don’t want to create a generic container where figures are passed into the constructor (like a
Columnis), but instead something that’s more like the interface of a single
bokeh.plotting.figurewhere you specify data, 3 columns, and visual parameters.
Is there any examples of something similar that I can look at for reference? or some some high level guidance about the best way to accomplish this.
The solution that I’m using right now is to create a new class not derived from any bokeh classes. This class then provides methods to construct a bokeh
Column from data, and a method to return that
Column so that it can be placed into a larger layout. This feels klunky for a bunch of reasons.
Thanks in advance!