Warning
This documentation is for an old version of IPython. You can find docs for newer versions here.
Top-level display functions for displaying object in different formats.
Authors:
Bases: object
An object that wraps data to be displayed.
Create a display object given raw data.
When this object is returned by an expression or passed to the display function, it will result in the data being displayed in the frontend. The MIME type of the data should match the subclasses used, so the Png subclass should be used for ‘image/png’ data. If the data is a URL, the data will first be downloaded and then displayed. If
Parameters: | data : unicode, str or bytes
url : unicode
filename : unicode
|
---|
Reload the raw data from file or URL.
Bases: IPython.core.display.DisplayObject
Create a Javascript display object given raw data.
When this object is returned by an expression or passed to the display function, it will result in the data being displayed in the frontend. If the data is a URL, the data will first be downloaded and then displayed.
In the Notebook, the containing element will be available as element, and jQuery will be available. The output area starts hidden, so if the js appends content to element that should be visible, then it must call container.show() to unhide the area.
Parameters: | data : unicode, str or bytes
url : unicode
filename : unicode
lib : list or str
css: : list or str
|
---|
Bases: IPython.core.display.DisplayObject
Create a display an PNG/JPEG image given raw data.
When this object is returned by an expression or passed to the display function, it will result in the image being displayed in the frontend.
Parameters: | data : unicode, str or bytes
url : unicode
filename : unicode
format : unicode
embed : bool
width : int
height : int
retina : bool
|
---|
Examples
# embedded image data, works in qtconsole and notebook # when passed positionally, the first arg can be any of raw image data, # a URL, or a filename from which to load image data. # The result is always embedding image data for inline images. Image(‘http://www.google.fr/images/srpr/logo3w.png‘) Image(‘/path/to/image.jpg’) Image(b’RAW_PNG_DATA...’)
# Specifying Image(url=...) does not embed the image data, # it only generates <img> tag with a link to the source. # This will not work in the qtconsole or offline. Image(url=’http://www.google.fr/images/srpr/logo3w.png‘)
Reload the raw data from file or URL.
Display a Python object in all frontends.
By default all representations will be computed and sent to the frontends. Frontends can decide which representation is used and how.
Parameters: | objs : tuple of objects
raw : bool, optional
include : list or tuple, optional
exclude : list or tuple, optional
metadata : dict, optional
|
---|
Display the pretty (default) representation of an object.
Parameters: | objs : tuple of objects
raw : bool
metadata : dict (optional)
|
---|
Display the HTML representation of an object.
Parameters: | objs : tuple of objects
raw : bool
metadata : dict (optional)
|
---|
Display the SVG representation of an object.
Parameters: | objs : tuple of objects
raw : bool
metadata : dict (optional)
|
---|
Display the PNG representation of an object.
Parameters: | objs : tuple of objects
raw : bool
metadata : dict (optional)
|
---|
Display the JPEG representation of an object.
Parameters: | objs : tuple of objects
raw : bool
metadata : dict (optional)
|
---|
Display the LaTeX representation of an object.
Parameters: | objs : tuple of objects
raw : bool
metadata : dict (optional)
|
---|
Display the JSON representation of an object.
Note that not many frontends support displaying JSON.
Parameters: | objs : tuple of objects
raw : bool
metadata : dict (optional)
|
---|
Display the Javascript representation of an object.
Parameters: | objs : tuple of objects
raw : bool
metadata : dict (optional)
|
---|
Clear the output of the current cell receiving output.
Optionally, each of stdout/stderr or other non-stream data (e.g. anything produced by display()) can be excluded from the clear event.
By default, everything is cleared.
Parameters: | stdout : bool [default: True]
stderr : bool [default: True]
other : bool [default: True]
|
---|