PMEAL / OpenPNM

A Python package for performing pore network modeling of porous media
http://openpnm.org
MIT License
442 stars 175 forks source link

[Bug]: plot_connections and plot_networkx produce out-of-scale plots #1592

Closed ma-sadeghi closed 4 years ago

ma-sadeghi commented 4 years ago

Describe the bug plot_connections and plot_networkx produce out-of-scale plots

To Reproduce Steps to reproduce the behavior, ideally a code snippet that only reproduces the bug:

import openpnm as op
net = op.network.Cubic(shape=[3, 3, 1])
op.topotools.plot_networkx(net)
op.topotools.plot_connections(net)

Expected behavior Similar plot but with better margins.

Screenshots Here's what you get: image

Ni2M commented 4 years ago

investigation on https://github.com/PMEAL/OpenPNM/blob/98e055cf3e680b023e47904efcf8b9936ec9d0cb/openpnm/topotools/plottools.py#L333 and https://github.com/PMEAL/OpenPNM/blob/98e055cf3e680b023e47904efcf8b9936ec9d0cb/openpnm/topotools/plottools.py#L350

jgostick commented 4 years ago

https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.pyplot.autoscale.html