You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(33) |
Dec
(20) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(7) |
Feb
(44) |
Mar
(51) |
Apr
(43) |
May
(43) |
Jun
(36) |
Jul
(61) |
Aug
(44) |
Sep
(25) |
Oct
(82) |
Nov
(97) |
Dec
(47) |
2005 |
Jan
(77) |
Feb
(143) |
Mar
(42) |
Apr
(31) |
May
(93) |
Jun
(93) |
Jul
(35) |
Aug
(78) |
Sep
(56) |
Oct
(44) |
Nov
(72) |
Dec
(75) |
2006 |
Jan
(116) |
Feb
(99) |
Mar
(181) |
Apr
(171) |
May
(112) |
Jun
(86) |
Jul
(91) |
Aug
(111) |
Sep
(77) |
Oct
(72) |
Nov
(57) |
Dec
(51) |
2007 |
Jan
(64) |
Feb
(116) |
Mar
(70) |
Apr
(74) |
May
(53) |
Jun
(40) |
Jul
(519) |
Aug
(151) |
Sep
(132) |
Oct
(74) |
Nov
(282) |
Dec
(190) |
2008 |
Jan
(141) |
Feb
(67) |
Mar
(69) |
Apr
(96) |
May
(227) |
Jun
(404) |
Jul
(399) |
Aug
(96) |
Sep
(120) |
Oct
(205) |
Nov
(126) |
Dec
(261) |
2009 |
Jan
(136) |
Feb
(136) |
Mar
(119) |
Apr
(124) |
May
(155) |
Jun
(98) |
Jul
(136) |
Aug
(292) |
Sep
(174) |
Oct
(126) |
Nov
(126) |
Dec
(79) |
2010 |
Jan
(109) |
Feb
(83) |
Mar
(139) |
Apr
(91) |
May
(79) |
Jun
(164) |
Jul
(184) |
Aug
(146) |
Sep
(163) |
Oct
(128) |
Nov
(70) |
Dec
(73) |
2011 |
Jan
(235) |
Feb
(165) |
Mar
(147) |
Apr
(86) |
May
(74) |
Jun
(118) |
Jul
(65) |
Aug
(75) |
Sep
(162) |
Oct
(94) |
Nov
(48) |
Dec
(44) |
2012 |
Jan
(49) |
Feb
(40) |
Mar
(88) |
Apr
(35) |
May
(52) |
Jun
(69) |
Jul
(90) |
Aug
(123) |
Sep
(112) |
Oct
(120) |
Nov
(105) |
Dec
(116) |
2013 |
Jan
(76) |
Feb
(26) |
Mar
(78) |
Apr
(43) |
May
(61) |
Jun
(53) |
Jul
(147) |
Aug
(85) |
Sep
(83) |
Oct
(122) |
Nov
(18) |
Dec
(27) |
2014 |
Jan
(58) |
Feb
(25) |
Mar
(49) |
Apr
(17) |
May
(29) |
Jun
(39) |
Jul
(53) |
Aug
(52) |
Sep
(35) |
Oct
(47) |
Nov
(110) |
Dec
(27) |
2015 |
Jan
(50) |
Feb
(93) |
Mar
(96) |
Apr
(30) |
May
(55) |
Jun
(83) |
Jul
(44) |
Aug
(8) |
Sep
(5) |
Oct
|
Nov
(1) |
Dec
(1) |
2016 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
(3) |
Sep
(1) |
Oct
(3) |
Nov
|
Dec
|
2017 |
Jan
|
Feb
(5) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
|
Sep
(7) |
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Chris B. <chr...@no...> - 2014-08-21 23:00:18
|
On Thu, Aug 21, 2014 at 3:53 PM, Aaron Meurer <aar...@co...> wrote: > The only potential issue I can think of for making python=pythonw is > that pythonw is a shell script: > I agree -- that could create issues (though will mostly work, I suppose) But somehow the python.org build has managed to make a pythonw that IS a proper executable: ORRW-M-1275474:bin chris.barker$ pwd /Library/Frameworks/Python.framework/Versions/2.7/bin ORRW-M-1275474:bin chris.barker$ ls -l pythonw lrwxr-xr-x 1 root wheel 8 Jul 16 2013 pythonw -> pythonw2 ORRW-M-1275474:bin chris.barker$ ls -l pythonw2 lrwxr-xr-x 1 root wheel 10 Jul 16 2013 pythonw2 -> pythonw2.7 ORRW-M-1275474:bin chris.barker$ ls -l pythonw2.7 -rwxr-xr-x 1 chris.barker admin 9180 May 13 2013 pythonw2.7 ORRW-M-1275474:bin chris.barker$ file pythonw2.7 pythonw2.7: Mach-O executable i386 (yes, ti works for 64 bit too -- this just happens to be what I have) It would be nice if Anaconda would do it the same way. -Chris > #!/bin/bash > export PYTHONEXECUTABLE=/Users/aaronmeurer/anaconda/bin/python > /Users/aaronmeurer/anaconda/python.app/Contents/MacOS/python $@ > > This is needed because otherwise Python thinks its sys.prefix is > ../../ from the executable, i.e., > /Users/aaronmeurer/anaconda/python.app/Contents/MacOS > > $~/anaconda/python.app/Contents/MacOS/python > Python 3.4.1 |Continuum Analytics, Inc.| (default, Aug 11 2014, 14:17:03) > [GCC 4.2.1 (Apple Inc. build 5577)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> import sys > >>> sys.prefix > '/Users/aaronmeurer/anaconda/python.app/Contents' > > I'm not sure what kinds of issues this would cause having python be a > shell script rather than a Mach-O 64-bit x86_64 executable (or a > symlink to a Mach-O 64-bit x86_64 executable). > > I suppose you could do this (replace 3.4 with 2.7 if you use Python 2): > > $mv ~/anaconda/bin/python3.4 ~/anaconda/bin/python3.4-orig > $ln -s ~/anaconda/bin/pythonw /Users/aaronmeurer/anaconda/bin/python3.4 > > and see if anything breaks (or if you don't want to risk breaking your > main Python install, do it in a separate conda environment). > > Aaron Meurer > > On Fri, Aug 15, 2014 at 2:37 PM, Derek Homeier > <de...@as...> wrote: > > On 14 Aug 2014, at 11:40 pm, Chris Barker <chr...@no...> wrote: > > > >> On Thu, Aug 14, 2014 at 12:07 PM, Eric Firing <efi...@gm...> > wrote: > >> but as far as I can see, on OSX, there is no *advantage* to > non-framework python. Is this correct? > >> > >> Suggestion for anaconda: > >> make bin/python a link to ../python.app/Contents/MacOS/python > >> > >> NOTE: the python.org python build has been doing this (or something > like it) for years and many versions -- I had gotten pretty used to it and > was pretty annoyed when I discovered Anaconda keeps anon-framework binary > as the default. > >> > >> It was annoying enough that I had to explicitly call pythonw (or alter > the #! line) for my wxPython scripts, but with ipython it's even worse -- > how would I start up ipython with a framework build? > >> > >> NOTE: if the Anaconda folks really think there is a real downside to > using the framework executable for the default python, maybe the ipython > start up script could use pythonw ? > >> > >> Eric - have you tried recent MPL with the python.org builds to confirm > the issue? I'm a bit surprised that it would even semi-work -- when I try > wxPython with the regular executable, I get an error message and it wont > run at all. > >> > > Just to make sure I understand - this is about whether the MPL macosx > backend would run with non-framework > > Python at all? It certainly should not, as _macosx.m has been enforcing > an error in this case for some versions. > > That put aside, when I disable the error at the end of _macosx.m I found > the OSX backend to still work as it used > > to under OS X 10.9 with the Fink Python installation (which is not built > as a framework, and unfortunately unlikely > > to change in foreseeable time). I.e. the only obvious problem is the > lack of control by the window manager. > > Overall I still find it to perform better than any of the alternative > backends. But having switched to PyQT4 as the > > default backend due to the above Fink troubles, I did notice some > oddities under Mavericks. I have no idea if they > > are related to the problems Eric had originally reported, but they are > clearly Mavericks-specific: > > > > When using MPL with ipython --pylab and the Quartz version of PyQT4, the > interpreter seems to be slow down > > extremely after running for a little while. Weirdly this is not > connected to any graphics display and in fact happens > > even without any plotting window opened, i.e. the ipython shell just > randomly becomes completely unresponsive > > and hangs for several seconds on simple tasks like typing or navigating > through history. The plotting itself actually > > does not appear to perform any worse than it used to under Mountain Lion. > > None of this seems to occur with the X11 variant of PyQT4. > > When launching ipython without the --pylab flag and loading MPL later > (e.g. with 'import matplotlib' in the ipython > > profile), none of these stalls or hangups occur, but plots sometimes > seem not to refresh properly even with a > > plt.draw() and one has to manually resize the plot window to force > redrawing of the figure. > > This might be primarily a PyQT4 or Ipython issue, but obviously it is > somehow connected to the pylab mode of Ipython. > > > > Cheers, > > Derek > > > > -- > > Anaconda Community Support Group Brought to you by Continuum Analytics > > --- > > You received this message because you are subscribed to the Google > Groups "Anaconda - Public" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to ana...@co.... > > To post to this group, send email to ana...@co.... > > Visit this group at > http://groups.google.com/a/continuum.io/group/anaconda/. > -- 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: Thomas C. <tca...@gm...> - 2014-08-18 03:02:09
|
I have gone through and assigned a milestone to every open issue and PR. The rough filter I used was 1.4.x if it was a bug I thought could be fixed in a back-compatible way and to 1.5.x if it was a new feature or something that I thought would require a good deal of work to fix. I tagged the 'change the default colors' an 2.0 so it was someplace. I suspect that we have more feature requests than we can get done in the near future, particularly if the plan for 1.5 is going to stay working on the semantic/high level plotting objects. I suspect that we should make a 1.x to for feature requests that we do not want to commit to getting done. Please re-milestone anything you think I got wrong and apply milestones to new issues/PRs as they come in. Tom -- Thomas Caswell tca...@gm... |
From: Thomas C. <tca...@gm...> - 2014-08-17 20:08:08
|
Release candidate 4 has been tagged. To sound like a broken record, I hope this is the last one. Tom -- Thomas Caswell tca...@gm... |
From: Eric F. <ef...@ha...> - 2014-08-16 02:32:05
|
On 2014/08/15, 10:53 AM, Derek Homeier wrote: > On 15 Aug 2014, at 10:39 pm, Eric Firing <efi...@gm...> > wrote: > >> On 2014/08/15, 9:37 AM, Derek Homeier wrote: >> >>> Just to make sure I understand - this is about whether the MPL >>> macosx backend would run with non-framework Python at all? It >>> certainly should not, as _macosx.m has been enforcing an error in >>> this case for some versions. That put aside, when I disable the >>> error at the end of _macosx.m I found the OSX backend to still >>> work as it used to under OS X 10.9 with the Fink Python >>> installation (which is not built as a framework, and >>> unfortunately unlikely to change in foreseeable time). >> >> It sounds like whatever mechanism _macosx.m has been using to >> determine whether it is running inside a Python Quartz app, does >> not work in all cases--I gather it works with Fink, but it >> certainly does not with Anaconda. Any idea why, and how this might >> be fixed? Wx does detect this correctly, and refuses to run if in >> a script invoked with Anaconda's python rather than pythonw, for >> example. (As an aside, wx is not available yet for python 3 except >> in phoenix development daily builds, so my comment above is based >> on a test some time ago with python 2.7) > > I don’t know much about Anaconda, but since this is hardcoded in > macros, the only way I see this failing is if they somehow > incorrectly define WITH_NEXT_FRAMEWORK in pyconfig.h without actually > building the framework. Though, if I understand correctly, Anaconda > provides a framework version of the interpreter pythonw and a > non-frameworked python? But matplotlib is probably only built against > one of them, thus not getting the correct header version… Not exactly. Anaconda builds python without the --enable-framework option, and then somehow makes their own python.app directory and binary. Their bin/python has no connection to framework things; their bin/pythonw and bin/python.app point to an executable inside their framework directory, which is also named python.app, but is of course in a different location. No clue as to why they do it this way; they might have had a good reason. In any case, WITH_NEXT_FRAMEWORK is not defined in sysconfig. Nevertheless, when I was running their buggy ipython, which was being run with python rather than pythonw (or equivalent), matplotlib was *not* objecting to using the macosx backend--it was the default--and it was not segfaulting, but neither was it producing usable plot windows. They have fixed their ipython on python 3, so now the osx backend works. Eric > > Cheers, Derek > ------------------------------------------------------------------------------ > _______________________________________________ > Matplotlib-devel mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > |
From: Derek H. <de...@as...> - 2014-08-15 22:42:38
|
Hi Chris, > the framework. Though, if I understand correctly, Anaconda provides a framework version of the interpreter > pythonw and a non-frameworked python? > > This is right -- the GUI backends to matplotlib cause python to crash, but not pythonw. This is annoying, since the two binaries > are equivalent under most other python installs. E.g. the mac system python manpage reads: > > To support multiple versions, the programs named python and pythonw now > just select the real version of Python to run, depending on various set- > tings. (As of Python 2.5, python and pythonw are interchangeable; both > execute Python in the context of an application bundle, which means they > have access to the Graphical User Interface; thus both can, when properly > programmed, display windows, dialogs, etc.) > > So people don't usually think to invoke different anaconda python commands, leading to unexpected crashes (especially when using tools like pytest, which invoke python, run a test that needs MPL, and crash). > well, the way it is currently designed to would be to ‘crash’ resp. exit with an error right on starting up the non-framework interpreter. But besides that it’s curious that its python actually crashes with the macosx backend, which I have never seen with Fink’s non-framework Python. Just tested this with 1.4.0rc3 and Python2.7 (previously with 1.5.x HEAD in Python3.4), and it works the same - the same little quirks, but no signs of performance or stability problems. > This definitely seems like Anaconda's problem rather than matplotlib's (it affects any program that tries to import Qt, e.g.) > So it affects other backends besides macosx or even all? Yes, this seems to be rather Anaconda-specific. I’ve looked for anything special in the build options, but besides adding the right include and linker paths there isn’t really anything. Cheers, Derek |
From: Chris B. <bea...@ha...> - 2014-08-15 21:24:12
|
Hi Derek, > the framework. Though, if I understand correctly, Anaconda provides a > framework version of the interpreter > pythonw and a non-frameworked python? This is right -- the GUI backends to matplotlib cause python to crash, but not pythonw. This is annoying, since the two binaries are equivalent under most other python installs. E.g. the mac system python manpage reads: To support multiple versions, the programs named python and pythonw now just select the real version of Python to run, depending on various set- tings. (As of Python 2.5, python and pythonw are interchangeable; both execute Python in the context of an application bundle, which means they have access to the Graphical User Interface; thus both can, when properly programmed, display windows, dialogs, etc.) So people don't usually think to invoke different anaconda python commands, leading to unexpected crashes (especially when using tools like pytest, which invoke python, run a test that needs MPL, and crash). This definitely seems like Anaconda's problem rather than matplotlib's (it affects any program that tries to import Qt, e.g.) chris |
From: Jens N. <jen...@gm...> - 2014-08-15 21:06:06
|
---------- Forwarded message ---------- From: Jens Nielsen <jen...@gm...> Date: Fri, Aug 15, 2014 at 10:05 PM Subject: Re: [IPython-dev] ipython slowdown with qt To: IPython developers list <ipy...@sc...> While I can reproduce the issue using %gui qt I can also reproduce it with the WX backend (%qui wx) with more or less the same symptoms. However, I don't see the issue with either of the 'tk' or the 'osx' backends. And yes the issue is reproducible in a python installation without any mpl installed. /Jens On Fri, Aug 15, 2014 at 9:22 PM, Eric Firing <ef...@ha...> wrote: > On 2014/08/15, 9:37 AM, Derek Homeier wrote: > > When using MPL with ipython —pylab and the Quartz version of PyQT4, > > the interpreter seems to be slow down extremely after running for a > > little while. Weirdly this is not connected to any graphics display > > and in fact happens even without any plotting window opened, i.e. the > > ipython shell just randomly becomes completely unresponsive and hangs > > for several seconds on simple tasks like typing or navigating through > > history. The plotting itself actually does not appear to perform any > > worse than it used to under Mountain Lion. > > [I'm switching the subject because my comments below relate to ipython > and matplotlib, and are no longer Anaconda-specific.] > > Derek, > > Thanks. A few days ago, when I switched from testing on linux to > testing on osx, exactly this ipython slowdown was happening to me--but I > lost track of what combination of versions and invocations was causing > it. Therefore I have been concentrating on the severe problem which > was, for me, 100% repeatable, and involved macosx backend, not Qt. I > expect the macosx-relatec problem will go away after Ilan uploads the > revised Anaconda ipython for python 3. > > Now I find I can repeat the ipython problem on Homebrew python 3 > (framework--with Quartz app) and Anaconda with the un-fixed ipython > (which is running without starting a Quartz app): > > ipython --pylab=qt > > Leave it alone for a bit. Try scrolling through history. Long delay, > even in responding to Ctrl-C. Evidently key events are stacking up and > not being processed. Now try: > > ipython > %pylab qt > > I see the slowdown with this, also. The response delay seems to get > worse with time. It renders the session unusable after only a few minutes. > > ipython > %gui qt > > And I still see it, so this appears to be a problem in ipython's PyQt4 > gui handling, not directly related to matplotlib. All on Mavericks, > running ipython from Apple's terminal. > > Eric > > > > > > _______________________________________________ > IPython-dev mailing list > IPy...@sc... > http://mail.scipy.org/mailman/listinfo/ipython-dev > |
From: Derek H. <de...@as...> - 2014-08-15 21:02:38
|
On 15 Aug 2014, at 10:39 pm, Eric Firing <efi...@gm...> wrote: > On 2014/08/15, 9:37 AM, Derek Homeier wrote: > >> Just to make sure I understand - this is about whether the MPL macosx >> backend would run with non-framework Python at all? It certainly >> should not, as _macosx.m has been enforcing an error in this case for >> some versions. That put aside, when I disable the error at the end of >> _macosx.m I found the OSX backend to still work as it used to under >> OS X 10.9 with the Fink Python installation (which is not built as a >> framework, and unfortunately unlikely to change in foreseeable time). > > It sounds like whatever mechanism _macosx.m has been using to determine whether it is running inside a Python Quartz app, does not work in all cases--I gather it works with Fink, but it certainly does not with Anaconda. Any idea why, and how this might be fixed? Wx does detect this correctly, and refuses to run if in a script invoked with Anaconda's python rather than pythonw, for example. (As an aside, wx is not available yet for python 3 except in phoenix development daily builds, so my comment above is based on a test some time ago with python 2.7) I don’t know much about Anaconda, but since this is hardcoded in macros, the only way I see this failing is if they somehow incorrectly define WITH_NEXT_FRAMEWORK in pyconfig.h without actually building the framework. Though, if I understand correctly, Anaconda provides a framework version of the interpreter pythonw and a non-frameworked python? But matplotlib is probably only built against one of them, thus not getting the correct header version… Cheers, Derek |
From: Eric F. <ef...@ha...> - 2014-08-15 20:22:23
|
On 2014/08/15, 9:37 AM, Derek Homeier wrote: > When using MPL with ipython —pylab and the Quartz version of PyQT4, > the interpreter seems to be slow down extremely after running for a > little while. Weirdly this is not connected to any graphics display > and in fact happens even without any plotting window opened, i.e. the > ipython shell just randomly becomes completely unresponsive and hangs > for several seconds on simple tasks like typing or navigating through > history. The plotting itself actually does not appear to perform any > worse than it used to under Mountain Lion. [I'm switching the subject because my comments below relate to ipython and matplotlib, and are no longer Anaconda-specific.] Derek, Thanks. A few days ago, when I switched from testing on linux to testing on osx, exactly this ipython slowdown was happening to me--but I lost track of what combination of versions and invocations was causing it. Therefore I have been concentrating on the severe problem which was, for me, 100% repeatable, and involved macosx backend, not Qt. I expect the macosx-relatec problem will go away after Ilan uploads the revised Anaconda ipython for python 3. Now I find I can repeat the ipython problem on Homebrew python 3 (framework--with Quartz app) and Anaconda with the un-fixed ipython (which is running without starting a Quartz app): ipython --pylab=qt Leave it alone for a bit. Try scrolling through history. Long delay, even in responding to Ctrl-C. Evidently key events are stacking up and not being processed. Now try: ipython %pylab qt I see the slowdown with this, also. The response delay seems to get worse with time. It renders the session unusable after only a few minutes. ipython %gui qt And I still see it, so this appears to be a problem in ipython's PyQt4 gui handling, not directly related to matplotlib. All on Mavericks, running ipython from Apple's terminal. Eric |
From: Derek H. <de...@as...> - 2014-08-15 19:38:09
|
On 14 Aug 2014, at 11:40 pm, Chris Barker <chr...@no...> wrote: > On Thu, Aug 14, 2014 at 12:07 PM, Eric Firing <efi...@gm...> wrote: > but as far as I can see, on OSX, there is no *advantage* to non-framework python. Is this correct? > > Suggestion for anaconda: > make bin/python a link to ../python.app/Contents/MacOS/python > > NOTE: the python.org python build has been doing this (or something like it) for years and many versions -- I had gotten pretty used to it and was pretty annoyed when I discovered Anaconda keeps anon-framework binary as the default. > > It was annoying enough that I had to explicitly call pythonw (or alter the #! line) for my wxPython scripts, but with ipython it's even worse -- how would I start up ipython with a framework build? > > NOTE: if the Anaconda folks really think there is a real downside to using the framework executable for the default python, maybe the ipython start up script could use pythonw ? > > Eric - have you tried recent MPL with the python.org builds to confirm the issue? I'm a bit surprised that it would even semi-work -- when I try wxPython with the regular executable, I get an error message and it wont run at all. > Just to make sure I understand - this is about whether the MPL macosx backend would run with non-framework Python at all? It certainly should not, as _macosx.m has been enforcing an error in this case for some versions. That put aside, when I disable the error at the end of _macosx.m I found the OSX backend to still work as it used to under OS X 10.9 with the Fink Python installation (which is not built as a framework, and unfortunately unlikely to change in foreseeable time). I.e. the only obvious problem is the lack of control by the window manager. Overall I still find it to perform better than any of the alternative backends. But having switched to PyQT4 as the default backend due to the above Fink troubles, I did notice some oddities under Mavericks. I have no idea if they are related to the problems Eric had originally reported, but they are clearly Mavericks-specific: When using MPL with ipython —pylab and the Quartz version of PyQT4, the interpreter seems to be slow down extremely after running for a little while. Weirdly this is not connected to any graphics display and in fact happens even without any plotting window opened, i.e. the ipython shell just randomly becomes completely unresponsive and hangs for several seconds on simple tasks like typing or navigating through history. The plotting itself actually does not appear to perform any worse than it used to under Mountain Lion. None of this seems to occur with the X11 variant of PyQT4. When launching ipython without the —pylab flag and loading MPL later (e.g. with ‘import matplotlib’ in the ipython profile), none of these stalls or hangups occur, but plots sometimes seem not to refresh properly even with a plt.draw() and one has to manually resize the plot window to force redrawing of the figure. This might be primarily a PyQT4 or Ipython issue, but obviously it is somehow connected to the pylab mode of Ipython. Cheers, Derek |
From: Chris B. <chr...@no...> - 2014-08-14 21:41:11
|
On Thu, Aug 14, 2014 at 12:07 PM, Eric Firing <efi...@gm...> wrote: > but as far as I can see, on OSX, there is no *advantage* to non-framework > python. Is this correct? > > Suggestion for anaconda: > make bin/python a link to ../python.app/Contents/MacOS/python > NOTE: the python.org python build has been doing this (or something like it) for years and many versions -- I had gotten pretty used to it and was pretty annoyed when I discovered Anaconda keeps anon-framework binary as the default. It was annoying enough that I had to explicitly call pythonw (or alter the #! line) for my wxPython scripts, but with ipython it's even worse -- how would I start up ipython with a framework build? NOTE: if the Anaconda folks really think there is a real downside to using the framework executable for the default python, maybe the ipython start up script could use pythonw ? Eric - have you tried recent MPL with the python.org builds to confirm the issue? I'm a bit surprised that it would even semi-work -- when I try wxPython with the regular executable, I get an error message and it wont run at all. > (On 2.7, I think this would also make wxpython applications work, but I > haven't checked recently.) > yup -- it should -- does for me anyway. If there is some reason why this default to a framework is not a good idea, > and/or cannot be implemented very soon in Anaconda, then I think we need to > immediately remove macosx as a default in matplotlib. A situation where a > new Anaconda user fires up ipython and tries to plot, and it fails, is > intolerable. for what it's worth, I get odd os-x errors trying to se default MPL with Anaconda as well -- haven't tried pythonw for that yet. (kludged it by using the Agg back end only) -- 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: Thomas C. <tca...@gm...> - 2014-08-14 12:24:52
|
Can you make a blocker issue for this? Is it worth looping the ipython devs in on this email/issue as well? On Wed, Aug 13, 2014 at 8:13 PM, Eric Firing <ef...@ha...> wrote: > On 2014/08/13, 1:19 PM, Eric Firing wrote: >> Unless there is something odd about my machine and attempted setups, we >> have a very bad situation. I have OS X 10.9 (Mavericks). I am seeing >> the same problem with homebrew python and pip-installed numpy, >> pip-installed mpl from git 1.4rc3, and from Anaconda 2.0.1, all with >> python 3.4. >> >> Do the normal thing: fire up ipython, use %matplotlib magic, import >> numpy and pyplot, make a plot. The macosx backend comes up as the >> default. A plot appears, but it is not interactive. >> >> Maybe this is related to the framework vs non-framework build question. >> In a way, I don't care--the important point is that using *common* >> methods of trying to get started with ipython and mpl on up-to-date >> python, one immediately runs into a basic failure. >> >> If this can't be fixed *fast*, I suggest we make the macosx backend >> available only by special request, not by default, as of a 1.4 release. >> >> Yes, this can go to a github issue if appropriate, but first I want to >> get thoughts from a wider audience. >> >> Comments? >> >> (I'm wondering why this hasn't driven someone else nuts some time >> ago--hasn't anyone else run into this?) >> >> Eric > > Clue: my first try with homebrew was in a virtualenv. Now I installed > everything directly, without the virtualenv, and the first plot trial > worked. Then I tried restarting ipthon and using "%matplotlib qt". > Plotting was OK, but after closing the plot window and going away for a > bit, upon coming back, the ipython terminal was extremely sluggish. > App-nap problems? I was having similar response problems in some > earlier trials as well, with ipython in anaconda. I thought all this > was supposed to have been cleared up by now... > > I went back to anaconda, and verified I am still getting the > unresponsive window--it can't even be resized. > > Eric > > ------------------------------------------------------------------------------ > _______________________________________________ > Matplotlib-devel mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel -- Thomas Caswell tca...@gm... |
From: Eric F. <ef...@ha...> - 2014-08-14 00:13:36
|
On 2014/08/13, 1:19 PM, Eric Firing wrote: > Unless there is something odd about my machine and attempted setups, we > have a very bad situation. I have OS X 10.9 (Mavericks). I am seeing > the same problem with homebrew python and pip-installed numpy, > pip-installed mpl from git 1.4rc3, and from Anaconda 2.0.1, all with > python 3.4. > > Do the normal thing: fire up ipython, use %matplotlib magic, import > numpy and pyplot, make a plot. The macosx backend comes up as the > default. A plot appears, but it is not interactive. > > Maybe this is related to the framework vs non-framework build question. > In a way, I don't care--the important point is that using *common* > methods of trying to get started with ipython and mpl on up-to-date > python, one immediately runs into a basic failure. > > If this can't be fixed *fast*, I suggest we make the macosx backend > available only by special request, not by default, as of a 1.4 release. > > Yes, this can go to a github issue if appropriate, but first I want to > get thoughts from a wider audience. > > Comments? > > (I'm wondering why this hasn't driven someone else nuts some time > ago--hasn't anyone else run into this?) > > Eric Clue: my first try with homebrew was in a virtualenv. Now I installed everything directly, without the virtualenv, and the first plot trial worked. Then I tried restarting ipthon and using "%matplotlib qt". Plotting was OK, but after closing the plot window and going away for a bit, upon coming back, the ipython terminal was extremely sluggish. App-nap problems? I was having similar response problems in some earlier trials as well, with ipython in anaconda. I thought all this was supposed to have been cleared up by now... I went back to anaconda, and verified I am still getting the unresponsive window--it can't even be resized. Eric |
From: Eric F. <ef...@ha...> - 2014-08-13 23:33:34
|
Unless there is something odd about my machine and attempted setups, we have a very bad situation. I have OS X 10.9 (Mavericks). I am seeing the same problem with homebrew python and pip-installed numpy, pip-installed mpl from git 1.4rc3, and from Anaconda 2.0.1, all with python 3.4. Do the normal thing: fire up ipython, use %matplotlib magic, import numpy and pyplot, make a plot. The macosx backend comes up as the default. A plot appears, but it is not interactive. Maybe this is related to the framework vs non-framework build question. In a way, I don't care--the important point is that using *common* methods of trying to get started with ipython and mpl on up-to-date python, one immediately runs into a basic failure. If this can't be fixed *fast*, I suggest we make the macosx backend available only by special request, not by default, as of a 1.4 release. Yes, this can go to a github issue if appropriate, but first I want to get thoughts from a wider audience. Comments? (I'm wondering why this hasn't driven someone else nuts some time ago--hasn't anyone else run into this?) Eric |
From: Drain, T. R (392P) <the...@jp...> - 2014-08-11 14:34:03
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Plotting Styles â Monte Documentation</title> <link rel="stylesheet" href="styles_files/montedoc.css" type="text/css"> <link rel="stylesheet" href="styles_files/pygments.css" type="text/css"> </head> <body role="document"> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> <div class="section" id="plotting-styles"> <span id="plot2d-styles"></span><h1>Plotting Styles</h1> <div class="toctree-wrapper compound"> </div> <p>MONTE styles allow you to customize the look of your plots easily and to maintain a consistent style on a large number of plots. Styles are used to control how plot elements look (color, marker style, line style, font, etc.) and not how the plot is structured (line vs. marker, which tick formatter to use, etc.).</p> <p>They can be combined and chained together hierarchically. They can be edited programmaticaly via the mpython command shell, using the MONTE style editor GUI, or in a text editor.</p> <p>All of these examples assume that you have imported the plot and style manager into your script:</p> <div class="highlight-python"><div class="highlight"><pre><span class="kn">import</span> <span class="nn">mpylab</span> <span class="kn">from</span> <span class="nn">mpy.plot.style</span> <span class="kn">import</span> <span class="n">mgr</span> <span class="k">as</span> <span class="n">smgr</span> </pre></div> </div> <hr class="docutils"> <table class="monte-quicklink-table docutils" border="1"> <colgroup> <col width="15%"> <col width="85%"> </colgroup> </table> <hr class="docutils"> <div class="section" id="overview"> <span id="plot2d-styles-overview"></span><h2>Overview</h2> <p>The style system has two primary user interfaces: the style manager class, and the style class. The style manager is responsible for creating styles, applying styles to plots, saving and loading styles, and remembering which styles were applied to which plots so they can be automatically updated.</p> <p>The style class is responsible for storing the set of properties to change in the plot. Styles have a variety of display parameters, applying to different parts of the plot. Each parameter can be set or unset. When the style is applied to a plot, those parameters which are set will be implemented; those parameters which are unset will be ignored.</p> <p>The structure of a style reflects the structure of a figure: in a figure, there are usually several contained objects (for example, an Axes object, a Line object, etc.). Likewise, in a style the parameters are organized by the type of object they affect: there are portions that affect only Axes objects, only Line objects, etc.</p> <p>The main style structure has some default attributes (bgColor, fgColor, line, patch, text) which apply to any appropriate plot element. If you set a property in the text attribute of a style, it will apply to any text in the plot (which is a nice way to control fonts, colors, etc). The figure and axes attributes are used to control specific parts of the plot (e.g. axes.xAxes applies just to the X axis and axes.yAxes applies just to the Y axes).</p> <p>The basic <a class="reference internal" href="http://monte/doc/current/source/mpy/plot/style/MplSubStyle.html#mpy-plot-style-mplsubstyle"><em>MplStyle</em></a> structure looks like this:</p> <blockquote> <div><table class="docutils" border="1"> <colgroup> <col width="15%"> <col width="20%"> <col width="65%"> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head"><strong>Property</strong></th> <th class="head"><strong>Type</strong></th> <th class="head"><strong>Description</strong></th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td>axes</td> <td><a class="reference internal" href="http://monte/doc/current/userguide/plot2d/axes.html#plot2d-axes-styling"><em>Sub-Style</em></a></td> <td>Controls how to style an Axes and all itâs components.</td> </tr> <tr class="row-odd"><td>bgColor</td> <td><a class="reference internal" href="http://monte/doc/current/userguide/plot2d/color.html#plot2d-color"><em>color</em></a></td> <td>The default background color to use for a sub-style if none is is specified (i.e. the default background color).</td> </tr> <tr class="row-even"><td>fgColor</td> <td><a class="reference internal" href="http://monte/doc/current/userguide/plot2d/color.html#plot2d-color"><em>color</em></a></td> <td>The default foreground color to use for a sub-style if none is is specified (i.e. the default foreground color).</td> </tr> <tr class="row-odd"><td>figure</td> <td><a class="reference internal" href="http://monte/doc/current/userguide/plot2d/figure.html#plot2d-figure-styling"><em>Sub-Style</em></a></td> <td>Controls how to style a Figure.</td> </tr> <tr class="row-even"><td>line</td> <td><a class="reference internal" href="http://monte/doc/current/userguide/plot2d/lines.html#plot2d-lines-styling"><em>Sub-Style</em></a></td> <td>This specifies the style properties for line elements plotted on an Axes.</td> </tr> <tr class="row-odd"><td>patch</td> <td><a class="reference internal" href="http://monte/doc/current/userguide/plot2d/patches.html#plot2d-patches-styling"><em>Sub-Style</em></a></td> <td>This specifies the style properties for patch elements plotted on an Axes.</td> </tr> <tr class="row-even"><td>text</td> <td><a class="reference internal" href="http://monte/doc/current/userguide/plot2d/text.html#plot2d-text-styling"><em>Sub-Style</em></a></td> <td>The default text style to use. Sub-style elements may override for specific pieces of text.</td> </tr> </tbody> </table> </div></blockquote> <div class="admonition note"> <p class="first admonition-title">Note</p> <p class="last">The full list of available parameters can be found here: <a class="reference internal" href="http://monte/doc/current/userguide/plot2d/style_index.html#plot2d-style-index"><em>Style Index</em></a></p> </div> <hr class="docutils"> </div> <div class="section" id="style-creation"> <span id="plot2d-styles-create"></span><h2>Style Creation</h2> <p>Styles are created by calling the manager create method with the name of the style. Once the style has been created, set the parameters on the style using the names of the style attributes (see the top level style structure above for the possible names)</p> <div class="highlight-python"><div class="highlight"><pre><span class="c"># Create the style</span> <span class="n">style</span> <span class="o">=</span> <span class="n">smgr</span><span class="o">.</span><span class="n">create</span><span class="p">(</span> <span class="s">"Big Title"</span> <span class="p">)</span> <span class="c"># Change the axes title font.</span> <span class="n">style</span><span class="o">.</span><span class="n">axes</span><span class="o">.</span><span class="n">title</span><span class="o">.</span><span class="n">font</span><span class="o">.</span><span class="n">family</span> <span class="o">=</span> <span class="s">"sans-serif"</span> <span class="n">style</span><span class="o">.</span><span class="n">axes</span><span class="o">.</span><span class="n">title</span><span class="o">.</span><span class="n">font</span><span class="o">.</span><span class="n">size</span> <span class="o">=</span> <span class="mi">24</span> </pre></div> </div> <p>You can also pass a dictionary of style attributes to the create method to create and initialize the style in one call. The keys of the dictionary are the string form of the variable path: so the variable style.this.parameter.path becomes the dictionary key âthis.parameter.pathâ. The value associated with each key needs to be of the proper type for the parameter; some require floating point values, integers, booleans, or other strings.</p> <div class="highlight-python"><div class="highlight"><pre><span class="c"># Create the style</span> <span class="n">style</span> <span class="o">=</span> <span class="n">smgr</span><span class="o">.</span><span class="n">create</span><span class="p">(</span> <span class="s">"Big Title"</span><span class="p">,</span> <span class="p">{</span> <span class="s">"axes.title.font.family"</span> <span class="p">:</span> <span class="s">"sans-serif"</span><span class="p">,</span> <span class="s">"axes.title.font.size"</span> <span class="p">:</span> <span class="mi">24</span><span class="p">,</span> <span class="p">}</span> <span class="p">)</span> </pre></div> </div> <p>When defining a style, you can optionally name a parent style. When the style is applied, the parent style is automatically applied first. This means that a child style will overwrite the settings contained in the parent style, if and when those styles conflict.</p> <div class="highlight-python"><div class="highlight"><pre><span class="c"># Create the style to make fonts larger and easier to read.</span> <span class="n">s1</span> <span class="o">=</span> <span class="n">smgr</span><span class="o">.</span><span class="n">create</span><span class="p">(</span> <span class="s">"Big Text"</span> <span class="p">)</span> <span class="n">s1</span><span class="o">.</span><span class="n">text</span><span class="o">.</span><span class="n">font</span><span class="o">.</span><span class="n">scale</span> <span class="o">=</span> <span class="mf">1.5</span> <span class="c"># Create a new style, with a parent style</span> <span class="n">s2</span> <span class="o">=</span> <span class="n">smgr</span><span class="o">.</span><span class="n">create</span><span class="p">(</span> <span class="s">'Presentation'</span><span class="p">,</span> <span class="n">parent</span><span class="o">=</span><span class="s">'Big Text'</span> <span class="p">)</span> <span class="c"># Set something particular to the child style</span> <span class="n">s2</span><span class="o">.</span><span class="n">figure</span><span class="o">.</span><span class="n">width</span> <span class="o">=</span> <span class="mi">800</span> <span class="n">s2</span><span class="o">.</span><span class="n">figure</span><span class="o">.</span><span class="n">height</span> <span class="o">=</span> <span class="mi">600</span> <span class="c"># Big Text will be applied before the other parts of Presentation</span> <span class="n">smgr</span><span class="o">.</span><span class="n">apply</span><span class="p">(</span> <span class="n">fig</span><span class="p">,</span> <span class="s">'Presentation'</span> <span class="p">)</span> </pre></div> </div> <p>It should be noted that in the above example the âBig Textâ style is <em>not</em> overwritten when we create the âPresentationâ style. This is because when we create styles in this manner, they are automatically registered and stored in a style manager class. They can then be access later by name.</p> </div> <div class="section" id="setting-attributes"> <h2>Setting Attributes</h2> <p>Each Style object has a set of parameters affecting how plots are displayed. The parameters are unset by default; they will not affect the display of a plot unless they are set. In an existing style object, you can use Pythonâs dot syntax to access and set parameters.</p> <p>To access an already defined style, use the find() method on the manager</p> <div class="highlight-python"><div class="highlight"><pre><span class="c"># Find a previous define dstyle</span> <span class="n">style</span> <span class="o">=</span> <span class="n">smgr</span><span class="o">.</span><span class="n">find</span><span class="p">(</span> <span class="s">"Big Text"</span> <span class="p">)</span> <span class="c"># Change some of the style attributes</span> <span class="n">style</span><span class="o">.</span><span class="n">text</span><span class="o">.</span><span class="n">font</span><span class="o">.</span><span class="n">size</span> <span class="o">=</span> <span class="mi">16</span> </pre></div> </div> </div> <div class="section" id="applying-styles-to-a-plot"> <h2>Applying Styles to a Plot</h2> <p>Styles can be applied to any matplotlib plot element (figures, axes, axis, lines, etc). Applying the style to the figure is most common use case. When you apply a style to a figure, it will search the figure for various plot elements and axes and recursively apply the same style to them (the same is true when calling apply only on the axes).</p> <p>The style attributes dictate which matplotlib elements are modified. So the attribute axes.bgColor will only change the color of the axes while the attribute figure.bgColor will change the background for the figure.</p> <p>Style are applied using the apply method on the manager. You can pass in the style object or the name of the style to apply.</p> <div class="highlight-python"><div class="highlight"><pre><span class="n">fig</span><span class="p">,</span> <span class="n">ax</span> <span class="o">=</span> <span class="n">mpylab</span><span class="o">.</span><span class="n">subplots</span><span class="p">()</span> <span class="n">lines</span> <span class="o">=</span> <span class="n">ax</span><span class="o">.</span><span class="n">plot</span><span class="p">(</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">],</span> <span class="p">[</span><span class="mi">2</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">]</span> <span class="p">)</span> <span class="n">ax</span><span class="o">.</span><span class="n">set_title</span><span class="p">(</span> <span class="s">"This is the Title"</span> <span class="p">)</span> <span class="c"># Create the style and set some fields</span> <span class="n">style</span> <span class="o">=</span> <span class="n">smgr</span><span class="o">.</span><span class="n">create</span><span class="p">(</span> <span class="s">"Big Title"</span> <span class="p">)</span> <span class="n">style</span><span class="o">.</span><span class="n">axes</span><span class="o">.</span><span class="n">title</span><span class="o">.</span><span class="n">font</span><span class="o">.</span><span class="n">family</span> <span class="o">=</span> <span class="s">"sans-serif"</span> <span class="n">style</span><span class="o">.</span><span class="n">axes</span><span class="o">.</span><span class="n">title</span><span class="o">.</span><span class="n">font</span><span class="o">.</span><span class="n">size</span> <span class="o">=</span> <span class="mi">24</span> <span class="c"># Apply the style to the figure.</span> <span class="n">smgr</span><span class="o">.</span><span class="n">apply</span><span class="p">(</span> <span class="n">fig</span><span class="p">,</span> <span class="n">style</span> <span class="p">)</span> <span class="c"># Apply a list of styles to just the lines.</span> <span class="n">smgr</span><span class="o">.</span><span class="n">apply</span><span class="p">(</span> <span class="n">lines</span><span class="p">,</span> <span class="p">[</span> <span class="s">"Dashed Lines"</span><span class="p">,</span> <span class="s">"Blue Lines"</span><span class="p">,</span> <span class="s">"Bold Lines"</span> <span class="p">]</span> <span class="p">)</span> </pre></div> </div> <p>The style manager will recursively walk down through the input plot element and apply the style. So if a plot contains four subplots, the axes style will be applied to each of the four subplots and the text style will apply to all the text in the plot. If you want to apply the style only the input object (say an input figure), pass recurse=False to the apply method.</p> <div class="highlight-python"><div class="highlight"><pre><span class="c"># Apply the style only to the figure</span> <span class="n">smgr</span><span class="o">.</span><span class="n">apply</span><span class="p">(</span> <span class="n">fig</span><span class="p">,</span> <span class="s">'Figure Style'</span><span class="p">,</span> <span class="n">recurse</span><span class="o">=</span><span class="bp">False</span> <span class="p">)</span> </pre></div> </div> </div> <div class="section" id="updating-and-re-applying-styles"> <h2>Updating and Re-applying Styles</h2> <p>When the manager applyes a style to the figure (or to any other other plotting element), the manager will remember what style was applied to which element, so if you later modify any styles, the changes can be automatically applied to the plot elements by calling the reapply method.</p> <div class="highlight-python"><div class="highlight"><pre><span class="c"># Modify the style</span> <span class="n">style</span><span class="o">.</span><span class="n">axes</span><span class="o">.</span><span class="n">title</span><span class="o">.</span><span class="n">font</span><span class="o">.</span><span class="n">size</span> <span class="o">=</span> <span class="mi">16</span> <span class="c"># Apply the update to everything that is currently using it.</span> <span class="n">smgr</span><span class="o">.</span><span class="n">reapply</span><span class="p">()</span> </pre></div> </div> <p>This will change the fonts from size 24 (the original âBig Titleâ size) to the new size of 16 and update the plot. The reapply() method will update any and all plots that have styes applied to them.</p> </div> <div class="section" id="saving-loading"> <h2>Saving & Loading</h2> <p>The style manager can be used to save and load styles to a persistent form. Each style is saved into a file with the form âStyle_Name.mpystyleâ. Style files are human readable, Python files and may be edited by the user. Styles are NOT automatically saved and loaded by the manager (though that could change based on user feedback).</p> <div class="admonition note"> <p class="first admonition-title">Note</p> <p class="last">Style names including a space â â will be changed to use an underscore â_â when saved as a .mpystyle file. For Example, a style named âDSS 16â will be saved as âDSS_16.mpystyleâ.</p> </div> <p>To save the current set of styles, use the manager save method. To load all the available styles, use the load method.</p> <div class="highlight-python"><div class="highlight"><pre><span class="c"># Save the current styles to $HOME/.masar/styles</span> <span class="n">smgr</span><span class="o">.</span><span class="n">save</span><span class="p">()</span> <span class="c"># Save the current styles to the local directory.</span> <span class="n">smgr</span><span class="o">.</span><span class="n">save</span><span class="p">(</span> <span class="s">"."</span> <span class="p">)</span> <span class="c"># Load all available styles.</span> <span class="n">smgr</span><span class="o">.</span><span class="n">load</span><span class="p">()</span> </pre></div> </div> <p>When loading styles, the manager will use a search path that looks for styles in the following order (high priority to low priority):</p> <ol class="arabic simple"> <li>The current directory.</li> <li>The userâs home directory: $HOME/.masar/styles/</li> <li>The <a class="reference internal" href="http://monte/doc/current/source/Monte/index.html#monte"><em>Monte</em></a> installed data directory: $MONTEDIR/share/monte/styles</li> </ol> <p>Styles that are defined in more than one of these locations will use the first definition. This way, each user can override and customize certain <a class="reference internal" href="http://monte/doc/current/source/Monte/index.html#monte"><em>Monte</em></a> styles to their liking; they can also use different directories to try out different style options in parallel. You can change the list of directories to look in by modifying your STYLEPATH environment variable.</p> <p>You can also manipulate the loading and saving of styles in your Python script directly. The âpathâ variable on the style manager is a simple Python list of directory names. By changing the path, you can change what styles are loaded:</p> <div class="highlight-python"><div class="highlight"><pre><span class="c"># Add a search path and load the styles.</span> <span class="n">smgr</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">append</span><span class="p">(</span> <span class="s">"/nav/proj/scripts/styles"</span> <span class="p">)</span> <span class="n">smgr</span><span class="o">.</span><span class="n">load</span><span class="p">()</span> </pre></div> </div> </div> <div class="section" id="tagging-plot-elements"> <h2>Tagging Plot Elements</h2> <p id="plot2d-styles-tags">Tagging or style tags are way to filter which plot elements (figure, axes, lines, etc) a style is applied to by setting a tag (string name) to a plot element. The script that creates the plot tags each element with a name. When a style is applied to an element, the tag input can be specified to limit which elements get changed.</p> <p>Letâs say you have a plot that shows two lines for each DSN complex (Goldstone, Canberra, and Madrid). The plotting script has access to those lines and knows which complex they are a part of but the lines are hard to get to after the plotting script is finished. If the plotting script tags the lines with the complex name like this:</p> <div class="highlight-python"><div class="highlight"><pre><span class="k">def</span> <span class="nf">createPlot</span><span class="p">():</span> <span class="n">fig</span><span class="p">,</span> <span class="n">ax</span> <span class="o">=</span> <span class="n">mpylab</span><span class="o">.</span><span class="n">subplots</span><span class="p">()</span> <span class="c"># create data to plot, layout plot, etc.</span> <span class="n">l</span> <span class="o">=</span> <span class="n">ax</span><span class="o">.</span><span class="n">plot</span><span class="p">(</span> <span class="n">gldX</span><span class="p">,</span> <span class="n">gldY</span> <span class="p">)</span> <span class="n">smgr</span><span class="o">.</span><span class="n">tag</span><span class="p">(</span> <span class="n">l</span><span class="p">,</span> <span class="s">"Goldstone"</span> <span class="p">)</span> <span class="n">l</span> <span class="o">=</span> <span class="n">ax</span><span class="o">.</span><span class="n">plot</span><span class="p">(</span> <span class="n">madX</span><span class="p">,</span> <span class="n">madY</span> <span class="p">)</span> <span class="n">smgr</span><span class="o">.</span><span class="n">tag</span><span class="p">(</span> <span class="n">l</span><span class="p">,</span> <span class="s">"Madrid"</span> <span class="p">)</span> <span class="n">l</span> <span class="o">=</span> <span class="n">ax</span><span class="o">.</span><span class="n">plot</span><span class="p">(</span> <span class="n">canX</span><span class="p">,</span> <span class="n">canY</span> <span class="p">)</span> <span class="n">smgr</span><span class="o">.</span><span class="n">tag</span><span class="p">(</span> <span class="n">l</span><span class="p">,</span> <span class="s">"Canberra"</span> <span class="p">)</span> <span class="k">return</span> <span class="n">fig</span> </pre></div> </div> <p>The calling script can use those tags to apply styles to the individual lines without having direct access to them. Both the apply() and set() functions can use the tag keyword to filter which elements are used.</p> <div class="highlight-python"><div class="highlight"><pre><span class="n">fig</span> <span class="o">=</span> <span class="n">createPlot</span><span class="p">()</span> <span class="c"># Apply the 'Goldstone Style' to elements tagged Goldstone</span> <span class="n">smgr</span><span class="o">.</span><span class="n">apply</span><span class="p">(</span> <span class="n">fig</span><span class="p">,</span> <span class="s">"Goldstone Style"</span><span class="p">,</span> <span class="n">tag</span><span class="o">=</span><span class="s">"Goldstone"</span> <span class="p">)</span> <span class="c"># Change every line tagged Canberra to be blue.</span> <span class="n">smgr</span><span class="o">.</span><span class="n">set</span><span class="p">(</span> <span class="n">fig</span><span class="p">,</span> <span class="p">{</span> <span class="s">'line.color'</span> <span class="p">:</span> <span class="s">'blue'</span> <span class="p">},</span> <span class="n">tag</span><span class="o">=</span><span class="s">"Canberra"</span> <span class="p">)</span> </pre></div> </div> <p>Tags are a powerful tool that allows you to write complicated plotting scripts and then control individual elements in those plots using styles from outside the plotting script.</p> </div> <div class="section" id="setting-attributes-and-unmanaged-styles"> <span id="plot2d-styles-unmanaged"></span><h2>Setting Attributes and Unmanaged Styles</h2> <p>The style system can also be used to quickly set plot attributes without creating a style by calling the manager set() method. This method can accept either a single style attribute or a dictionary of style attributes and can use the tag system to filter which plot elements are set.</p> <div class="highlight-python"><div class="highlight"><pre><span class="c"># Change the background color to black.</span> <span class="n">smgr</span><span class="o">.</span><span class="n">set</span><span class="p">(</span> <span class="n">fig</span><span class="p">,</span> <span class="s">"bgColor"</span><span class="p">,</span> <span class="s">"black"</span> <span class="p">)</span> <span class="c"># Change the multiple attributes.</span> <span class="n">smgr</span><span class="o">.</span><span class="n">set</span><span class="p">(</span> <span class="n">fig</span><span class="p">,</span> <span class="p">{</span> <span class="s">"bgColor"</span> <span class="p">:</span> <span class="s">"black"</span><span class="p">,</span> <span class="s">"fgColor"</span> <span class="p">:</span> <span class="s">"white"</span><span class="p">,</span> <span class="s">"text.font.scale"</span> <span class="p">:</span> <span class="mf">1.25</span> <span class="p">}</span> <span class="p">)</span> <span class="c"># Change lines tagged 'DSS 14' to gold.</span> <span class="n">smgr</span><span class="o">.</span><span class="n">set</span><span class="p">(</span> <span class="n">fig</span><span class="p">,</span> <span class="s">"line.color"</span><span class="p">,</span> <span class="s">"gold"</span><span class="p">,</span> <span class="n">tag</span><span class="o">=</span><span class="s">"DSS 14"</span> <span class="p">)</span> </pre></div> </div> <p>An âunmanagedâ style can be created using the style constructor and applied directly to a plot. The style manager will have no knowlege of this style and so reapply will not work, and the style will not be saved.</p> <div class="highlight-python"><div class="highlight"><pre><span class="kn">import</span> <span class="nn">mpy.plot.style</span> <span class="kn">as</span> <span class="nn">S</span> <span class="c"># Unmanaged style - won't be saved.</span> <span class="n">style</span> <span class="o">=</span> <span class="n">S</span><span class="o">.</span><span class="n">MplStyle</span><span class="p">(</span> <span class="s">'dummy'</span> <span class="p">)</span> <span class="c"># Must use style.apply(), smgr.apply() won't work.</span> <span class="n">style</span><span class="o">.</span><span class="n">apply</span><span class="p">(</span> <span class="n">fig</span> <span class="p">)</span> </pre></div> </div> <hr class="docutils"> </div> <div class="section" id="an-example"> <span id="plot2d-styles-example"></span><h2>An Example</h2> <p>Following is a more complete example on how to make the plot at the top of this page:</p> <div class="highlight-python"><div class="highlight"><pre><span class="c"># import some modules</span> <span class="kn">import</span> <span class="nn">mpylab</span> <span class="kn">from</span> <span class="nn">mpy.plot.style</span> <span class="kn">import</span> <span class="n">mgr</span> <span class="k">as</span> <span class="n">smgr</span> <span class="c"># create the plot</span> <span class="n">fig</span><span class="p">,</span> <span class="n">ax</span> <span class="o">=</span> <span class="n">mpylab</span><span class="o">.</span><span class="n">subplots</span><span class="p">()</span> <span class="n">xdata</span> <span class="o">=</span> <span class="p">[</span> <span class="mi">1</span><span class="p">,</span> <span class="mf">1.5</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mf">2.5</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mf">3.5</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mf">4.5</span><span class="p">,</span> <span class="mf">4.75</span><span class="p">,</span> <span class="mi">5</span> <span class="p">]</span> <span class="n">ydata</span> <span class="o">=</span> <span class="p">[</span> <span class="mi">1</span><span class="p">,</span> <span class="mf">1.75</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mf">2.75</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mf">2.75</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mf">2.25</span><span class="p">,</span> <span class="mf">2.75</span><span class="p">,</span> <span class="mi">3</span> <span class="p">]</span> <span class="n">line</span> <span class="o">=</span> <span class="n">ax</span><span class="o">.</span><span class="n">plot</span><span class="p">(</span> <span class="n">xdata</span><span class="p">,</span> <span class="n">ydata</span> <span class="p">)</span> <span class="n">rect</span> <span class="o">=</span> <span class="n">mpylab</span><span class="o">.</span><span class="n">Rectangle</span><span class="p">(</span> <span class="p">(</span><span class="mf">2.8</span><span class="p">,</span> <span class="mf">1.0</span><span class="p">),</span> <span class="mf">0.4</span><span class="p">,</span> <span class="mf">1.2</span> <span class="p">)</span> <span class="n">ax</span><span class="o">.</span><span class="n">add_patch</span><span class="p">(</span> <span class="n">rect</span> <span class="p">)</span> <span class="n">figTitle</span> <span class="o">=</span> <span class="n">fig</span><span class="o">.</span><span class="n">suptitle</span><span class="p">(</span> <span class="s">"Figure Title"</span> <span class="p">)</span> <span class="n">axTitle</span> <span class="o">=</span> <span class="n">ax</span><span class="o">.</span><span class="n">set_title</span><span class="p">(</span> <span class="s">"Axes Title"</span> <span class="p">)</span> <span class="n">xLabel</span> <span class="o">=</span> <span class="n">ax</span><span class="o">.</span><span class="n">set_xlabel</span><span class="p">(</span> <span class="s">"X-Axis Label"</span> <span class="p">)</span> <span class="n">yLabel</span> <span class="o">=</span> <span class="n">ax</span><span class="o">.</span><span class="n">set_ylabel</span><span class="p">(</span> <span class="s">"Y-Axis Label"</span> <span class="p">)</span> <span class="n">figText</span> <span class="o">=</span> <span class="n">fig</span><span class="o">.</span><span class="n">text</span><span class="p">(</span> <span class="mf">0.02</span><span class="p">,</span> <span class="mf">0.02</span><span class="p">,</span> <span class="s">"FigureText"</span> <span class="p">)</span> <span class="n">txt</span> <span class="o">=</span> <span class="n">ax</span><span class="o">.</span><span class="n">text</span><span class="p">(</span> <span class="mf">4.2</span><span class="p">,</span> <span class="mf">1.1</span><span class="p">,</span> <span class="s">"Text"</span> <span class="p">)</span> <span class="c"># Create the style</span> <span class="n">style</span> <span class="o">=</span> <span class="n">smgr</span><span class="o">.</span><span class="n">create</span><span class="p">(</span> <span class="s">"My Style"</span> <span class="p">)</span> <span class="n">style</span><span class="o">.</span><span class="n">bgColor</span> <span class="o">=</span> <span class="s">'white'</span> <span class="n">style</span><span class="o">.</span><span class="n">fgColor</span> <span class="o">=</span> <span class="s">'black'</span> <span class="c"># Figure</span> <span class="n">style</span><span class="o">.</span><span class="n">figure</span><span class="o">.</span><span class="n">width</span> <span class="o">=</span> <span class="mi">10</span> <span class="n">style</span><span class="o">.</span><span class="n">figure</span><span class="o">.</span><span class="n">height</span> <span class="o">=</span> <span class="mi">10</span> <span class="c"># Axes</span> <span class="n">style</span><span class="o">.</span><span class="n">axes</span><span class="o">.</span><span class="n">axisBelow</span> <span class="o">=</span> <span class="bp">True</span> <span class="n">style</span><span class="o">.</span><span class="n">axes</span><span class="o">.</span><span class="n">leftEdge</span><span class="o">.</span><span class="n">color</span> <span class="o">=</span> <span class="s">'magenta'</span> <span class="n">style</span><span class="o">.</span><span class="n">axes</span><span class="o">.</span><span class="n">leftEdge</span><span class="o">.</span><span class="n">width</span> <span class="o">=</span> <span class="mi">5</span> <span class="n">style</span><span class="o">.</span><span class="n">axes</span><span class="o">.</span><span class="n">leftEdge</span><span class="o">.</span><span class="n">style</span> <span class="o">=</span> <span class="s">'--'</span> <span class="n">style</span><span class="o">.</span><span class="n">axes</span><span class="o">.</span><span class="n">bottomEdge</span><span class="o">.</span><span class="n">color</span> <span class="o">=</span> <span class="s">'magenta'</span> <span class="n">style</span><span class="o">.</span><span class="n">axes</span><span class="o">.</span><span class="n">bottomEdge</span><span class="o">.</span><span class="n">width</span> <span class="o">=</span> <span class="mi">5</span> <span class="n">style</span><span class="o">.</span><span class="n">axes</span><span class="o">.</span><span class="n">bottomEdge</span><span class="o">.</span><span class="n">style</span> <span class="o">=</span> <span class="s">'dashed'</span> <span class="n">style</span><span class="o">.</span><span class="n">axes</span><span class="o">.</span><span class="n">topEdge</span><span class="o">.</span><span class="n">visible</span> <span class="o">=</span> <span class="bp">False</span> <span class="n">style</span><span class="o">.</span><span class="n">axes</span><span class="o">.</span><span class="n">rightEdge</span><span class="o">.</span><span class="n">visible</span> <span class="o">=</span> <span class="bp">False</span> <span class="n">style</span><span class="o">.</span><span class="n">axes</span><span class="o">.</span><span class="n">title</span><span class="o">.</span><span class="n">font</span><span class="o">.</span><span class="n">scale</span> <span class="o">=</span> <span class="mf">2.0</span> <span class="n">style</span><span class="o">.</span><span class="n">axes</span><span class="o">.</span><span class="n">title</span><span class="o">.</span><span class="n">font</span><span class="o">.</span><span class="n">family</span> <span class="o">=</span> <span class="s">'sans-serif'</span> <span class="c"># X-Axis</span> <span class="n">style</span><span class="o">.</span><span class="n">axes</span><span class="o">.</span><span class="n">xAxis</span><span class="o">.</span><span class="n">autoscale</span> <span class="o">=</span> <span class="bp">True</span> <span class="n">style</span><span class="o">.</span><span class="n">axes</span><span class="o">.</span><span class="n">xAxis</span><span class="o">.</span><span class="n">dataMargin</span> <span class="o">=</span> <span class="mf">0.1</span> <span class="n">style</span><span class="o">.</span><span class="n">axes</span><span class="o">.</span><span class="n">xAxis</span><span class="o">.</span><span class="n">label</span><span class="o">.</span><span class="n">font</span><span class="o">.</span><span class="n">scale</span> <span class="o">=</span> <span class="mf">1.2</span> <span class="n">style</span><span class="o">.</span><span class="n">axes</span><span class="o">.</span><span class="n">xAxis</span><span class="o">.</span><span class="n">majorTicks</span><span class="o">.</span><span class="n">labels</span><span class="o">.</span><span class="n">font</span><span class="o">.</span><span class="n">scale</span> <span class="o">=</span> <span class="mf">0.75</span> <span class="n">style</span><span class="o">.</span><span class="n">axes</span><span class="o">.</span><span class="n">xAxis</span><span class="o">.</span><span class="n">majorTicks</span><span class="o">.</span><span class="n">marks</span><span class="o">.</span><span class="n">visible</span> <span class="o">=</span> <span class="bp">True</span> <span class="n">style</span><span class="o">.</span><span class="n">axes</span><span class="o">.</span><span class="n">xAxis</span><span class="o">.</span><span class="n">majorTicks</span><span class="o">.</span><span class="n">grid</span><span class="o">.</span><span class="n">visible</span> <span class="o">=</span> <span class="bp">True</span> <span class="n">style</span><span class="o">.</span><span class="n">axes</span><span class="o">.</span><span class="n">xAxis</span><span class="o">.</span><span class="n">majorTicks</span><span class="o">.</span><span class="n">grid</span><span class="o">.</span><span class="n">color</span> <span class="o">=</span> <span class="s">'#B0B0B0'</span> <span class="n">style</span><span class="o">.</span><span class="n">axes</span><span class="o">.</span><span class="n">xAxis</span><span class="o">.</span><span class="n">majorTicks</span><span class="o">.</span><span class="n">grid</span><span class="o">.</span><span class="n">width</span> <span class="o">=</span> <span class="mf">1.5</span> <span class="n">style</span><span class="o">.</span><span class="n">axes</span><span class="o">.</span><span class="n">xAxis</span><span class="o">.</span><span class="n">majorTicks</span><span class="o">.</span><span class="n">grid</span><span class="o">.</span><span class="n">style</span> <span class="o">=</span> <span class="s">':'</span> <span class="n">style</span><span class="o">.</span><span class="n">axes</span><span class="o">.</span><span class="n">xAxis</span><span class="o">.</span><span class="n">majorTicks</span><span class="o">.</span><span class="n">length</span> <span class="o">=</span> <span class="mf">15.0</span> <span class="n">style</span><span class="o">.</span><span class="n">axes</span><span class="o">.</span><span class="n">xAxis</span><span class="o">.</span><span class="n">majorTicks</span><span class="o">.</span><span class="n">width</span> <span class="o">=</span> <span class="mf">1.5</span> <span class="n">style</span><span class="o">.</span><span class="n">axes</span><span class="o">.</span><span class="n">xAxis</span><span class="o">.</span><span class="n">minorTicks</span><span class="o">.</span><span class="n">marks</span><span class="o">.</span><span class="n">visible</span> <span class="o">=</span> <span class="bp">True</span> <span class="n">style</span><span class="o">.</span><span class="n">axes</span><span class="o">.</span><span class="n">xAxis</span><span class="o">.</span><span class="n">minorTicks</span><span class="o">.</span><span class="n">grid</span><span class="o">.</span><span class="n">visible</span> <span class="o">=</span> <span class="bp">True</span> <span class="n">style</span><span class="o">.</span><span class="n">axes</span><span class="o">.</span><span class="n">xAxis</span><span class="o">.</span><span class="n">minorTicks</span><span class="o">.</span><span class="n">grid</span><span class="o">.</span><span class="n">color</span> <span class="o">=</span> <span class="s">'#B0B0B0'</span> <span class="n">style</span><span class="o">.</span><span class="n">axes</span><span class="o">.</span><span class="n">xAxis</span><span class="o">.</span><span class="n">minorTicks</span><span class="o">.</span><span class="n">grid</span><span class="o">.</span><span class="n">width</span> <span class="o">=</span> <span class="mf">0.5</span> <span class="n">style</span><span class="o">.</span><span class="n">axes</span><span class="o">.</span><span class="n">xAxis</span><span class="o">.</span><span class="n">minorTicks</span><span class="o">.</span><span class="n">grid</span><span class="o">.</span><span class="n">style</span> <span class="o">=</span> <span class="s">':'</span> <span class="n">style</span><span class="o">.</span><span class="n">axes</span><span class="o">.</span><span class="n">xAxis</span><span class="o">.</span><span class="n">minorTicks</span><span class="o">.</span><span class="n">length</span> <span class="o">=</span> <span class="mf">5.0</span> <span class="n">style</span><span class="o">.</span><span class="n">axes</span><span class="o">.</span><span class="n">xAxis</span><span class="o">.</span><span class="n">minorTicks</span><span class="o">.</span><span class="n">width</span> <span class="o">=</span> <span class="mf">0.5</span> <span class="c"># Y-Axis</span> <span class="n">style</span><span class="o">.</span><span class="n">axes</span><span class="o">.</span><span class="n">yAxis</span> <span class="o">=</span> <span class="n">style</span><span class="o">.</span><span class="n">axes</span><span class="o">.</span><span class="n">xAxis</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span> <span class="c"># Lines</span> <span class="n">style</span><span class="o">.</span><span class="n">line</span><span class="o">.</span><span class="n">color</span> <span class="o">=</span> <span class="s">"blue"</span> <span class="n">style</span><span class="o">.</span><span class="n">line</span><span class="o">.</span><span class="n">style</span> <span class="o">=</span> <span class="s">'dash-dot'</span> <span class="n">style</span><span class="o">.</span><span class="n">line</span><span class="o">.</span><span class="n">width</span> <span class="o">=</span> <span class="mf">1.5</span> <span class="n">style</span><span class="o">.</span><span class="n">line</span><span class="o">.</span><span class="n">marker</span><span class="o">.</span><span class="n">color</span> <span class="o">=</span> <span class="s">'red'</span> <span class="n">style</span><span class="o">.</span><span class="n">line</span><span class="o">.</span><span class="n">marker</span><span class="o">.</span><span class="n">edgeColor</span> <span class="o">=</span> <span class="s">'green'</span> <span class="n">style</span><span class="o">.</span><span class="n">line</span><span class="o">.</span><span class="n">marker</span><span class="o">.</span><span class="n">edgeWidth</span> <span class="o">=</span> <span class="mi">3</span> <span class="n">style</span><span class="o">.</span><span class="n">line</span><span class="o">.</span><span class="n">marker</span><span class="o">.</span><span class="n">size</span> <span class="o">=</span> <span class="mi">20</span> <span class="n">style</span><span class="o">.</span><span class="n">line</span><span class="o">.</span><span class="n">marker</span><span class="o">.</span><span class="n">style</span> <span class="o">=</span> <span class="s">'circle'</span> <span class="n">style</span><span class="o">.</span><span class="n">line</span><span class="o">.</span><span class="n">marker</span><span class="o">.</span><span class="n">fill</span> <span class="o">=</span> <span class="s">'bottom'</span> <span class="c"># Patches</span> <span class="n">style</span><span class="o">.</span><span class="n">patch</span><span class="o">.</span><span class="n">color</span> <span class="o">=</span> <span class="s">'gold'</span> <span class="n">style</span><span class="o">.</span><span class="n">patch</span><span class="o">.</span><span class="n">filled</span> <span class="o">=</span> <span class="bp">True</span> <span class="n">style</span><span class="o">.</span><span class="n">patch</span><span class="o">.</span><span class="n">edgeColor</span> <span class="o">=</span> <span class="s">'purple'</span> <span class="n">style</span><span class="o">.</span><span class="n">patch</span><span class="o">.</span><span class="n">edgeWidth</span> <span class="o">=</span> <span class="mi">5</span> <span class="c"># Text</span> <span class="n">style</span><span class="o">.</span><span class="n">text</span><span class="o">.</span><span class="n">lineSpacing</span> <span class="o">=</span> <span class="mf">1.0</span> <span class="n">style</span><span class="o">.</span><span class="n">text</span><span class="o">.</span><span class="n">font</span><span class="o">.</span><span class="n">size</span> <span class="o">=</span> <span class="mi">12</span> <span class="n">style</span><span class="o">.</span><span class="n">text</span><span class="o">.</span><span class="n">font</span><span class="o">.</span><span class="n">family</span> <span class="o">=</span> <span class="s">'monospace'</span> <span class="c"># apply the style</span> <span class="n">smgr</span><span class="o">.</span><span class="n">apply</span><span class="p">(</span> <span class="n">fig</span><span class="p">,</span> <span class="n">style</span> <span class="p">)</span> </pre></div> </div> </div> </div> </div> </div> </div> <div class="clearer"></div> </div> <div class="footer" role="contentinfo"> © Copyright 2010, Caltech / Jet Propulsion Laboratory. Last updated on 2014-08-06@15:41:36 PDT. Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3a0. </div> </body></html> |
From: Thomas C. <tca...@gm...> - 2014-08-10 21:38:28
|
It seems that the odd numbered rcs are cursed. Sorry about this. I have merged one of the fixes and assuming everything passes locally, will tag rc4 tonight. Tom On Sun, Aug 10, 2014 at 6:18 AM, Jens Nielsen <jen...@gm...> wrote: > I discovered an issue with the qt4 backend on python 2.7. See > https://github.com/matplotlib/matplotlib/pull/3357 for > a possible solution. > > > ERROR: matplotlib.tests.test_backend_qt4.test_shift > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/usr/local/lib/python2.7/site-packages/nose/case.py", line 197, in > runTest > self.test(*self.arg) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/testing/decorators.py", > line 110, in wrapped_function > func(*args, **kwargs) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/testing/decorators.py", > line 51, in failer > result = f(*args, **kwargs) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/tests/test_backend_qt4.py", > line 80, in test_shift > 'A') > File > "/usr/local/lib/python2.7/site-packages/matplotlib/tests/test_backend_qt4.py", > line 72, in assert_correct_key > qt_canvas.keyPressEvent(event) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", > line 312, in keyPressEvent > key = self._get_key(event) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", > line 384, in _get_key > return six.u('+').join(mods + [key]) > File "/usr/local/lib/python2.7/site-packages/six.py", line 589, in u > return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape") > TypeError: decoding Unicode is not supported > > ====================================================================== > ERROR: matplotlib.tests.test_backend_qt4.test_lower > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/usr/local/lib/python2.7/site-packages/nose/case.py", line 197, in > runTest > self.test(*self.arg) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/testing/decorators.py", > line 110, in wrapped_function > func(*args, **kwargs) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/testing/decorators.py", > line 51, in failer > result = f(*args, **kwargs) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/tests/test_backend_qt4.py", > line 88, in test_lower > 'a') > File > "/usr/local/lib/python2.7/site-packages/matplotlib/tests/test_backend_qt4.py", > line 72, in assert_correct_key > qt_canvas.keyPressEvent(event) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", > line 312, in keyPressEvent > key = self._get_key(event) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", > line 384, in _get_key > return six.u('+').join(mods + [key]) > File "/usr/local/lib/python2.7/site-packages/six.py", line 589, in u > return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape") > TypeError: decoding Unicode is not supported > > ====================================================================== > ERROR: matplotlib.tests.test_backend_qt4.test_control > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/usr/local/lib/python2.7/site-packages/nose/case.py", line 197, in > runTest > self.test(*self.arg) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/testing/decorators.py", > line 110, in wrapped_function > func(*args, **kwargs) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/testing/decorators.py", > line 51, in failer > result = f(*args, **kwargs) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/tests/test_backend_qt4.py", > line 96, in test_control > 'ctrl+a') > File > "/usr/local/lib/python2.7/site-packages/matplotlib/tests/test_backend_qt4.py", > line 72, in assert_correct_key > qt_canvas.keyPressEvent(event) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", > line 312, in keyPressEvent > key = self._get_key(event) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", > line 384, in _get_key > return six.u('+').join(mods + [key]) > File "/usr/local/lib/python2.7/site-packages/six.py", line 589, in u > return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape") > TypeError: decoding Unicode is not supported > > ====================================================================== > ERROR: matplotlib.tests.test_backend_qt4.test_unicode_upper > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/usr/local/lib/python2.7/site-packages/nose/case.py", line 197, in > runTest > self.test(*self.arg) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/testing/decorators.py", > line 110, in wrapped_function > func(*args, **kwargs) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/testing/decorators.py", > line 51, in failer > result = f(*args, **kwargs) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/tests/test_backend_qt4.py", > line 104, in test_unicode_upper > unichr(193)) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/tests/test_backend_qt4.py", > line 72, in assert_correct_key > qt_canvas.keyPressEvent(event) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", > line 312, in keyPressEvent > key = self._get_key(event) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", > line 384, in _get_key > return six.u('+').join(mods + [key]) > File "/usr/local/lib/python2.7/site-packages/six.py", line 589, in u > return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape") > TypeError: decoding Unicode is not supported > > ====================================================================== > ERROR: matplotlib.tests.test_backend_qt4.test_unicode_lower > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/usr/local/lib/python2.7/site-packages/nose/case.py", line 197, in > runTest > self.test(*self.arg) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/testing/decorators.py", > line 110, in wrapped_function > func(*args, **kwargs) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/testing/decorators.py", > line 51, in failer > result = f(*args, **kwargs) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/tests/test_backend_qt4.py", > line 112, in test_unicode_lower > unichr(225)) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/tests/test_backend_qt4.py", > line 72, in assert_correct_key > qt_canvas.keyPressEvent(event) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", > line 312, in keyPressEvent > key = self._get_key(event) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", > line 384, in _get_key > return six.u('+').join(mods + [key]) > File "/usr/local/lib/python2.7/site-packages/six.py", line 589, in u > return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape") > TypeError: decoding Unicode is not supported > > ====================================================================== > ERROR: matplotlib.tests.test_backend_qt4.test_alt_control > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/usr/local/lib/python2.7/site-packages/nose/case.py", line 197, in > runTest > self.test(*self.arg) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/testing/decorators.py", > line 110, in wrapped_function > func(*args, **kwargs) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/testing/decorators.py", > line 51, in failer > result = f(*args, **kwargs) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/tests/test_backend_qt4.py", > line 120, in test_alt_control > 'alt+control') > File > "/usr/local/lib/python2.7/site-packages/matplotlib/tests/test_backend_qt4.py", > line 72, in assert_correct_key > qt_canvas.keyPressEvent(event) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", > line 312, in keyPressEvent > key = self._get_key(event) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", > line 384, in _get_key > return six.u('+').join(mods + [key]) > File "/usr/local/lib/python2.7/site-packages/six.py", line 589, in u > return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape") > TypeError: decoding Unicode is not supported > > ====================================================================== > ERROR: matplotlib.tests.test_backend_qt4.test_control_alt > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/usr/local/lib/python2.7/site-packages/nose/case.py", line 197, in > runTest > self.test(*self.arg) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/testing/decorators.py", > line 110, in wrapped_function > func(*args, **kwargs) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/testing/decorators.py", > line 51, in failer > result = f(*args, **kwargs) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/tests/test_backend_qt4.py", > line 128, in test_control_alt > 'ctrl+alt') > File > "/usr/local/lib/python2.7/site-packages/matplotlib/tests/test_backend_qt4.py", > line 72, in assert_correct_key > qt_canvas.keyPressEvent(event) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", > line 312, in keyPressEvent > key = self._get_key(event) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", > line 384, in _get_key > return six.u('+').join(mods + [key]) > File "/usr/local/lib/python2.7/site-packages/six.py", line 589, in u > return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape") > TypeError: decoding Unicode is not supported > > ====================================================================== > ERROR: matplotlib.tests.test_backend_qt4.test_modifier_order > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/usr/local/lib/python2.7/site-packages/nose/case.py", line 197, in > runTest > self.test(*self.arg) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/testing/decorators.py", > line 110, in wrapped_function > func(*args, **kwargs) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/testing/decorators.py", > line 51, in failer > result = f(*args, **kwargs) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/tests/test_backend_qt4.py", > line 136, in test_modifier_order > 'ctrl+alt+super+' + unichr(225)) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/tests/test_backend_qt4.py", > line 72, in assert_correct_key > qt_canvas.keyPressEvent(event) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", > line 312, in keyPressEvent > key = self._get_key(event) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", > line 384, in _get_key > return six.u('+').join(mods + [key]) > File "/usr/local/lib/python2.7/site-packages/six.py", line 589, in u > return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape") > TypeError: decoding Unicode is not supported > > ====================================================================== > ERROR: matplotlib.tests.test_backend_qt4.test_backspace > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/usr/local/lib/python2.7/site-packages/nose/case.py", line 197, in > runTest > self.test(*self.arg) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/testing/decorators.py", > line 110, in wrapped_function > func(*args, **kwargs) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/testing/decorators.py", > line 51, in failer > result = f(*args, **kwargs) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/tests/test_backend_qt4.py", > line 144, in test_backspace > 'backspace') > File > "/usr/local/lib/python2.7/site-packages/matplotlib/tests/test_backend_qt4.py", > line 72, in assert_correct_key > qt_canvas.keyPressEvent(event) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", > line 312, in keyPressEvent > key = self._get_key(event) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", > line 384, in _get_key > return six.u('+').join(mods + [key]) > File "/usr/local/lib/python2.7/site-packages/six.py", line 589, in u > return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape") > TypeError: decoding Unicode is not supported > > ====================================================================== > ERROR: matplotlib.tests.test_backend_qt4.test_backspace_mod > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/usr/local/lib/python2.7/site-packages/nose/case.py", line 197, in > runTest > self.test(*self.arg) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/testing/decorators.py", > line 110, in wrapped_function > func(*args, **kwargs) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/testing/decorators.py", > line 51, in failer > result = f(*args, **kwargs) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/tests/test_backend_qt4.py", > line 152, in test_backspace_mod > 'ctrl+backspace') > File > "/usr/local/lib/python2.7/site-packages/matplotlib/tests/test_backend_qt4.py", > line 72, in assert_correct_key > qt_canvas.keyPressEvent(event) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", > line 312, in keyPressEvent > key = self._get_key(event) > File > "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", > line 384, in _get_key > return six.u('+').join(mods + [key]) > File "/usr/local/lib/python2.7/site-packages/six.py", line 589, in u > return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape") > TypeError: decoding Unicode is not supported > > ---------------------------------------------------------------------- > > > On Sat, Aug 9, 2014 at 10:18 PM, Thomas Caswell <tca...@gm...> wrote: >> >> I have tagged the third (and hopefully last) RC for 1.4. >> >> The outstanding issues are documentation related (rebase guide which I >> need to edit a bit more, a what's new entry, a decision if we have >> improved the install documentation enough, and to make sure that docs >> for backend_bases gets added to sphinx) and the re-design of the front >> page. >> >> Tom >> >> -- >> Thomas Caswell >> tca...@gm... >> >> >> ------------------------------------------------------------------------------ >> _______________________________________________ >> Matplotlib-devel mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-devel mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > -- Thomas Caswell tca...@gm... |
From: Jens N. <jen...@gm...> - 2014-08-10 10:19:26
|
I discovered an issue with the qt4 backend on python 2.7. See https://github.com/matplotlib/matplotlib/pull/3357 for a possible solution. ERROR: matplotlib.tests.test_backend_qt4.test_shift ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest self.test(*self.arg) File "/usr/local/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 110, in wrapped_function func(*args, **kwargs) File "/usr/local/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 51, in failer result = f(*args, **kwargs) File "/usr/local/lib/python2.7/site-packages/matplotlib/tests/test_backend_qt4.py", line 80, in test_shift 'A') File "/usr/local/lib/python2.7/site-packages/matplotlib/tests/test_backend_qt4.py", line 72, in assert_correct_key qt_canvas.keyPressEvent(event) File "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", line 312, in keyPressEvent key = self._get_key(event) File "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", line 384, in _get_key return six.u('+').join(mods + [key]) File "/usr/local/lib/python2.7/site-packages/six.py", line 589, in u return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape") TypeError: decoding Unicode is not supported ====================================================================== ERROR: matplotlib.tests.test_backend_qt4.test_lower ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest self.test(*self.arg) File "/usr/local/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 110, in wrapped_function func(*args, **kwargs) File "/usr/local/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 51, in failer result = f(*args, **kwargs) File "/usr/local/lib/python2.7/site-packages/matplotlib/tests/test_backend_qt4.py", line 88, in test_lower 'a') File "/usr/local/lib/python2.7/site-packages/matplotlib/tests/test_backend_qt4.py", line 72, in assert_correct_key qt_canvas.keyPressEvent(event) File "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", line 312, in keyPressEvent key = self._get_key(event) File "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", line 384, in _get_key return six.u('+').join(mods + [key]) File "/usr/local/lib/python2.7/site-packages/six.py", line 589, in u return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape") TypeError: decoding Unicode is not supported ====================================================================== ERROR: matplotlib.tests.test_backend_qt4.test_control ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest self.test(*self.arg) File "/usr/local/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 110, in wrapped_function func(*args, **kwargs) File "/usr/local/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 51, in failer result = f(*args, **kwargs) File "/usr/local/lib/python2.7/site-packages/matplotlib/tests/test_backend_qt4.py", line 96, in test_control 'ctrl+a') File "/usr/local/lib/python2.7/site-packages/matplotlib/tests/test_backend_qt4.py", line 72, in assert_correct_key qt_canvas.keyPressEvent(event) File "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", line 312, in keyPressEvent key = self._get_key(event) File "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", line 384, in _get_key return six.u('+').join(mods + [key]) File "/usr/local/lib/python2.7/site-packages/six.py", line 589, in u return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape") TypeError: decoding Unicode is not supported ====================================================================== ERROR: matplotlib.tests.test_backend_qt4.test_unicode_upper ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest self.test(*self.arg) File "/usr/local/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 110, in wrapped_function func(*args, **kwargs) File "/usr/local/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 51, in failer result = f(*args, **kwargs) File "/usr/local/lib/python2.7/site-packages/matplotlib/tests/test_backend_qt4.py", line 104, in test_unicode_upper unichr(193)) File "/usr/local/lib/python2.7/site-packages/matplotlib/tests/test_backend_qt4.py", line 72, in assert_correct_key qt_canvas.keyPressEvent(event) File "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", line 312, in keyPressEvent key = self._get_key(event) File "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", line 384, in _get_key return six.u('+').join(mods + [key]) File "/usr/local/lib/python2.7/site-packages/six.py", line 589, in u return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape") TypeError: decoding Unicode is not supported ====================================================================== ERROR: matplotlib.tests.test_backend_qt4.test_unicode_lower ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest self.test(*self.arg) File "/usr/local/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 110, in wrapped_function func(*args, **kwargs) File "/usr/local/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 51, in failer result = f(*args, **kwargs) File "/usr/local/lib/python2.7/site-packages/matplotlib/tests/test_backend_qt4.py", line 112, in test_unicode_lower unichr(225)) File "/usr/local/lib/python2.7/site-packages/matplotlib/tests/test_backend_qt4.py", line 72, in assert_correct_key qt_canvas.keyPressEvent(event) File "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", line 312, in keyPressEvent key = self._get_key(event) File "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", line 384, in _get_key return six.u('+').join(mods + [key]) File "/usr/local/lib/python2.7/site-packages/six.py", line 589, in u return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape") TypeError: decoding Unicode is not supported ====================================================================== ERROR: matplotlib.tests.test_backend_qt4.test_alt_control ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest self.test(*self.arg) File "/usr/local/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 110, in wrapped_function func(*args, **kwargs) File "/usr/local/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 51, in failer result = f(*args, **kwargs) File "/usr/local/lib/python2.7/site-packages/matplotlib/tests/test_backend_qt4.py", line 120, in test_alt_control 'alt+control') File "/usr/local/lib/python2.7/site-packages/matplotlib/tests/test_backend_qt4.py", line 72, in assert_correct_key qt_canvas.keyPressEvent(event) File "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", line 312, in keyPressEvent key = self._get_key(event) File "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", line 384, in _get_key return six.u('+').join(mods + [key]) File "/usr/local/lib/python2.7/site-packages/six.py", line 589, in u return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape") TypeError: decoding Unicode is not supported ====================================================================== ERROR: matplotlib.tests.test_backend_qt4.test_control_alt ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest self.test(*self.arg) File "/usr/local/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 110, in wrapped_function func(*args, **kwargs) File "/usr/local/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 51, in failer result = f(*args, **kwargs) File "/usr/local/lib/python2.7/site-packages/matplotlib/tests/test_backend_qt4.py", line 128, in test_control_alt 'ctrl+alt') File "/usr/local/lib/python2.7/site-packages/matplotlib/tests/test_backend_qt4.py", line 72, in assert_correct_key qt_canvas.keyPressEvent(event) File "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", line 312, in keyPressEvent key = self._get_key(event) File "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", line 384, in _get_key return six.u('+').join(mods + [key]) File "/usr/local/lib/python2.7/site-packages/six.py", line 589, in u return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape") TypeError: decoding Unicode is not supported ====================================================================== ERROR: matplotlib.tests.test_backend_qt4.test_modifier_order ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest self.test(*self.arg) File "/usr/local/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 110, in wrapped_function func(*args, **kwargs) File "/usr/local/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 51, in failer result = f(*args, **kwargs) File "/usr/local/lib/python2.7/site-packages/matplotlib/tests/test_backend_qt4.py", line 136, in test_modifier_order 'ctrl+alt+super+' + unichr(225)) File "/usr/local/lib/python2.7/site-packages/matplotlib/tests/test_backend_qt4.py", line 72, in assert_correct_key qt_canvas.keyPressEvent(event) File "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", line 312, in keyPressEvent key = self._get_key(event) File "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", line 384, in _get_key return six.u('+').join(mods + [key]) File "/usr/local/lib/python2.7/site-packages/six.py", line 589, in u return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape") TypeError: decoding Unicode is not supported ====================================================================== ERROR: matplotlib.tests.test_backend_qt4.test_backspace ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest self.test(*self.arg) File "/usr/local/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 110, in wrapped_function func(*args, **kwargs) File "/usr/local/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 51, in failer result = f(*args, **kwargs) File "/usr/local/lib/python2.7/site-packages/matplotlib/tests/test_backend_qt4.py", line 144, in test_backspace 'backspace') File "/usr/local/lib/python2.7/site-packages/matplotlib/tests/test_backend_qt4.py", line 72, in assert_correct_key qt_canvas.keyPressEvent(event) File "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", line 312, in keyPressEvent key = self._get_key(event) File "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", line 384, in _get_key return six.u('+').join(mods + [key]) File "/usr/local/lib/python2.7/site-packages/six.py", line 589, in u return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape") TypeError: decoding Unicode is not supported ====================================================================== ERROR: matplotlib.tests.test_backend_qt4.test_backspace_mod ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest self.test(*self.arg) File "/usr/local/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 110, in wrapped_function func(*args, **kwargs) File "/usr/local/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 51, in failer result = f(*args, **kwargs) File "/usr/local/lib/python2.7/site-packages/matplotlib/tests/test_backend_qt4.py", line 152, in test_backspace_mod 'ctrl+backspace') File "/usr/local/lib/python2.7/site-packages/matplotlib/tests/test_backend_qt4.py", line 72, in assert_correct_key qt_canvas.keyPressEvent(event) File "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", line 312, in keyPressEvent key = self._get_key(event) File "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", line 384, in _get_key return six.u('+').join(mods + [key]) File "/usr/local/lib/python2.7/site-packages/six.py", line 589, in u return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape") TypeError: decoding Unicode is not supported ---------------------------------------------------------------------- On Sat, Aug 9, 2014 at 10:18 PM, Thomas Caswell <tca...@gm...> wrote: > I have tagged the third (and hopefully last) RC for 1.4. > > The outstanding issues are documentation related (rebase guide which I > need to edit a bit more, a what's new entry, a decision if we have > improved the install documentation enough, and to make sure that docs > for backend_bases gets added to sphinx) and the re-design of the front > page. > > Tom > > -- > Thomas Caswell > tca...@gm... > > > ------------------------------------------------------------------------------ > _______________________________________________ > Matplotlib-devel mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > |
From: jamesramm <jam...@gm...> - 2014-08-10 07:40:50
|
I have updated MEP26 to include discussion on 'decoupling' the style from artists and having a generic Style class. (copied over from the github issue): I have been thinking that a good way to get stylesheets in, would be if the 'style' of an artist was entirely independent. I.E a single property which points to some kind of 'style' object. This way, style objects could be created on their own (programatically, or by some other means (Stylesheets!)) and then applied to artists at will (programatically, or by some other means (a stylesheet parser....)). Then I thought...when it comes to drawing, the style **is** entirely independent - it has been transferred to the `GraphicsContext` object. So all that is needed is to expose this object at the artist level and we can create styles! I created a very minimal example to explain here: https://github.com/JamesRamm/mpl_experiment Basically, it just provides a `Style` class (which is just `GraphicsContextBase` propertified and with a new function to generate one from a dict) and a minimal reimplementation of Line2D and Text to show how it would be used for both. Just run run.py (and have a look at it) to see how the user would use style objects. (Note it is a bit convoluted as I have not added any axes plotting routines, so a Line2D needs to be manually created and added). Basically, this involves reimplementing the `draw` method to use the `style` property rather than creating a new `GraphicsContext` instance. It also has the benefits that you could create 1 style object and apply it to multiple artists, or tweak a couple of properties on each...which is nicer than using individual get/set methods on artists (IMO). So the API could potentially become something like: arts = axes.plot(xdata, ydata) #Note not providing any 'style' info myStyle = Style.from_dict({'color': '#484D7A', 'linewidth': 1.9, 'linestyle': 'dashed'}) arts.style = myStyle arts.style.color = '#FFFFFF' or: myStyle = Style() axes.plot([0,1],[0,1], style = myStyle) -- View this message in context: http://matplotlib.1069221.n5.nabble.com/MEP26-Artist-level-stylesheets-tp43664p43770.html Sent from the matplotlib - devel mailing list archive at Nabble.com. |
From: Matthew B. <mat...@gm...> - 2014-08-10 06:56:46
|
Hi, On Sat, Aug 9, 2014 at 2:18 PM, Thomas Caswell <tca...@gm...> wrote: > I have tagged the third (and hopefully last) RC for 1.4. > > The outstanding issues are documentation related (rebase guide which I > need to edit a bit more, a what's new entry, a decision if we have > improved the install documentation enough, and to make sure that docs > for backend_bases gets added to sphinx) and the re-design of the front > page. Thanks for doing this. I did a full test against the scipy stack: https://travis-ci.org/matthew-brett/scipy-stack-osx-testing/builds/32131131 It turns out there's a new failure testing pandas against mpl, reproduced with ``nosetests pandas.tseries.tests.test_converter`` after installing pandas: ====================================================================== ERROR: test_dateindex_conversion (pandas.tseries.tests.test_converter.TestDateTimeConverter) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas/tseries/tests/test_converter.py", line 77, in test_dateindex_conversion xp = converter.dates.date2num(dateindex) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/dates.py", line 310, in date2num return _to_ordinalf_np_vectorized(d) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/lib/function_base.py", line 1573, in __call__ return self._vectorize_call(func=func, args=vargs) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/lib/function_base.py", line 1633, in _vectorize_call ufunc, otypes = self._get_ufunc_and_otypes(func=func, args=args) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/lib/function_base.py", line 1597, in _get_ufunc_and_otypes outputs = func(*inputs) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/dates.py", line 204, in _to_ordinalf base = float(dt.toordinal()) AttributeError: 'numpy.datetime64' object has no attribute 'toordinal' I confirmed that the same command running against mpl 1.3.1 passes. Same error with numpy 1.7.1 and numpy 1.8.2. Does this ring any bells? Cheers, Matthew |
From: Thomas C. <tca...@gm...> - 2014-08-09 21:18:29
|
I have tagged the third (and hopefully last) RC for 1.4. The outstanding issues are documentation related (rebase guide which I need to edit a bit more, a what's new entry, a decision if we have improved the install documentation enough, and to make sure that docs for backend_bases gets added to sphinx) and the re-design of the front page. Tom -- Thomas Caswell tca...@gm... |
From: Benjamin R. <ben...@ou...> - 2014-08-07 01:28:52
|
Ah, thank you. For a second there, I thought there was some orphaned page that I have never found that would have rendered my current research project moot. On Wed, Aug 6, 2014 at 2:45 PM, Christoph Gohlke <cg...@uc...> wrote: > On 8/6/2014 10:04 AM, Benjamin Root wrote: > > In your wiki, you stated that you replaced the Introduction section with > > a "Orgins of Matplotlib" section instead. However, I am completely > > unaware of a section named that way. Can you be more specific? > > > > > > On Mon, Aug 4, 2014 at 2:25 PM, Gary Setter <gar...@ya... > > <mailto:gar...@ya...>> wrote: > > > > I uploaded a version of the documentation to MatplotlibAsHtmlHelp > > <http://sourceforge.net/projects/matplotlibashtmlhelp/> I made some > > changes and tried to explain why on the projects Wiki. Again thank > > you for all the help.. > > Gary > > > > image <http://sourceforge.net/projects/matplotlibashtmlhelp/> > > > > > > > > > > > > MatplotlibAsHtmlHelp > > <http://sourceforge.net/projects/matplotlibashtmlhelp/> > > MatPlotLib documentation as Html Help > > View on sourceforge.net > > <http://sourceforge.net/projects/matplotlibashtmlhelp/> > > > > The "Orgins of Matplotlib" section in Gary's CHM file contains the > following paragraph from the "Introduction" page at > <http://matplotlib.org/dev/users/intro.html>: > > """ > When I went searching for a Python plotting package, I had several > requirements: > > Plots should look great - publication quality. One important > requirement for me is that the text looks good (antialiased, etc.) > Postscript output for inclusion with TeX documents > Embeddable in a graphical user interface for application development > Code should be easy enough that I can understand it and extend it > Making plots should be easy > > Finding no package that suited me just right, I did what any > self-respecting Python programmer would do: rolled up my sleeves and > dived in. > """ > > Christoph > > > ------------------------------------------------------------------------------ > Infragistics Professional > Build stunning WinForms apps today! > Reboot your WinForms applications with our WinForms controls. > Build a bridge from your legacy apps to the future. > > http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-devel mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > |
From: Christoph G. <cg...@uc...> - 2014-08-06 18:45:13
|
On 8/6/2014 10:04 AM, Benjamin Root wrote: > In your wiki, you stated that you replaced the Introduction section with > a "Orgins of Matplotlib" section instead. However, I am completely > unaware of a section named that way. Can you be more specific? > > > On Mon, Aug 4, 2014 at 2:25 PM, Gary Setter <gar...@ya... > <mailto:gar...@ya...>> wrote: > > I uploaded a version of the documentation to MatplotlibAsHtmlHelp > <http://sourceforge.net/projects/matplotlibashtmlhelp/> I made some > changes and tried to explain why on the projects Wiki. Again thank > you for all the help.. > Gary > > image <http://sourceforge.net/projects/matplotlibashtmlhelp/> > > > > > > MatplotlibAsHtmlHelp > <http://sourceforge.net/projects/matplotlibashtmlhelp/> > MatPlotLib documentation as Html Help > View on sourceforge.net > <http://sourceforge.net/projects/matplotlibashtmlhelp/> > The "Orgins of Matplotlib" section in Gary's CHM file contains the following paragraph from the "Introduction" page at <http://matplotlib.org/dev/users/intro.html>: """ When I went searching for a Python plotting package, I had several requirements: Plots should look great - publication quality. One important requirement for me is that the text looks good (antialiased, etc.) Postscript output for inclusion with TeX documents Embeddable in a graphical user interface for application development Code should be easy enough that I can understand it and extend it Making plots should be easy Finding no package that suited me just right, I did what any self-respecting Python programmer would do: rolled up my sleeves and dived in. """ Christoph |
From: Benjamin R. <ben...@ou...> - 2014-08-06 17:04:56
|
In your wiki, you stated that you replaced the Introduction section with a "Orgins of Matplotlib" section instead. However, I am completely unaware of a section named that way. Can you be more specific? On Mon, Aug 4, 2014 at 2:25 PM, Gary Setter <gar...@ya...> wrote: > I uploaded a version of the documentation to MatplotlibAsHtmlHelp > <http://sourceforge.net/projects/matplotlibashtmlhelp/> I made some > changes and tried to explain why on the projects Wiki. Again thank you for > all the help.. > Gary > > > [image: image] <http://sourceforge.net/projects/matplotlibashtmlhelp/> > > > > > > MatplotlibAsHtmlHelp > <http://sourceforge.net/projects/matplotlibashtmlhelp/> > MatPlotLib documentation as Html Help > View on sourceforge.net > <http://sourceforge.net/projects/matplotlibashtmlhelp/> > Preview by Yahoo > > > > > ------------------------------------------------------------------------------ > Infragistics Professional > Build stunning WinForms apps today! > Reboot your WinForms applications with our WinForms controls. > Build a bridge from your legacy apps to the future. > > http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-devel mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > > |
From: Gary S. <gar...@ya...> - 2014-08-04 18:28:26
|
I uploaded a version of the documentation to MatplotlibAsHtmlHelp I made some changes and tried to explain why on the projects Wiki. Again thank you for all the help.. Gary MatplotlibAsHtmlHelp MatPlotLib documentation as Html Help View on sourceforge.net Preview by Yahoo |
From: Stefan H. <shm...@gm...> - 2014-08-04 14:22:23
|
I do see a clear-cut difference. A Patch is a two-dimensional region characterized by a boundary and an interior region, which may have colors, line/hatch styles, etc. Also, a Patch has an algorithms to compute an area, a circumference, decide whether a point lies inside or outside the Patch, to cut a Patch for visibility calculations, etc. A Polygon is a special case of a Patch, namely one that is bounded by piecewise-linear segments. This implies specific formulae/algorithms to compute the properties mentioned above. Now, it is entirely meaningful to realize a Patch differently than in terms of piecewise-linear segments. I could use piecewise cubic segments (splines), or give the control points of a closed Bezier curve. All the properties of a Patch are still meaningful, but none of the algorithms for a Polygon apply. Hence I find it meaningful to define class Polygon(Patch) such that I am not precluded to define class SplinePatch(Patch) class BezierPatch(Patch) etc. Hence I prefer to have Patch as an Abstract Base Class and not as a specific implementation of a Polygon. -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Polygon-vs-Patch-tp43743p43748.html Sent from the matplotlib - devel mailing list archive at Nabble.com. |