Matplotlib: “Unknown projection '3d'” error

前端 未结 5 2019
南笙
南笙 2020-12-07 16:00

I just installed matplotlib and am trying to run one of there example scripts. However I run into the error detailed below. What am I doing wrong?

from mpl_         


        
5条回答
  •  萌比男神i
    2020-12-07 16:41

    Try this:

    import matplotlib.pyplot as plt
    import seaborn as sns
    from mpl_toolkits.mplot3d import axes3d
    
    fig=plt.figure(figsize=(16,12.5))
    ax=fig.add_subplot(2,2,1,projection="3d")
    
    a=ax.scatter(Dataframe['bedrooms'],Dataframe['bathrooms'],Dataframe['floors'])
    plt.plot(a)
    

提交回复
热议问题