Python Quiz on Matplotlib
There are 20 questions based on Matplotlib Library in Python.
Sign in to Google to save your progress. Learn more
Q1.  What does the following code display?
import matplotlib.pyplot as plt
plt.plot([1, 2, 3, 4])
plt.show()
*
4 points
 Q2. What is the default x-axis in the code ?  
import matplotlib.pyplot as plt
plt.plot([1, 2, 3, 4])
plt.show()
*
4 points
Q3.  What does this code do?
plt.title("My Graph")
*
4 points
Q4   Which command sets the x-axis label?
*
4 points
Q5. What will this code display?
plt.plot([1,2,3],[4,5,6],'ro')
plt.show()
*
4 points
Q6. What does 'r--' mean in plt.plot(x, y, 'r--')?   *
4 points
Q7. What function adds a legend to a plot? *
4 points
Q8.  What does this code do?
plt.subplot(2,1,1)
*
4 points
Q9. What will this code produce? *
4 points
Q10.  What is the purpose of plt.grid(True)?   *
4 points
 Q11. Which function displays the plot on screen?   *
4 points
Q12. What will this code do?
plt.scatter([1,2,3],[4,5,6])
*
4 points
Q13. How can you save a figure to a file? *
4 points
Q14. Which function clears the current figure? *
4 points
Q15. Which function closes the figure window? *
4 points
 Q16. What does this code produce?
plt.hist([1,1,2,3,3,3,4])
plt.show()
  
*
4 points
Q17. What does this code do?
plt.figure(figsize=(6,4))
*
4 points
Q18. Which command changes line width? *
4 points
Q19. What does plt.axis('equal') do?   *
4 points
Q20.  What happens if you run plt.plot() without arguments?   *
4 points
Submit
Clear form
This content is neither created nor endorsed by Google.