xrview.notebook.NotebookViewer

class xrview.notebook.NotebookViewer(*args, **kwargs)[source]

Base class for notebook viewers.

__init__(*args, **kwargs)

Constructor.

Parameters
dataxarray DataArray or Dataset

The data to display.

xstr

The name of the dimension in data that contains the x-axis values.

glyphsstr, BaseGlyph or iterable, default ‘line’

The glyph to use for plotting.

figsizeiterable, default (600, 300)

The size of the figure in pixels.

ncolsint, default 1

The number of columns of the layout.

overlay‘dims’ or ‘data_vars’, default ‘dims’

If ‘dims’, make one figure for each data variable and overlay the dimensions. If ‘data_vars’, make one figure for each dimension and overlay the data variables. In the latter case, all variables must have the same dimensions.

tooltipsdict, optional

Names of tooltips mapping to glyph properties or source columns, e.g. {'datetime': '$x{%F %T.%3N}'}.

toolsstr, optional

bokeh tool string.

paletteiterable, optional

The palette to use when overlaying multiple glyphs.

ignore_indexbool, default False

If True, replace the x-axis values of the data by an appropriate evenly spaced index.

Methods

__init__(*args, **kwargs)

Constructor.

add_annotation(annotation[, onto])

Add an annotation to a figure in the layout.

add_figure(data[, glyphs, coords, name])

Add a figure to the layout.

add_interaction(interaction)

Add an interaction to the layout.

add_overlay(data[, glyphs, coords, name, onto])

Add an overlay to a figure in the layout.

copy([with_data])

Create a copy of this instance.

export(filename[, mode])

Export the layout as as png or svg file.

make_doc()

Make the document.

make_layout()

Make the layout.

modify_figures(modifiers[, figures])

Modify the attributes of a figure.

on_reset(event)

Callback for reset event.

on_selected_points_change(attr, old, new)

Callback for selection event.

reset_handlers()

Reset handlers.

show([notebook_url, port, remake_layout, …])

Show the app in a jupyter notebook.

update_handler(handler)

Update a single handler.

update_handlers([handlers])

Update handlers.

update_inplace(other)

Update this instance with the properties of another layout.

Attributes

default_tools