geoscixyz / geosci-labs

collection of notebook-apps for concepts in applied geophysics
https://geosci.xyz
MIT License
50 stars 35 forks source link

Plot unbroken lines for E and J fields #71

Open santisoler opened 11 months ago

santisoler commented 11 months ago

Currently some DC widgets plot broken lines for the E and J fields:

image

This plots could be misleading. Since lines density relates to the magnitude of the fields, having broken lines appearing and disappearing could lead to wrong interpretations of the values of the field in different regions. For example, in this image, the fields lines are less denser around the sources than in deeper regions.

We should pass broken_streamlines=False to matplotlib.pyplot.streamplot when plotting field lines.

This option was introduced in matplotlib 3.6, therefore the pinned version of matplotlib should be changed so we can make this change. Is there any reason why matplotlib is pinned to <3.5 on environment.yml? It was pinned in https://github.com/geoscixyz/geosci-labs/pull/45

micmitch commented 11 months ago

Nice that they have added this functionality to streamplot!