Hi, On 09.03.06, Thomas Pohl wrote: > Andre sent me this solution: > You can provide a paper format in writeEPSfile. PyX will then center > the output on that page while the file remains useable EPS. When the > page size is large enough, the whole bounding box will be positive. > > I hope this still works with the current PyX version.
Sure it does. And it'll continue work like that, because we really want it that way. Just a quick explanation: When you don't set a papersize, the coordinate system is not altered at all. Note that you can set the position of a graph (xpos and ypos in the constructor with the default being set to zero). There is *no* geneeral problem with negative bounding boxes (as far as I can tell -- except for buggy software). There is even an example with a bbox -100 -100 100 100 in the EPS spec from Adobe (#5002). AFAIK Illustrator can also create eps files with negative bbox-values. When you set a papersize, you're creating an eps file with your output being centered on the page. So PyX inserts a proper transformation for the whole output and properly adjusts the bbox. That way you can nicely print the eps file on a postscript printer directly and still embed the file into other files. Incidentally the bbox will then be positive (as long as your figure is small enough to fit the paper size; BTW there's also a rescaling and rotation possible to properly fit the whole papersize). Thus the feature might be used to prevent problems with negative bboxes. And I also like it very much to be able to just send an eps file to the printer. So I'm using the papersize most of the time. But it's *optional*. Best, André -- by _ _ _ Dr. André Wobst / \ \ / ) [EMAIL PROTECTED], http://www.wobsta.de/ / _ \ \/\/ / PyX - High quality PostScript and PDF figures (_/ \_)_/\_/ with Python & TeX: visit http://pyx.sourceforge.net/ ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ PyX-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pyx-user
