helpers#

Besides figure() and gmap() the bokeh.plotting module also contains additional functions and attributes liste in this section.

The following functions and classes are imported transitively and made available from bokeh.plotting as a convenience:

from_networkx#

from_networkx(graph: nx.Graph, layout_function: dict[int | str, Sequence[float]], **kwargs: Any) GraphRenderer[source]#

Generate a GraphRenderer from a networkx.Graph object and networkx layout function. Any keyword arguments will be passed to the layout function.

Only two dimensional layouts are supported.

Parameters:
  • graph (networkx.Graph) – a networkx graph to render

  • layout_function (function or dict) – a networkx layout function or mapping of node keys to positions.

  • coordinate. (The position is a two element sequence containing the x and y) –

Returns:

instance (GraphRenderer)

Note

Node and edge attributes may be lists or tuples. However, a given attribute must either have all lists or tuple values, or all scalar values, for nodes or edges it is defined on.

Warning

Node attributes labeled ‘index’ and edge attributes labeled ‘start’ or ‘end’ are ignored. If you want to convert these attributes, please re-label them to other names.

Raises:

ValueError

markers#

markers()[source]#

Prints a list of valid marker types for scatter()

Returns:

None

DEFAULT_TOOLS#

DEFAULT_TOOLS = 'pan,wheel_zoom,box_zoom,save,reset,help'#

str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.

A default set of tools configured if no configuration is provided.