John Hunter <jdh2358@...149...> writes:
One of my colleagues want to use PdfPages to create several mpl
figures in one pdf document. It would be nice to be able to write
some text in there directly.
So the user interface might look something like this:
pdf = PdfPages('filename.pdf')
pdf.annotate(123,456,'my text here',fontsize=12,font='Helvetica')
Should the coordinates be raw PDF points measured from the bottom left
corner, or passed through the figure transformation (or something else)?
What sort of font properties would you expect to be allowed?
One could use the matplotlib.text.Text
and add it to your figure, and maybe this is the way to go,
I think that's what the pdf backend would end up doing internally, at
least if anything like coordinate transformations or any interesting
font properties need to be supported. It sounds like a fairly easy
While we're discussing multi-page pdf files, would it be useful to have
pyplot-level support for them? It shouldn't be too hard to have pyplot
track your currently open pdf file and make, say, savefig with no
arguments direct the output to that. I personally don't have a use for
that, but do you think it would be a useful part of pyplot?
Jouni K. Sepp�nen