I am fairly new to using Bokeh. I’ve recently written a script that will import an earthquake data set. This has worked wonderfully. I am, however, also considering the possibility of adding focal mechanisms (they look like little beachballs).
They can be calculated and generated with the obspy package (obspy.imaging - Plotting routines for ObsPy — ObsPy Documentation (1.2.0)),
>>>from obspy.imaging.beachball import beachball
>>>np1 = [150, 87, 1]
>>>beachball(np1)
but I wouldn’t know where to start with adding these to a Bokeh map. Each beachball would look different for each event and could preferably be color coded based on other attributes in a way similar to other Bokeh glyphs. Any help is appreciated!
A brief look at the package seems to indicate that it is fairly well tied to MPL. Bokeh no longer makes any attempt at built-in MPL compatibility, so the only real options are finding a way to convert the current output into something Bokeh understands, or making a new version that uses native Bokeh APIs. If you can get RGBA arrays out of the existing project, could display those directly with Bokeh using the ImageRGBA glyph (or Figure.image_rgba)
I am fairly new to using Bokeh. I've recently written a script that will import an earthquake data set. This has worked wonderfully. I am, however, also considering the possibility of adding focal mechanisms (they look like little beachballs).
They can be calculated and generated with the obspy package (https://docs.obspy.org/packages/obspy.imaging.html\),
>>>from obspy.imaging.beachball import beachball
>>>np1 = [150, 87, 1]
>>>beachball(np1)
but I wouldn't know where to start with adding these to a Bokeh map. Each beachball would look different for each event and could preferably be color coded based on other attributes in a way similar to other Bokeh glyphs. Any help is appreciated!