Plot#

class jdaviz.core.template_mixin.Plot(**kwargs: Any)[source]#

Bases: PluginSubcomponent

Plot subcomponent. For most cases where a plugin only requires a single plot, use the mixin instead.

To use in a plugin, define plugin.plot = Plot(plugin), create a plot_widget Unicode traitlet, and set plugin.plot_widget = 'IPY_MODEL_'+self.plot.model_id.

To render in the plugin’s vue file:

<jupyter-widget :widget="plot_widget"></jupyter-widget>

Public constructor

Attributes Summary

app

figure

A trait which allows any value.

layers

marks

template_file

toolbar

A trait which allows any value.

user_api

Methods Summary

add_bins(label[, sample, bins, density])

add_line(label[, x, y, xnorm, ynorm])

add_scatter(label[, x, y, xnorm, ynorm])

clear_all_marks()

clear_marks(*mark_labels)

set_limits([x_min, x_max, y_min, y_max])

update_style(label, **kwargs)

Attributes Documentation

app#
figure#

A trait which allows any value.

layers#
marks#
template_file = ('/home/docs/checkouts/readthedocs.org/user_builds/jdaviz/envs/latest/lib/python3.11/site-packages/jdaviz/core/template_mixin.py', '../components/plugin_plot.vue')#
toolbar#

A trait which allows any value.

user_api#

Methods Documentation

add_bins(label, sample=[0], bins=2, density=True, **kwargs)[source]#
add_line(label, x=[], y=[], xnorm=False, ynorm=False, **kwargs)[source]#
add_scatter(label, x=[], y=[], xnorm=False, ynorm=False, **kwargs)[source]#
clear_all_marks()[source]#
clear_marks(*mark_labels)[source]#
set_limits(x_min=None, x_max=None, y_min=None, y_max=None)[source]#
update_style(label, **kwargs)[source]#