You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To plot the ERD for an entire schema, an ERD object can be initialized with the schema object (which is normally used to decorate table objects)
2
+
To plot the Diagram for an entire schema, an Diagram object can be initialized with the schema object (which is normally used to decorate table objects)
3
3
4
4
.. code-block:: python
5
5
6
6
import datajoint as dj
7
7
schema = dj.Schema('my_database')
8
-
dj.ERD(schema).draw()
8
+
dj.Diagram(schema).draw()
9
9
10
10
or alternatively an object that has the schema object as an attribute, such as the module defining a schema:
11
11
12
12
.. code-block:: python
13
13
14
14
import datajoint as dj
15
15
import seq # import the sequence module defining the seq database
16
-
dj.ERD(seq).draw() # draw the ERD
16
+
dj.Diagram(seq).draw() # draw the Diagram
17
17
18
18
Note that calling the ``.draw()`` method is not necessary when working in a Jupyter notebook.
19
-
The preferred workflow is to simply let the object display itself, for example by writing ``dj.ERD(seq)``.
20
-
The ERD will then render in the notebook using its ``_repr_html_`` method.
21
-
An ERD displayed without ``.draw()`` will be rendered as an SVG, and hovering the mouse over a table will reveal a compact version of the output of the ``.describe()`` method.
19
+
The preferred workflow is to simply let the object display itself, for example by writing ``dj.Diagram(seq)``.
20
+
The Diagram will then render in the notebook using its ``_repr_html_`` method.
21
+
An Diagram displayed without ``.draw()`` will be rendered as an SVG, and hovering the mouse over a table will reveal a compact version of the output of the ``.describe()`` method.
0 commit comments