English

Observe the following figure. Identify the coding for obtaining this as output.

Advertisements
Advertisements

Question

Observe the following figure. Identify the coding for obtaining this as output.

Options

  • import matplotlib.pyplot as plt
    plt.plot([82, 25, 87, 14], [ 'A', 'B', 'C', 'D'])
    plt.show()

  • import matplotlib.pyplot as plt
    plt.plot ([82, 25 , 87, 14, 90], ['A', 'B', 'C','D', 'E'])
    plt.show()

  • import matplotlib.pyplot as plt
    plt.plot(['A', 'B', 'C', 'D', 'E'], [82, 25, 87, 14, 90])
    plt.show()

  • import matplotlib.pyplot as plt
    plt.plot([A:E], [82, 25, 87, 14, 90))
    plt. show()

MCQ
Advertisements

Solution

import matplotlib.pyplot as plt
plt.plot(['A', 'B', 'C', 'D', 'E'], [82, 25, 87, 14, 90])
plt.show()

shaalaa.com
Plotting Using Matplotlib
  Is there an error in this question or solution?
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×