Generation

generate functionSat, 18 Feb 2023

There are 2 charts in Python: df.plot(kind='scatter', x='User_Score', y='Global_Sales', plt.ylim(0, 40) df.plot(kind='scatter', x='Critic_Score', y='Global_Sales', plt.ylim(0, 40) Rewrite the code so that the two charts are not separate but are subplots.

fig, ax = plt.subplots() df.plot(kind='scatter', x='User_Score', y='Global_Sales', ax=ax) df.plot(kind='scatter', x='Critic_Score', y='Global_Sales', ax=ax) plt.ylim(0, 40)

Questions about programming?Chat with your personal AI assistant