From: Michael D. <md...@st...> - 2013-08-12 14:08:41
|
I'm considering changing the behavior of the rcParam |interactive| (which also can be set through |matplotlib.interactive()| and |pyplot.ion()| and |pyplot.ioff()|). Currently, when setting |interactive| to |True|, running any sort of matplotlib plot as a script will fail to display a window. This can be very surprising if a user turns on |interactive| because they prefer its behavior in IPython, but are then surprised that none of their scripts continue to work. I propose to fix this by turning on |interactive| only when running at an interactive console. See the pull request http://github.com/matplotlib/matplotlib/pull/2286 for an implementation. I'm trying to rule out any negative impact of this change, and I would appreciate any feedback if this change will have a negative impact on your application. Mike |
From: Chris B. - N. F. <chr...@no...> - 2013-08-12 17:56:07
|
On Mon, Aug 12, 2013 at 7:01 AM, Michael Droettboom <md...@st...> wrote: > I propose to fix this by turning on interactive only when > running at an interactive console. I embed MPL more than other uses, and this sounds like a fine solution to me/ Thanks, -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |
From: Michael D. <md...@st...> - 2013-08-12 18:17:41
|
Would you mind testing the very simple patch in the PR [1] and confirm that it has no negative consequences for you? [1] http://github.com/matplotlib/matplotlib/pull/2286 Mike On 08/12/2013 01:55 PM, Chris Barker - NOAA Federal wrote: > On Mon, Aug 12, 2013 at 7:01 AM, Michael Droettboom <md...@st...> wrote: >> I propose to fix this by turning on interactive only when >> running at an interactive console. > I embed MPL more than other uses, and this sounds like a fine solution to me/ > > Thanks, > > -Chris > > |
From: Chris B. - N. F. <chr...@no...> - 2013-08-12 23:54:51
|
On Mon, Aug 12, 2013 at 11:16 AM, Michael Droettboom <md...@st...> wrote: > Would you mind testing the very simple patch in the PR [1] and confirm > that it has no negative consequences for you? > > [1] http://github.com/matplotlib/matplotlib/pull/2286 Hmm -- I'm not set up to build it right now -- but I'll see what I can do. -Chris > Mike > > On 08/12/2013 01:55 PM, Chris Barker - NOAA Federal wrote: >> On Mon, Aug 12, 2013 at 7:01 AM, Michael Droettboom <md...@st...> wrote: >>> I propose to fix this by turning on interactive only when >>> running at an interactive console. >> I embed MPL more than other uses, and this sounds like a fine solution to me/ >> >> Thanks, >> >> -Chris >> >> > > > ------------------------------------------------------------------------------ > Get 100% visibility into Java/.NET code with AppDynamics Lite! > It's a free troubleshooting tool designed for production. > Get down to code-level detail for bottlenecks, with <2% overhead. > Download for free and get started troubleshooting in minutes. > http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-devel mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |
From: Erik B. <eri...@gm...> - 2013-08-14 22:14:25
|
On Mon, Aug 12, 2013 at 10:01 AM, Michael Droettboom <md...@st...> wrote: > I'm considering changing the behavior of the rcParam interactive (which also > can be set through matplotlib.interactive() and pyplot.ion() and > pyplot.ioff()). Currently, when setting interactive to True, running any > sort of matplotlib plot as a script will fail to display a window. This can > be very surprising if a user turns on interactive because they prefer its > behavior in IPython, but are then surprised that none of their scripts > continue to work. I propose to fix this by turning on interactive only when > running at an interactive console. > > See the pull request http://github.com/matplotlib/matplotlib/pull/2286 for > an implementation. > > I'm trying to rule out any negative impact of this change, and I would > appreciate any feedback if this change will have a negative impact on your > application. > > Mike It appears bpython does not set sys.ps1. I wonder if this shouldn't be considered a bug/oversight in bpython though. If nothing else it might be worth pointing out to its developers. I also wonder how this would impact IDEs (though I don't use any personally). Erik |
From: Erik B. <eri...@gm...> - 2013-08-14 22:18:11
|
On Wed, Aug 14, 2013 at 6:14 PM, Erik Bray <eri...@gm...> wrote: > On Mon, Aug 12, 2013 at 10:01 AM, Michael Droettboom <md...@st...> wrote: >> I'm considering changing the behavior of the rcParam interactive (which also >> can be set through matplotlib.interactive() and pyplot.ion() and >> pyplot.ioff()). Currently, when setting interactive to True, running any >> sort of matplotlib plot as a script will fail to display a window. This can >> be very surprising if a user turns on interactive because they prefer its >> behavior in IPython, but are then surprised that none of their scripts >> continue to work. I propose to fix this by turning on interactive only when >> running at an interactive console. >> >> See the pull request http://github.com/matplotlib/matplotlib/pull/2286 for >> an implementation. >> >> I'm trying to rule out any negative impact of this change, and I would >> appreciate any feedback if this change will have a negative impact on your >> application. >> >> Mike > > It appears bpython does not set sys.ps1. I wonder if this shouldn't > be considered a bug/oversight in bpython though. If nothing else it > might be worth pointing out to its developers. I also wonder how this > would impact IDEs (though I don't use any personally). > Apparently IDLE doesn't set sys.ps1 either: http://bugs.python.org/issue13657 I know at least a few people who use IDLE.... ;) I feel like there has to be a better way to determine if an interactive prompt is in use, though I'll admit nothing jumps immediately to mind :/ Erik |
From: Eric F. <ef...@ha...> - 2013-08-14 22:22:26
|
On 2013/08/14 12:18 PM, Erik Bray wrote: > Apparently IDLE doesn't set sys.ps1 either: Maybe this is a good thing; interactive mode doesn't work in IDLE. |