I was trying to make Andrew's curves work with this code:
import pandas as pd
from pandas.plotting import andrews_curves
def andrews_curves(df, class_column, normalize = False):
    plt.style.use("ggplot")  
    plt.figure()
    andrews_curves(df, class_column)
    plt.draw()
andrews_curves(players, "RANK")
plt.show()
Where players is my dataframe. And it gave up with a warning:
More than 20 figures have been opened
And then:
RecursionError: maximum recursion depth exceeded while calling a Python object
This only happens with Andrew's Curves, since Parallel Coordinates works fine with almost the same code:
def parallel_coords(df, class_column):
    plt.style.use("ggplot")
    plt.figure()
    parallel_coordinates(df, class_column = class_column, cols = list(df), alpha = 0.4)
    plt.draw()
parallel_coords(players, "RANK")
plt.show()
I've tried to use clear('all'), clf(), and cla() methods, but they all have zero effect.
 
     
    