##// END OF EJS Templates
rewrite pastefig() qt doc section for display()
MinRK -
Show More
@@ -52,14 +52,25 b' input and the drawing eventloop.'
52 .. image:: figs/besselj.png
52 .. image:: figs/besselj.png
53 :width: 519px
53 :width: 519px
54
54
55 .. pastefig:
55 .. display:
56
56
57 :func:`pastefig`
57 :func:`display`
58 ****************
58 ***************
59
59
60 An additional function, :func:`pastefig`, will be added to the global namespace if you
60 An additional function, :func:`display`, will be added to the global namespace if you
61 specify the ``pylab`` argument. This takes the active figures in matplotlib, and embeds
61 specify the ``pylab`` argument. The IPython display system provides a mechanism for
62 them in your document. This is especially useful for saving_ your work.
62 specifying PNG or SVG (and more) representations of objects for GUI frontends. By default,
63 IPython registers convenient PNG and SVG renderers for matplotlib figures, so you can
64 embed them in your document by calling :func:`display` on one or more of them. This is
65 especially useful for saving_ your work.
66
67 .. sourcecode:: ipython
68
69 In [5]: plot(range(5)) # plots in the matplotlib window
70
71 In [6]: display(gcf()) # embeds the current figure in the qtconsole
72
73 In [7]: display(*getfigs()) # embeds all active figures in the qtconsole
63
74
64 .. _inline:
75 .. _inline:
65
76
@@ -67,9 +78,9 b' them in your document. This is especially useful for saving_ your work.'
67 ******************
78 ******************
68
79
69 If you want to have all of your figures embedded in your session, instead of calling
80 If you want to have all of your figures embedded in your session, instead of calling
70 :func:`pastefig`, you can specify ``--pylab=inline`` when you start the console,
81 :func:`display`, you can specify ``--pylab=inline`` when you start the console,
71 and each time you make a plot, it will show up in your document, as if you had
82 and each time you make a plot, it will show up in your document, as if you had
72 called :func:`pastefig`.
83 called :func:`display(fig)`.
73
84
74
85
75 .. _saving:
86 .. _saving:
@@ -78,7 +89,7 b' Saving and Printing'
78 ===================
89 ===================
79
90
80 IPythonQt has the ability to save your current session, as either HTML or XHTML. If you
91 IPythonQt has the ability to save your current session, as either HTML or XHTML. If you
81 have been using :func:`pastefig` or inline_ pylab, your figures will be PNG
92 have been using :func:`display` or inline_ pylab, your figures will be PNG
82 in HTML, or inlined as SVG in XHTML. PNG images have the option to be either in an
93 in HTML, or inlined as SVG in XHTML. PNG images have the option to be either in an
83 external folder, as in many browsers' "Webpage, Complete" option, or inlined as well, for
94 external folder, as in many browsers' "Webpage, Complete" option, or inlined as well, for
84 a larger, but more portable file.
95 a larger, but more portable file.
General Comments 0
You need to be logged in to leave comments. Login now