MCPcopy Create free account
hub / github.com/datalayer/jupyter-ui / MatplotlibExample

Function MatplotlibExample

packages/react/src/examples/Matplotlib.tsx:18–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16
17import NBFORMAT from './notebooks/Matplotlib.ipynb.json';
18
19const MatplotlibExample = () => {
20 const { serviceManager, defaultKernel } = useJupyter({
21 startDefaultKernel: true,
22 });
23 const extensions = useMemo(() => [new CellSidebarExtension()], []);
24 return (
25 <ExampleJupyterReactTheme>
26 <JupyterLabCss colormode="light" />
27 {serviceManager && defaultKernel && (
28 <Notebook
29 id="notebook-matplotlib-id"
30 kernel={defaultKernel}
31 serviceManager={serviceManager}
32 nbformat={NBFORMAT as INotebookContent}
33 height="calc(100vh - 2.6rem)" // (Height - Toolbar Height).
34 extensions={extensions}
35 Toolbar={NotebookToolbar}
36 />
37 )}
38 </ExampleJupyterReactTheme>
39 );
40};
41
42const div = document.createElement('div');

Callers

nothing calls this directly

Calls 1

useJupyterFunction · 0.90

Tested by

no test coverage detected