In short, I want to write a function that will output a scatter matrix and boxplot at one time in python. I figured I would do this by created a figure with a 2x1 plotting array. However when I run the code using a Jupyter notebook:
def boxplotscatter(data):
f, ax = plt.subplots(2, 1, figsize = (12,6))
ax[0] = scatter_matrix(data, alpha = 0.2, figsize = (6,6), diagonal = 'kde')
ax[1] = data.boxplot()
I get, using data called pdf
:
That isn't exactly what I expected -- I wanted to output the scatter matrix and below it the boxplot, not two empty grids and a boxplot embedded in a scatter matrix.
Thoughts on fixing this code?