Compass
- class jdaviz.configs.imviz.plugins.compass.compass.Compass(*args, **kwargs)[source] [edit on github]
Bases:
PluginTemplateMixin
,ViewerSelectMixin
See 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 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
- 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/jdaviz/envs/v3.0.2/lib/python3.9/site-packages/jdaviz/configs/imviz/plugins/compass/compass.py', 'compass.vue')
- user_api
Methods Documentation
- clear_compass()[source] [edit on github]
Clear the content of the plugin.
- draw_compass(data_label, img_data)[source] [edit on github]
Draw compass in the plugin. Input is rendered buffer from Matplotlib.
- show(*args, **kwargs)[source] [edit on github]
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.