John Hunter wrote: > On Wed, Oct 8, 2008 at 8:40 PM, Eric Firing <[EMAIL PROTECTED]> wrote: > >> Thanks for doing this--it has already helped me in my testing of the >> gappy-path simplification support, which I have now committed. As you >> suggested earlier, I included in path.py a check for a compatible codes >> array. >> >> The agg limit still can be a problem. It looks like chunking could be added >> easily by making the backend_agg draw_path a python method calling the >> renderer method; if the path length exceeds some threshold, then subpaths >> would be generated and passed to the renderer method. >> > > In unrelated news, I am not in favor of the recent change to warn on > non-GUI backends when "show" is called. I realize this may sometimes > cause head-scratching behavior for some users who call show and no > figure pops up, but I think this must be pretty rare. 99% of users > have a matplotlibrc which defines a GUI default. AFAIK, the only > exceptions to this are 1) when the user has changed the rc (power > user, needs no protection) or 2) no GUI was available at build time > and the image backend was the default backend chosen (warning more > appropriate at build time). If I am missing a use case, let me know. > The motivation was when a popular Linux distribution misconfigured the default to the Agg backend:
https://bugs.launchpad.net/ubuntu/+source/matplotlib/+bug/278764 This warning was meant as future insurance against this happening -- and hoping that if the packagers don't make a GUI backend the default (in an attempt to reduce dependencies), that they at least would include the warning patch so that users aren't left feeling that matplotlib is "broken". But we can't prevent all downstream packaging errors, so maybe this patch doesn't belong in trunk. ;) > I like the design where the same script can be used to either generate > a UI figure or hardcopy depending on an rc settng or a command flag > (eg backend driver) and would rather not do the warning. This has > been a very infrequent problem for users over the years (a few times > at most?) so I am not sure that the annoyance of the warning is > justified. > Perhaps the warning could only be emitted when running inside an interactive console (ipython or standard python) -- if that's possible. Alternatively, "ipython -pylab" could warn on startup if the backend is non-GUI (and that change would probably live in ipython). > If 2) in the choices above is the case you are concerned about, and > you want this warning feature in this case, we can add an rc param > which is autoset at build time, something like "show.warn = > True|False" since the build script is setting the default image > backend and can set "show.warn = True" when it sets an image backend > by default, otherwise False. > I intended the warning to warn against misconfiguration, so one shouldn't have to explicitly configure anything to get it... ;) Mike ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel