Skip to content

Vertex body and outline are not consistent when using high DPI with matplotlib backend #644

@szhorvat

Description

@szhorvat

Describe the bug

By default, each vertex is drawn as a disk, with an outline. Under specific circumstances (using high DPI settings), the two are not drawn consistently. The outline may be much bigger than the vertex body, and there may be a gap between the two.

To reproduce

import igraph as ig
import matplotlib.pyplot as plt

g = ig.Graph.Ring(4)

fig, ax = plt.subplots(dpi=1000)

ig.plot(g, target=ax, layout=[[-10,-10], [10,-10], [10,10], [-10,10]], edge_width=0.1, edge_color='blue', vertex_size=0.1)

ax.autoscale_view()

fig.set_size_inches(1,1)

plt.show()

Screenshot from Jupyter notebook:

image

Notice that there is a gap between the outline and the vertex body.

Version information

0.10.4

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions