Magnetic field lines play a significant role in the analysis of many magnetic field-related problems. Previous literature on visualization methods of magnetic field lines has predominantly focused on "ensuring that the tangential direction at each point along a field line aligns with the direction of the local magnetic induction intensity vector", while neglecting the physical requirement of "using line density to reflect magnetic field strength". Based on Python programming language, taking the visualization method of magnetic field lines of the magnetic field of a circular current as an example, the sampling method and implementation process of making the drawn magnetic field lines meet the physical requirement of "the density of the lines reflects the strength of the magnetic field" are introduced in detail. This method features simple principles and strong general applicability.
SONG et al. (Mon,) studied this question.