From: John H. <jdh...@ac...> - 2004-03-09 17:41:19
|
>>>>> "Kuzminski," == Kuzminski, Stefan R <SKu...@fa...> writes: Stephan> The GD output looks good when printed, maybe I will Stephan> switch between the 2 ( Agg for display, GD for Stephan> printing ). The Agg un-aliased lines don't come out Stephan> quite as well, they seem to render more of the pixels Stephan> for each point on the line. Nice to have the Stephan> different backend options. This has to do with how agg handles subpixel positioning - I've emailed the agg list and gotten some advice but haven't come up with a good system to make the lines appear the same thickness in the aliased and antialiased cases. I'm still working on it. In the meantime, here is a little backend magic that will make it easier for you to print to your backend of choice. This example displays the image in the default GUI (GTKAgg for me) and prints with GD. from matplotlib.backends.backend_gd import FigureCanvasGD from matplotlib.matlab import * plot([1,2,3]) manager = get_current_fig_manager() canvasgd = manager.canvas.switch_backends(FigureCanvasGD) canvasgd.print_figure('gdfig') show() print_figure takes the same args as savefig. gd has a pesky color allocation bug that I haven't figured out that you may bump into. JDH |