내장 된 SPSS의 다른 그래프 라이브러리를 사용할 수 있습니까? SPSS를 훌륭하게 만드는 파이썬 확장을 발견했습니다.SPSS의 matplotlib 그래프
import matplotlib.pyplot as plt
from numpy.random import rand
fig, ax = plt.subplots()
for color in ['red', 'green', 'blue']:
n = 750
x, y = rand(2, n)
scale = 200.0 * rand(n)
ax.scatter(x, y, c=color, s=scale, label=color,
alpha=0.3, edgecolors='none')
ax.legend()
ax.grid(True)
plt.show()
이것은 간단한 산포도를 생성하고 그것은 어떤 IDE에서 잘 작동하지만 시도 할 때 다음과 같은 에러가 발생 END PROGRAM
SPSS BEGIN PROGRAM
에 해당 코드를 사용 :
RuntimeError: Python is not installed as a framework. The Mac OS X backend will not be able to function correctly if Python is not installed as a framework. See the Python documentation for more information on installing Python as a framework on Mac OS X.
Please either reinstall Python as a framework, or try one of the other backends. If you are Working with Matplotlib in a virtual enviroment see 'Working with Matplotlib in Virtual environments' in the Matplotlib FAQ
어쩌면 내가 부탁하고 SPSS의 파이썬 확장 기능에서 너무 많이 벗어나지 만, 내장 된 그래픽 라이브러리가 아닌 다른 그래프 라이브러리를 사용하는 것이 좋습니다.
답변 주셔서 감사합니다. 다른 SPSS 설치로 다른 컴퓨터를 시험해 보았는데 코드가 제대로 작동합니다. 그래서 제 컴퓨터에 파이썬 설치가 잘못되었습니다! – destinychoice