questions about the PS backend

Hello, currently I am having a closer look at the

    > PostScript backend. Some questions occurred to me:

    > 1) What is the meaning of 'backend_version'? When should
    > it be increased/changed?

Eg, for gtk this would be the version of pygtk, for wx the version of
wxpython. It is mainly used to provide us diagnositic information to
help when users post problems on the mailing list. If they run with
--debug-helpful, we get the version info. It is not the same as the
matplotlib version, which is reported separately. For PS, it seems
that it should be the PS level that is required (PS level I, level
II). But it could also be 'not applicable'. If you can think of
something that makes sense, use it.

    > 2) Is the following code the correct way to get the
    > matplotlib version for use in a backend file:

    > from matplotlib import __version__ version=__version__

Looks right to me; you could also do

from matplotlib import __version__ as version

    > 3) The draw_lines method checks whether the argument
    > arrays are of the same size as required. The other
    > functions do not do any sanity checks on the arguments.
    > Can the renderer methods assume that they are called with
    > semantically correct arguments? Is it ok to fail with an
    > Python exception otherwise?

Yes on both cases, me thinks.

    > 4) Can the PostScript code assume that each file contains
    > only one picture/page? Might this change in the future?

I say yes. I can't imagine changing this, but perhaps someelse who is
more imaginative than I could.

    > 5) Does matplotlib have the concept of a picture title
    > which could be written into the DSC "%%Title" comment? If
    > the answer is yes: how do I get this title?

Well, there is a figure title and an axes title. It would be easy to
add a renderer method called set_title which is called by figure.draw
and axes.draw. The problem here is that although there *is* a figure
title (see matplotlib.matlab.figtitle) the most common way to set
titles is via matplotlib.matlab.title which sets the title of the
current axes. Hence you could have multiple titles. One solution,
that will work in 95% of the cases, is just to use the first call to
set_title in the renderer and ignore subsequent calls. This will get
the figure title if there is one, and the first axes title if there
isn't.

    > Also I have some questions about the template backend in
    > backend_template.py:

    > 6) The template backend contains the line

    > from matplotlib.transforms import Bbox

    > Does this have any function or should it be removed?

It can be removed.

    > 7) The template backend uses

    > verbose.report('Error: %s'%msg)

    > Should this be 'verbose.report_error' instead?

Yes.

    > Sorry about having so many questions, Jochen --

Thanks!

JDH