pycharmでmatplotlibを用いて一次関数のグラフを描写したい考えています。
基本的な教材を用いていて環境設定はpython3.7でpip,matplotlib,numpyとあとはデフォのものです。
発生している問題・エラーメッセージ
2019-03-05 17:50:19.588 python[23074:191280] -[NSApplication _setup:]: unrecognized selector sent to instance 0x7fb3df0178d0 2019-03-05 17:50:19.590 python[23074:191280] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSApplication _setup:]: unrecognized selector sent to instance 0x7fb3df0178d0' *** First throw call stack: ( 0 CoreFoundation 0x00007fff3395dded __exceptionPreprocess + 256 1 libobjc.A.dylib 0x00007fff5fa25720 objc_exception_throw + 48 2 CoreFoundation 0x00007fff339db195 -[NSObject(NSObject) __retain_OA] + 0 3 CoreFoundation 0x00007fff338ffa60 ___forwarding___ + 1486 4 CoreFoundation 0x00007fff338ff408 _CF_forwarding_prep_0 + 120 5 libtk8.6.dylib 0x000000011caaf31d TkpInit + 413 6 libtk8.6.dylib 0x000000011ca0717e Initialize + 2622 7 _tkinter.cpython-37m-darwin.so 0x000000011c82fa0f _tkinter_create + 1183 8 python 0x000000010989a8b6 _PyMethodDef_RawFastCallKeywords + 230 9 python 0x00000001099d7ba2 call_function + 306 10 python 0x00000001099d5852 _PyEval_EvalFrameDefault + 46114 11 python 0x00000001099c91fe _PyEval_EvalCodeWithName + 414 12 python 0x0000000109899587 _PyFunction_FastCallDict + 231 13 python 0x000000010991bc31 slot_tp_init + 193 14 python 0x0000000109925c01 type_call + 241 15 python 0x000000010989a283 _PyObject_FastCallKeywords + 179 16 python 0x00000001099d7c35 call_function + 453 17 python 0x00000001099d5946 _PyEval_EvalFrameDefault + 46358 18 python 0x000000010989a075 function_code_fastcall + 117 19 python 0x00000001099d7b27 call_function + 183 20 python 0x00000001099d5852 _PyEval_EvalFrameDefault + 46114 21 python 0x00000001099c91fe _PyEval_EvalCodeWithName + 414 22 python 0x0000000109899587 _PyFunction_FastCallDict + 231 23 python 0x000000010989d4a2 method_call + 130 24 python 0x000000010989aef2 PyObject_Call + 130 25 python 0x00000001099d5a9d _PyEval_EvalFrameDefault + 46701 26 python 0x00000001099c91fe _PyEval_EvalCodeWithName + 414 27 python 0x000000010989a783 _PyFunction_FastCallKeywords + 195 28 python 0x00000001099d7b27 call_function + 183 29 python 0x00000001099d588d _PyEval_EvalFrameDefault + 46173 30 python 0x000000010989a075 function_code_fastcall + 117 31 python 0x00000001099d7b27 call_function + 183 32 python 0x00000001099d588d _PyEval_EvalFrameDefault + 46173 33 python 0x00000001099c91fe _PyEval_EvalCodeWithName + 414 34 python 0x000000010989a783 _PyFunction_FastCallKeywords + 195 35 python 0x00000001099d7b27 call_function + 183 36 python 0x00000001099d588d _PyEval_EvalFrameDefault + 46173 37 python 0x00000001099c91fe _PyEval_EvalCodeWithName + 414 38 python 0x000000010989a783 _PyFunction_FastCallKeywords + 195 39 python 0x00000001099d7b27 call_function + 183 40 python 0x00000001099d5852 _PyEval_EvalFrameDefault + 46114 41 python 0x00000001099c91fe _PyEval_EvalCodeWithName + 414 42 python 0x0000000109a2c760 PyRun_FileExFlags + 256 43 python 0x0000000109a2bbd7 PyRun_SimpleFileExFlags + 391 44 python 0x0000000109a597bf pymain_main + 9583 45 python 0x000000010986cbbd main + 125 46 libdyld.dylib 0x00007fff60af3ed9 start + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException Process finished with exit code 134 (interrupted by signal 6: SIGABRT)
該当のソースコード
import matplotlib.pyplot as plt import numpy as np x = np.arange(0,10,0.5) y = 5 * x - 10 plt.plot(x,y) plt.show()
試したこと
試しにMACのターミナルで動かしてみましたらしっかりと描写できました。pycharmだと何がいけないのでしょうか。
初心者で至らぬ点もありますが、教えていただければ幸いです。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。