From: Axel F. <fre...@us...> - 2008-05-16 08:12:28
|
Hi all, may be one possibility would be to write a subroutine which separates text and images, and then convert the image-part using pipeGS, and add the text-part on top of it? I'm thinking of a code like text_items=[] graph_items=[] for item in canvas.items: if item.__class__.__name__ == "textbox": text_items.append(item) else: if item.__class__.__name__ == "graphxy": item.dolayout() # loop over all sub-elements of this graphxy and remove all texts ... else: graph_items.append(item) graph_canvas = canvas.canvas() graph_canvas.items = graph_items text_canvas = canvas.canvas() text_canvas = text_items graph_canvas.insert(text_canvas) Well, there mightl be some problems to code, as you have to loop recursively over all elements (if you include a canvas into another canvas), and you have to think about the internals of e.g. graphxy (I don't know how to remove there all text - may be changing recursively all texter's of the objects? And how to calculate this text and add it to the other list?), or what to do with transformations,... What do you think about it? May be it could be nice to have such a subroutine integrated in regular PyX - especially for 3D-Plots, or am I missing something? Axel On Fri, May 16, 2008 at 8:50 AM, Benedikt Koenig <li...@be...> wrote: > Hi André, > > like Jörg already pointed out I am indeed looking for a way to convert > only the 3d surface to bitmap and keep the scalable fonts and axes. I > think such a mix of bitmap and vector parts should be possible in PDF. > As I mentioned, I am aware of the pipeGS method but it's not exactly > what I mean. > > Thanks anyway, > benedikt > > Am Donnerstag, den 15.05.2008, 10:00 +0200 schrieb André Wobst: > > Hi Benedikt, > > > > I've used bitmap converted figures before as well. In recent PyX > > versions you can quite easily create such bitmaps by the pipeGS method > > of a canvas. Note that jpg and png files created this way can be used > > in pdfLaTeX directly. > > > > HTH, > > > > > > André > > > > > > Am 08.05.2008 um 10:35 schrieb Benedikt Koenig: > > > > > Hi All, > > > > > > I have a problem concerning the file size of my plots. Producing 3d > > > graphs of my data leads to single PDF files of several MB size. > > > Including these graphs in my paper gives a nice to print document, but > > > it is way to big for easy electronic distribution as PDF. So I was > > > thinking if there is a way to produce these high quality vector > > > graphics > > > for the print version of the paper but to somehow get some smaller > > > sized > > > graph files for the electronic version. > > > > > > Currently I am limiting the size by plotting only every x-th point. > > > But > > > obviously this is a stupid solution if you are lucky enough to have > > > high > > > resolution data in the first place. Alternatively I could use pipeGS > > > to > > > produce bitmaps of the complete graph, but I'd rather keep the axes > > > and > > > text as vectors and only have the actual data as bitmap. > > > > > > My idea is basically to produce the highly resolved 3d graph, then > > > convert the plotted data into a bitmap while keeping axes and text in > > > vector format and then write the whole stuff to a PDF. This should > > > keep > > > file sizes moderate even if the bitmap has printing quality of around > > > 300 dpi. > > > > > > Are there any opinions on whether some thing like this is possible at > > > all using PyX and if yes, how to do it? Or is there any other way to > > > keep file size small for complexe plots? > > > > > > Thanks already, > > > bene > > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > > > Don't miss this year's exciting event. There's still time to save > > > $100. > > > Use priority code J8TL2D2. > > > > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > > > _______________________________________________ > > > PyX-user mailing list > > > PyX...@li... > > > https://lists.sourceforge.net/lists/listinfo/pyx-user > > > > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > PyX-user mailing list > PyX...@li... > https://lists.sourceforge.net/lists/listinfo/pyx-user > |