Q. Write a program to add titles for the X-axis, Y-axis and for the whole chart in above codes.


Answer :-

 

import matplotlib.pyplot as plt
import numpy as np

A = np.arange(2, 20, 2)
B = np.log(A)
plt.plot(A, B)
plt.xlabel("Number")
plt.ylabel("Log of Number")
plt. show()

 

Output :- 


3 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

  1. Where is the answer of question no. 1 it's not given, you have skipped it . Please can you post answer of question no 1

    ReplyDelete

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post