Complete the code to import the matplotlib pyplot module correctly.
import matplotlib.[1] as plt
The correct module to import for plotting in matplotlib is pyplot.
Complete the code to create a new figure with a large size to manage memory better.
fig = plt.figure(figsize=[1])A figure size of (12, 8) inches is a good balance for large figures without excessive memory use.
Fix the error in the code to properly close a figure and free memory.
plt.[1](fig)The plt.close() function properly closes the figure and frees memory.
Fill both blanks to create a plot and then clear the current figure to save memory.
plt.plot(x, y) plt.[1]() plt.[2]()
First, plt.show() displays the plot. Then, plt.clf() clears the current figure to free memory.
Fill all three blanks to create a large figure, plot data, and then close the figure to manage memory.
fig = plt.figure(figsize=[1]) plt.plot(x, y) plt.[2]() plt.[3](fig)
We create a figure with size (15, 10), then close it with plt.close(fig) after showing the plot with plt.show() to save memory.