- Trending Categories
- Data Structure
- Operating System
- MS Excel
- C Programming
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Hide Matplotlib descriptions in Jupyter notebook
To hide matplotlib descriptions of an instance while calling plot() method, we can take the following steps −
Open Ipython instance.
import numpy as np
from matplotlib, import pyplot as plt
Create points for x, i.e., np.linspace(1, 10, 1000)
Now, plot the line using plot() method.
To hide the instance, use plt.plot(x); i.e., (with semi-colon)
Or, use _ = plt.plot(x)
In : import numpy as np In : from matplotlib import pyplot as plt In : x = np.linspace(1, 10, 1000) In : plt.plot(x) Out: [<matplotlib.lines.Line2D at 0x7faa3852fac8>] In : plt.plot(x); In : _ = plt.plot(x) In :
Out: [<matplotlib.lines.Line2D at 0x7faa3852fac8>]
- Related Articles
- Make 3D plot interactive in Jupyter Notebook (Python & Matplotlib)
- How do I omit Matplotlib printed output in Python / Jupyter notebook?
- Using Tkinter in Jupyter Notebook
- How to change the figsize for matshow() in Jupyter notebook using Matplotlib?
- How to start tensorflow Docker jupyter notebook?
- Displaying rotatable 3D plots in IPython or Jupyter Notebook
- Programmatically Stop Interaction for specific Figure in Jupyter notebook
- Create a simple Numpy Jupyter Notebook using Docker
- How to hide in IPython notebook?
- How to display a Dataframe next to a Plot in Jupyter Notebook?
- How to show numpy 2D array as grayscale image in Jupyter Notebook?
- Automatically run %matplotlib inline in IPython Notebook
- Matplotlib animation not working in IPython Notebook?
- How to hide lines in Matplotlib?
- How to hide axes and gridlines in Matplotlib?