最近「magpylib」をインストールしました。このパッケージを学習するために、ドキュメントで提供されている基本コードを実行しようとしています (私は Python の初心者です)。「displaySystem」関数に関しては、次のように説明されています。
displaySystem(markers=[[0.0, 0.0, 0.0]], suppress=False, direc=False)
コレクション システムをインタラクティブな pyplot で表示し、matplotlib の図識別子を返します。" ( https://magpylib.readthedocs.io/en/installation-update/_autogen/magpylib/#magpylib.Collection )
AttributeError: 'Collection' object has no attribute 'displaySystem'試したドキュメントの 2 つのコードにエラーがあります。最初のコード:
from magpylib import Collection, source
c=source.current.Circular(3,7)
x = Collection(c)
marker0 = [0,0,0,"Neutral Position"]
marker1 = [10,10,10]
x.displaySystem(markers=[ marker0,
marker1])
2番目のコード:
import magpylib
b = magpylib.source.magnet.Box( mag = [1,2,3],
dim = [4,5,6],
pos = [7,8,9],
angle = 90,
axis = (0,0,1))
col = magpylib.Collection(b)
col.displaySystem()
パッケージ「magpylib」が適切にインストールされているかどうかを確認しましたが、問題ありません...