问题
I am currently using Bokeh to plot some biological sequence data. Part of the plot involves displaying some text (amino acid residues) just above the x-axis, aligned with the numbers on the axis. When the user zooms in, they are then able to inspect the amino acid sequence (represented by single letters) that accompanies the data. However, when zoomed out, these letters merge together, and look quite messy.
Is there any way to selectively plot/show glyphs depending on the zoom level?
Many thanks,
Andrew
回答1:
There is currently (as of version 0.7.1) no way to do this with static plots. It would probably be possible to make this work one way or another using a Bokeh server app, but that might otherwise be overkill for your situation. Adding some way to "spell" things like this in python and have them go into static plots would be a really nice feature. I encourage you to create a feature request issue on GH (https://github.com/bokeh/bokeh) so that the idea can be discussed among the devs and other interested parties.
来源:https://stackoverflow.com/questions/28164874/selectively-show-text-in-bokeh-plot-based-on-zoom-level