Skip to content

Graphs in builtin_types.ipynb are sometimes excessively scaled #5

Closed
@EliahKagan

Description

@EliahKagan

In builtin_types.ipynb, the two graphs are huge--that is, with far greater scaling than they should be and otherwise are--under some circumstances.

Specifically, this happens on GNU/Linux systems (I've tested on a couple Ubuntu systems and on Debian 11) when pipenv is used for installation. It doesn't seem to happen when conda is used for installation. I don't know if there are other situations where this occurs.

The problem strongly appears to be with Graphviz itself, since conda installs Graphviz itself but pipenv doesn't, defaulting to the system or manually installed version. In a recent test on Ubuntu 23.04 (development version) using pipenv, redrawing the graph makes this, among other changes:

-       "<!-- Generated by graphviz version 7.1.0 (20230121.1956)\n",
+       "<!-- Generated by graphviz version 2.43.0 (0)\n",

This may not really be related to operating system, per se, except that some operating systems' package managers provide Graphviz but at much earlier than the latest version. This is possibly related to Graphviz issue 1605, or to Graphviz issue 1855 which was fixed in Graphviz 3.0.0.

Manually building the latest stable version of Graphviz from source and installing it so dot appears in an earlier-listed $PATH directory works around the problem. (One place I've tested this is in the dev container.)

Screenshot in VS Code:

Screenshot of a huge graph drawing in builtin_types.ipynb, displayed in VS Code

Screenshot in JupyterLab:

Screenshot of a huge graph drawing in builtin_types.ipynb, displayed in JupyterLab

Notice the scaling of the graph drawing (including the text labels) compared to the text shown in the notebook.

This doesn't seem to ever happen on Windows, nor does it seem to happen on any system when conda rather than pipenv is used to install the dependencies.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions