Ist es möglich, eine andere Grafikbibliothek in SPSS zu verwenden, die eingebaut ist? Ich habe gerade die Python-Erweiterungen entdeckt, die SPSS großartig machen.Matplotlib-Graphen in SPSS
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()
Dadurch wird eine einfache Streudiagramm erstellen und es funktioniert in jedem IDE in Ordnung, aber wenn Sie diesen Code in SPSS BEGIN PROGRAM
zu verwenden versuchen END PROGRAM
ich die folgende Fehlermeldung erhalten:
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
Ich frage Vielleicht zu viel von der Python-Erweiterung in SPSS, aber es wäre schön, eine andere Grafikbibliothek zu verwenden als die, in der sie erstellt wurde.
Danke für die Antwort und gut detaillierte Antwort. Ich habe versucht, einen anderen Computer mit einer anderen SPSS-Installation und nun, der Code funktioniert dort. Es stimmt also etwas nicht mit meiner Python-Installation auf meinem anderen Computer! – destinychoice