How to hit the document of Magic Function (Line Magic)

Conclusion

--The beginning of the line % is a magic function (function of ʻipython) --How to find out is % magic in the interactive mode of ʻipython --If you look up % matplotlib,% matplotlib?

Sloppy, flow

I'm probably studying at jupyter, but it's salty.

jupyter


In1: %matplotlib inline
In2: import matplotlib.pyplot as plt

What is the % at the beginning of the line?

I don't know what it means. For the time being, practice RYFM.

python


$ pydoc matplotlib
(Omitted)
    or using ipython::
    
        ipython
    
    at your terminal, followed by::
    
        In [1]: %matplotlib
        In [2]: import matplotlib.pyplot as plt
    
    at the ipython shell prompt.
(Omitted)

Even if you get %, you might think that it is a function of the main body of Python.

The result of google. ↓

%quickref

At the command line, do ʻipython and% quickref`.

python


$ ipython
In [1]: %quickref
(Omitted)
%magic           : Information about IPython's 'magic' % functions.
(Omitted)

Then the explanation of magic is% magic.

%magic

python


In [2]: %magic
IPython's 'magic' functions
===========================

The magic function system provides a series of functions which allow you to
control the behavior of IPython itself, plus a lot of system-type
features. There are two kinds of magics, line-oriented and cell-oriented.
(Omitted)

So, if you search for matplotlib, the explanation will come out.

Apart from that

For a list of the available magic functions, use %lsmagic. For a description of any of them, type %magic_name?, e.g. '%cd?'.

That's right

%matplotlib?

python


$ ipython
In [1]: %matplotlib?

To do.

Recommended Posts

How to hit the document of Magic Function (Line Magic)
How to run the Export function of GCP Datastore automatically
How to check the version of Django
How to put a line number at the beginning of a CSV file
How to create a wrapper that preserves the signature of the function to wrap
How to calculate the volatility of a brand
How to find the area of the Voronoi diagram
How to measure line speed from the terminal
[Circuit x Python] How to find the transfer function of a circuit using Lcapy
A memorandum of how to execute the! Sudo magic command in Jupyter Notebook
How to create an article from the command line
How to know the port number of the xinetd service
How to get the number of digits in Python
[Introduction to Python] How to iterate with the range function?
How to visualize the decision tree model of scikit-learn
[Python] Summary of how to specify the color of the figure
How to access the global variable of the imported module
(Remember quickly) How to use the LINUX command line
[Selenium] How to specify the relative path of chromedriver?
The world's most easy-to-understand explanation of how to make a LINE BOT (1) [Account preparation]
How to use the generator
How to call a function
How to use the decorator
How to increase the axis
How to start the program
How to increase the processing speed of vertex position acquisition
[Ubuntu] How to delete the entire contents of a directory
How to find the optimal number of clusters in k-means
Try to get the function list of Python> os package
How to test the attributes added by add_request_method of pyramid
I made a function to check the model of DCGAN
How to calculate the amount of calculation learned from ABC134-D
(Note) How to pass the path of your own module
How to increase the number of machine learning dataset images
How to hit NAPALM from the Web (NetDevOpsSec reality solution)
How to see the contents of the Jupyter notebook ipynb file
How to find the scaling factor of a biorthogonal wavelet
I tried to fight the Local Minimum of Goldstein-Price Function
[Introduction to Python] How to get data with the listdir function
How to connect the contents of a list into a string
[Linux] [C / C ++] How to get the return address value of a function and the function name of the caller
[Deep learning] Investigating how to use each function of the convolutional neural network [DW day 3]
The world's most easy-to-understand explanation of how to make LINE BOT (3) [Linkage with server with Git]
How to make an interactive LINE BOT 004 (answer the closing date of a listed company)
How to calculate the autocorrelation coefficient
I want to get the name of the function / method being executed
How to determine the existence of a selenium element in Python
How to change the log level of Azure SDK for Python
How to use the optparse module
How to implement Java code in the background of RedHat (LinuxONE)
I tried to get the index of the list using the enumerate function
How to know the internal structure of an object in Python
Summary of how to use pandas.DataFrame.loc
How to change the color of just the button pressed in Tkinter
How to get the ID of Type2Tag NXP NTAG213 with nfcpy
[EC2] How to install chrome and the contents of each command
How to check the memory size of a variable in Python
Make the theme of Pythonista 3 like Monokai (how to make your own theme)
[Python] How to get the first and last days of the month
How to read the SNLI dataset
How to get the Python version