From: Steve C. <ste...@ya...> - 2004-04-01 04:46:58
|
> Now on to your problem. > > In backend_gtk draw_rectangle, change > > x, y = int(x), self.height-int(math.ceil(y+height)) > > to > x, y = int(x), self.height-int(y+height) > > and the GraphicsContext.set_clip_rectangle method to > > def set_clip_rectangle(self, rectangle): > GraphicsContextBase.set_clip_rectangle(self, rectangle) > l,b,w,h = rectangle > rectangle = (int(l), self.renderer.height-int(b+h)+1, > int(w), int(h)) > self.gdkGC.set_clip_rectangle(rectangle) I tried this but it made things worse. With simple_plot.py the plot now extends above the top axis line. Steve |
From: Steve C. <ste...@ya...> - 2004-04-01 05:44:55
|
> Hi Steve, thanks for letting me know. There is an off-by-one error > and it looks like and easy fix. For future reference, you may want to > consider using GTKAgg as your default GUI. This has the GTK widget > but uses agg for rendering. Agg supports subpixel rendering and so > isn't susceptible to one pixel errors that crop up in GTK in a number > of contexts. At low resolutions, these become particularly > noticeable. Other benefits over the GTK backend are alpha blending, > anti-aliased drawing, and faster image support - > http://matplotlib.sourceforge.net/backends.html#GTKAgg I had a look at http://www.antigrain.com/ and downloaded agg-2002-05-21.zip. There's no install document, configure.ac file or Makefile that would allow me to compile the software. It does not look like this is portable software that will compile on Linux. Regards, Steve |
From: Steve C. <ste...@ya...> - 2004-04-01 06:06:27
|
To answer my own question. Yes, AGG is tested on Windows, Linux, Sun, SGI, and Apple (MacOS X, X11) The website is a little out of date. Here's some info the author sent me: ============================================================= AGG has been considerably modified last time and its development is still in process, but major design issues are stabilized now. The good news is that there many new things were implemented, such as: - Gradients and Gouraud Shading - Image affine transformations - Strokes with different types of line joins and line caps - Dashed line generator - Markers, such as arrowheads/arrowtails - Fast vectorial polygon clipping to a rectangle - Low-level clipping to multiple rectangular regions - Alpha-Masking - New fast anti-aliased line algorithm - Using arbitrary images as line patterns - Rendering in separate color channels - Perspective and bilinear transformations of vector and image data - General polygon clipping (and, or, xor, sub) based on Alan Murta's GPC The library is platform independent and it's considerably redesigned. You can find many examples, including image transformation ones in agg2/examples. The examples are platform independent too and you can find the building environments in the respective directories. If you use Win32 platform with VC++ 6 or later just open the projects, the library doesn't need any preliminary building. If you use Unix/Linux with X11 and gcc, first execute make in the agg2 directory and then make in examples/X11/. There is also a simple SVG viewer, it's in agg2/svg. You will need Expat XML parser. The latest snapshot of AGG is always here: http://www.antigrain.com/agg2.zip (MS-DOS end-of-line style) http://www.antigrain.com/agg2.tar.gz (Unix end-of-line style) or in the CVS repository at SourceForge: http://sourceforge.net/cvs/?group_id=42020 Also there's a lite, minimalistic version: http://www.antigrain.com/lite/agg2_lite.zip There is a mailing list: http://lists.sourceforge.net/lists/listinfo/vector-agg-general where I publish news from time to time and where some very nice people are discussing AGG issues. They are giving me a lot of recommendations and new ideas. I'd recommend you to subscribe and take part in it. Look at the mailing archives for details: http://sourceforge.net/mailarchive/forum.php?forum=vector-agg-general ==================================================== |
From: John H. <jdh...@ac...> - 2004-04-01 12:45:15
|
>>>>> "Steve" == Steve Chaplin <ste...@ya...> writes: Steve> To answer my own question. Yes, AGG is tested on Windows, Steve> Linux, Sun, SGI, and Apple (MacOS X, X11) Hi Steve, Agg is already built into the matplotlib windows installer. No need to build it yourself. If for some reason, however, you want or need to build it yourself, download http://matplotlib.sourceforge.net/win32_static.tar.gz, untar it in your matplotlib src dir, and follow the instructions in the README in the win32_static dir and in setupext.py. As for linux, OS X, and unix, the matplotlib src distribution comes with agg. No need to download it separately. Ditto for CVS checkouts (this is a recent change). As for building matplotlib + agg into a py2exe installer, yes this is possible. See Matt Fischler's post on this list "How to freeze your matplotlib apps using py2exe" http://sourceforge.net/mailarchive/message.php?msg_id=7467225 Hope this helps, JDH |