The hover tool is a passive inspector tool. You can configure the crosshair tool dimensionsīy setting the dimensions property to width, height, or both. The crosshair tool draws a crosshair annotation over the plot, centered on You can toggle the active state of an inspector Multiple inspectors may beĪctive at any given time. The plot based on the current cursor position. Inspectors are passive tools that annotate or report information about Max values and ranges, preventing zooming in and out beyond these values. The zoom-out tool decreases the zoom level of the plot. Name: 'zoom_out', 'xzoom_out', 'yzoom_out' Values and ranges, preventing zooming in and out beyond these. The zoom-in tool increases the zoom of the plot. SaveTool ( filename = 'custom_filename' ) # png extension not neededĮither way, the file will then be downloaded directly or a modal dialog will open Property values for every object that is part of the plot. The examine tool displays a modal dialog that affords a view of all the current They are typically modal or immediate-acting. Actions #Īctions are operations that are activated only when their button in the toolbar Min and max values and ranges, preventing panning beyond these values. The wheel pan tool translates the plot window along a specifiedĭimension without changing the window’s aspect ratio. 'xwheel_zoom' and 'ywheel_zoom', respectively. The x-axis or the y-axis by setting the dimensions property toĪ list containing width or height. You can configure the wheel zoom tool to act only on either It will respect any min and max values and ranges, preventing You can use the wheel zoom tool to zoom the plot in and out, centering on the current Name: 'wheel_zoom', 'xwheel_zoom', 'ywheel_zoom' Only one scroll/pinch tool may be active at a time. Use these tools by pinching (on touch devices) or scrolling (on To make a multiple selection, press the SHIFT key. Running the code and changing the toolbar_location value. The code below positions the toolbar below the plot. If you would like to hide the toolbar entirely, pass None. You can specify the toolbar location by passing the toolbar_location Positioning the toolbar #īy default, Bokeh plots come with a toolbar above the plot. This chapter contains information about all the individual tools and describes how Since they may respond to several gestures at once, anĮdit tool when activated will potentially deactivate multiple single-gesture tools. These are sophisticated multi-gesture tools that can add, delete, or modify Way, such as the HoverTool or CrosshairTool. These are passive tools that report information or annotate plots in some These are immediate or modal operations that are only activated when theirīutton in the toolbar is pressed, such as the ResetTool or The active tool is highlighted on the toolbar next to the These tools respond to single gestures, such as a pan movement.įor each type of gesture, only one tool can be active at any given time. Information, to change plot parameters such as zoom level or range extents, Bokeh comes with a number of interactive tools that you can use to report From otting import figure, output_file, show, ColumnDataSource from bokeh.models import HoverTool output_file ( "toolbar.html" ) source = ColumnDataSource ( data = dict ( x =, y =, desc =, imgs =, fonts = ) ) hover = HoverTool ( tooltips = """ Location ($x, $y) """ ) p = figure ( plot_width = 400, plot_height = 400, tools =, title = "Mouse over the dots" ) p.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |