Importing libraries and using matplotlib for visualization

Course Name: Getting Market Data: Stocks, Crypto, News & Fundamental, Section No: 2, Unit No: 4, Unit type: Notebook

 

"%matplotlib inline" what does this line exactly do ?

 

Hi Pushkar,



A quick answer:

The code line %matplotlib inline sets the backend of matplotlib to inline.

The benefit of using the inline backend is that all of your plots will be displayed directly below the code cell that produced them. And further, they will also be stored inside the notebook file.



But I encourage you to read a bit more about the functionality by visiting the following thread:

You can also check some examples for the same, as shown here.

And hopefully, this will clarify your doubt and give you a better understanding of the use of `%matplotlib inline`. Feel free to reach out if you have any more questions.

Thank You Kevin