Ticket #39 (new defect)

Opened 3 years ago

Last modified 2 years ago

Make a <figure> subelement for log cells

Reported by: rkern Assigned to: rkern
Priority: lowest Milestone:
Component: nbdoc Version:
Severity: normal Keywords: version-bump
Cc:

Description

There are two kinds of figures that we need to support. One is just added by the user and refers to a preexisting file. Another is one that is grabbed from the currently executing Python code (e.g. grab_figure()). The latter should be an element under the appropriate cell.

<ipython-log>
  <cell number="1">
    <input>plot(range(10))</input>
    <figure source="matplotlib.grab_png" filename="figure_1.png">
      <number>2</number>
      <caption>This is a nifty plot</caption>
      <dpi>72</dpi>
    </figure>
  </cell>
</ipython-log>

The source attribute is an identifier for which the shell will search in a registry of such backends.

The filename attribute is the filename of the cached output.

The subelements correspond to keyword arguments of the function identified by source. Such a function should expect to receive arguments in the form of strings.

Change History

09/28/05 03:46:43 changed by rkern

  • keywords set to version-bump.

02/14/07 00:59:29 changed by fperez

  • priority changed from normal to lowest.