Compass#
- class jdaviz.configs.imviz.plugins.compass.compass.Compass(*args, **kwargs)[source]#
Bases:
PluginTemplateMixin,ViewerSelectMixinSee the Compass Plugin Documentation for more details.
Only the following attributes and methods are available through the public plugin API:
viewer(ViewerSelect): Viewer to show orientation/compass information.data_label: label of the top-layer shown in the compass (read-only)
Public constructor
Attributes Summary
A float trait.
A boolean (True, False) trait.
A trait for unicode strings.
A trait for unicode strings.
A trait for unicode strings.
Methods Summary
Clear the content of the plugin.
draw_compass(data_label, img_data)Draw compass in the plugin.
show(*args, **kwargs)Display the plugin UI.
Attributes Documentation
- canvas_angle#
A float trait.
- canvas_flip_horizontal#
A boolean (True, False) trait.
- data_label#
A trait for unicode strings.
- icon#
A trait for unicode strings.
- img_data#
A trait for unicode strings.
- template_file = ('/home/docs/checkouts/readthedocs.org/user_builds/pllim/envs/yessss-dark-mode-doc/lib/python3.11/site-packages/jdaviz/configs/imviz/plugins/compass/compass.py', 'compass.vue')#
- user_api#
Methods Documentation
- draw_compass(data_label, img_data)[source]#
Draw compass in the plugin. Input is rendered buffer from Matplotlib.
- show(*args, **kwargs)[source]#
Display the plugin UI.
- Parameters:
- locstr
The display location determines where to present the viz app. Supported locations:
“inline”: Display the plugin inline in a notebook.
“sidecar”: Display the plugin in a separate JupyterLab window from the notebook, the location of which is decided by the ‘anchor.’ right is the default
Other anchors:
sidecar:right(The default, opens a tab to the right of display)sidecar:tab-before(Full-width tab before the current notebook)sidecar:tab-after(Full-width tab after the current notebook)sidecar:split-right(Split-tab in the same window right of the notebook)sidecar:split-left(Split-tab in the same window left of the notebook)sidecar:split-top(Split-tab in the same window above the notebook)sidecar:split-bottom(Split-tab in the same window below the notebook)
See jupyterlab-sidecar for the most up-to-date options.
“popout”: Display the plugin in a detached display. By default, a new window will open. Browser popup permissions required.
Other anchors:
popout:window(The default, opens Jdaviz in a new, detached popout)popout:tab(Opens Jdaviz in a new, detached tab in your browser)
- titlestr, optional
The title of the sidecar tab. Defaults to the name of the plugin.
NOTE: Only applicable to a “sidecar” display.
Notes
If “sidecar” is requested in the “classic” Jupyter notebook, the plugin will appear inline, as only JupyterLab has a mechanism to have multiple tabs.