The Extension Output node for Python Spark now includes a Graph Output tab
like R does. This tab displays any graphs or charts that are generated when the R script or Python
for Spark script on the Syntax tab of the Extension Output node is executed.
For example, if your R script contains a call to the R plot function, the resulting
graph is displayed on this tab. You can now use a script such as the following to generate
graphs:
import spss.pyspark.runtime
import numpy
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
ascontext = spss.pyspark.runtime.getContext()
indf = ascontext.getSparkInputData()
sns.pairplot(indf.toPandas(), hue='K')
sns.pairplot(indf.toPandas(), hue='Age')
plt.show()