John Hunter <jdh2...@gmail.com> 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')
fig=figure()
# ...
pdf.savefig(fig)
pdf.annotate(123,456,'my text here',fontsize=12,font='Helvetica')
pdf.close()

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
change.

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
http://www.iki.fi/jks


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to