Re: [Matplotlib-users] Focus in OSX
1. Keyboard input always goes to the terminal. Shortcuts don't work in the standard plot windows and my custom widgets no longer catch key_press_events (I'm not sure when this functionality broke exactly as I haven't used those widgets much recently but it worked when I developed 'em a year or two ago.) 2. There's no icon in the cmd-tab task switcher corresponding to the figure windows. Swapping to the terminal running ipython (or the qtconsole for ipython qtconsole) does not raise the windows. 3. Using mission control, the figures appear grouped as if they belong to an application of their own. However, when you click on them to swap to them and bring them forward from behind other windows, they raise and then immediately disappear again. I think that mission control is raising the specific window you select from the collection of figures, but then OSX is somehow immediately re-raising the previously selected app, which hides the figures again. Hmm, I don't really see these issues, using a dev matplotlib, OS X 10.7.3, and a python.org python 2.7. Interesting. (This is with the 'MacOSX' backend, mind. Also note that on March 5 there was a patch to that backend to fix a few issues, so if your matplotlib checkout is before that, perhaps that's the problem?) Anyhow, when I start python (or ipython), and then do import matplotlib.pyplot as plt, nothing happens, but then plt.figure(), for example, causes a new dock icon to appear -- a python rocket-ship thing -- that acts as an app that owns the figure windows. I can use this app to switch to / raise the windows from the dock or the cmd-tab switcher, and things work correctly via mission control as well. The keyboard shortcuts are a bit flaky ('s' never seems to work, but I can e.g. toggle gridlines with 'g' or log-axes with 'l'), but the key-presses definitely don't go to the terminal. I wonder what the difference is? Perhaps the apple-supplied python is a bit broken in this regard? Zach -- Better than sec? Nothing is better than sec when it comes to monitoring Big Data applications. Try Boundary one-second resolution app monitoring today. Free. http://p.sf.net/sfu/Boundary-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Focus in OSX
Huh, bizarre. So neither of you get the little rocket-ship app icon appear when matplotlib first draws a window? And matplotlib.rcParams['backend'] is definitely 'MacOSX'? Hopefully someone who knows more about the OS X backend can comment here... Zach On Apr 11, 2012, at 2:19 PM, Chris Laumann wrote: I get the exact same behavior from both Enthought supplied python and Apple supplied python. I haven't tried any other pythons, but it isn't limited to the Apple one. C On Apr 11, 2012, at 1:58 PM, Elliot Saba wrote: I'm using homebrew python, which is built from source, and the latest matplotlib gotten from git://github.com/matplotlib/matplotlib.git. (I rebuilt it ~2 minutes ago) Perhaps there's some kind of environment difference? -E On Wed, Apr 11, 2012 at 5:12 AM, Zachary Pincus zachary.pin...@yale.edu wrote: 1. Keyboard input always goes to the terminal. Shortcuts don't work in the standard plot windows and my custom widgets no longer catch key_press_events (I'm not sure when this functionality broke exactly as I haven't used those widgets much recently but it worked when I developed 'em a year or two ago.) 2. There's no icon in the cmd-tab task switcher corresponding to the figure windows. Swapping to the terminal running ipython (or the qtconsole for ipython qtconsole) does not raise the windows. 3. Using mission control, the figures appear grouped as if they belong to an application of their own. However, when you click on them to swap to them and bring them forward from behind other windows, they raise and then immediately disappear again. I think that mission control is raising the specific window you select from the collection of figures, but then OSX is somehow immediately re-raising the previously selected app, which hides the figures again. Hmm, I don't really see these issues, using a dev matplotlib, OS X 10.7.3, and a python.org python 2.7. Interesting. (This is with the 'MacOSX' backend, mind. Also note that on March 5 there was a patch to that backend to fix a few issues, so if your matplotlib checkout is before that, perhaps that's the problem?) Anyhow, when I start python (or ipython), and then do import matplotlib.pyplot as plt, nothing happens, but then plt.figure(), for example, causes a new dock icon to appear -- a python rocket-ship thing -- that acts as an app that owns the figure windows. I can use this app to switch to / raise the windows from the dock or the cmd-tab switcher, and things work correctly via mission control as well. The keyboard shortcuts are a bit flaky ('s' never seems to work, but I can e.g. toggle gridlines with 'g' or log-axes with 'l'), but the key-presses definitely don't go to the terminal. I wonder what the difference is? Perhaps the apple-supplied python is a bit broken in this regard? Zach -- Better than sec? Nothing is better than sec when it comes to monitoring Big Data applications. Try Boundary one-second resolution app monitoring today. Free. http://p.sf.net/sfu/Boundary-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Better than sec? Nothing is better than sec when it comes to monitoring Big Data applications. Try Boundary one-second resolution app monitoring today. Free. http://p.sf.net/sfu/Boundary-dev2dev___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Better than sec? Nothing is better than sec when it comes to monitoring Big Data applications. Try Boundary one-second resolution app monitoring today. Free. http://p.sf.net/sfu/Boundary-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Scatter plot with a specific size per point
I'd like to display a scatter plot where the size for each element is fixed. Currently, when I modify the size of the figure, the size of a marker is fixed, and I would like it to be proportional to the window. I want this because the size of the marker indicates an extent, and I would like it to confirm that the extents correctly cover the other points. If it's truly an extent, you might be better off drawing polygons of the extent boundaries in the graph's coordinate system -- then things will scale as you desire. This will require digging down a bit into the object API -- make a new matplotlib.collections.PolyCollection (or RegularPolyCollection), and add it to your axes with Axes.add_collection(). Zach -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] hooks for additional axis customization?
Hi all, There are a couple of properties I'd like my plot axes to have by default (tick2On=False for the x and ytics, and having no 'right' or 'top' spines). These seem a bit obscure to put into the rcparams, but it would be nice to not have to call some function to fix this up every time I make a new set of axes. Is there a good way to get this to happen automatically? Some sort of callback I can register? Or would I need to subclass Axes and monkeypatch that in as the default or something? Any suggestions welcome! Zach -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] problem with font-family lists?
Or, more likely, PEBCAK, but here goes: Following along with this example: http://matplotlib.sourceforge.net/examples/api/font_family_rc.html I tried the following (changing to comic sans so that success would be clear): from matplotlib import rcParams rcParams['font.family'] = 'sans-serif' rcParams['font.sans-serif'] = ['Comic Sans MS'] import matplotlib.pyplot as plt fig = plt.figure() ax = fig.add_subplot(111) ax.plot([1,2,3], label='test') ax.legend() plt.show() However, the above does not result in Comic Sans on the plot... (Thank god, but still, that doesn't seem correct wrt the stated behavior from the example.) The below, however, does get comic sans: from matplotlib import rcParams rcParams['font.family'] = 'Comic Sans MS' import matplotlib.pyplot as plt fig = plt.figure() ax = fig.add_subplot(111) ax.plot([1,2,3], label='test') ax.legend() plt.show() Is this a known issue / feature / mis-comprehension on my part? Otherwise I'll try digging through the code to find the problem. Thanks, Zach -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] loss of 3d plot interactivity after cla()?
For posterity, Ben Root let me know off-list that the interaction bug is fixed in the soon-to-be-released v 1.1.1. Also, regarding documentation, I mentioned to Ben and I'll mention here too that I'd be happy to help out where I can with what sort of information would be helpful for getting people in my position (tons of python knowledge, but almost none of matlab) up and running with matplotlib -- which as of now seems to rely on similarity-with-matlab for getting new users started. I'm obviously not the right person to write new docs, but if there's any other way I can help, I'd be happy to. Zach On Mar 16, 2012, at 5:34 PM, Zachary Pincus wrote: Hi all, I'm (finally) getting started with matplotlib, and am enjoying the lovely plot quality. However, as a non-matlab user, I'm finding it *extremely* difficult to figure out how to do even the simplest tasks / understand the code samples. (e.g. what is the '111' in the boilerplate calls to add_subplot() in the various examples? I couldn't find anything in the docs, and had to resort to the matlab documentation!) Anyhow, I've soldiered on, and have run across an issue that I don't know if is related to my non-comprehension of the right syntax, a bug in the Axes3D code, or a problem with the MacOSX backend. Here's code to duplicate the issue (Python 2.7, OS X 10.7, matplotlib 1.1.0, via pre-built installer): import matplotlib as mpl mpl.use('macosx') import matplotlib.pyplot as plt plt.ion() from mpl_toolkits.mplot3d import Axes3D fig = plt.figure() ax = fig.gca(projection='3d') ax.plot([1,2,3], [2,3,2], [2,5,7]) # draws immediately!? ax.cla() # plt.cla() has same effect ax.plot([1,2,3], [2,3,2], [2,5,7]) # doesn't draw? plt.draw() # now draws, but z-order is messed up -- grid lines on top? # And worse, now figure can't be interactively rotated with the mouse Nothing can restore interactivity short of making a new figure, or calling fig.clf() (which I *randomly* happened on), and then making a new set of axes. Is this a known issue? Am I doing something wrong -- is ax.cla() or plt.cla() the wrong thing to clear the figure? Thanks a lot, Zach -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] OSX: need testing
If you can test and confirm that you can build and use mpl normally with this patch, please respond with a python version and OSX version that you tested with. Some of the fixes were python3 specific, so if you also can test this against matplotlib master and python3, that would be great. Builds and (appears to) work fine on 10.7 with python 2.7, using the latest code from the github master. Zach -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] OSX: need testing
Just to be clear, this code is not in github master. I assume you have a checkout of master and then dropped the attached _macosx.m into your src for before building and testing? Yes, precisely. Checked out master, dropped the attached into src (and made sure that git diff showed a some changes in that file), and compiled without error. Zach -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] loss of 3d plot interactivity after cla()?
I'm (finally) getting started with matplotlib, and am enjoying the lovely plot quality. However, as Finally getting started? You were one of our first contributors! http://sourceforge.net/mailarchive/message.php?msg_id=5192900 Heh. Well, now I'm actively trying to use it as a plotting library rather than a great place to snag code from for my own projects :) The 111, and the numbering scheme in general, is covered in the pyplot tutorial http://matplotlib.sourceforge.net/users/pyplot_tutorial.html#working-with-multiple-figures-and-axes and in the subplots API docs http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.subplot but it looks like the Figure.add_subplot docs could use some improvement here to explain the numbering scheme better (as pyplot.subplot does) http://matplotlib.sourceforge.net/api/figure_api.html#matplotlib.figure.Figure.add_subplot Aah, thanks for the pointers! I realize that it's hard to keep all the docs spiffy when there are a couple of different ways to get the various bits of functionality. I'll go more thoroughly through the pyplot tutorial... Thanks again, Zach -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] loss of 3d plot interactivity after cla()?
Hi all, I'm (finally) getting started with matplotlib, and am enjoying the lovely plot quality. However, as a non-matlab user, I'm finding it *extremely* difficult to figure out how to do even the simplest tasks / understand the code samples. (e.g. what is the '111' in the boilerplate calls to add_subplot() in the various examples? I couldn't find anything in the docs, and had to resort to the matlab documentation!) Anyhow, I've soldiered on, and have run across an issue that I don't know if is related to my non-comprehension of the right syntax, a bug in the Axes3D code, or a problem with the MacOSX backend. Here's code to duplicate the issue (Python 2.7, OS X 10.7, matplotlib 1.1.0, via pre-built installer): import matplotlib as mpl mpl.use('macosx') import matplotlib.pyplot as plt plt.ion() from mpl_toolkits.mplot3d import Axes3D fig = plt.figure() ax = fig.gca(projection='3d') ax.plot([1,2,3], [2,3,2], [2,5,7]) # draws immediately!? ax.cla() # plt.cla() has same effect ax.plot([1,2,3], [2,3,2], [2,5,7]) # doesn't draw? plt.draw() # now draws, but z-order is messed up -- grid lines on top? # And worse, now figure can't be interactively rotated with the mouse Nothing can restore interactivity short of making a new figure, or calling fig.clf() (which I *randomly* happened on), and then making a new set of axes. Is this a known issue? Am I doing something wrong -- is ax.cla() or plt.cla() the wrong thing to clear the figure? Thanks a lot, Zach -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Compiler error on OS X 10.5.2 in agg
Zachary Pincus wrote: Can you tell me where you specified the -Os option to gcc to escape the problem? So the compile that command that failed is printed right above the error message it generated. (The long line that starts with 'gcc' ...). I just copied this command, edited the -O3 to an -Os, and pasted that command-line back into the terminal. Total low-tech hack, as I didn't want to much with the setup.py file to fix compile flags on a per-file basis. After that file is compiled manually, you can re-run 'python setup.py build', and it will start up at the next step after the error. I got the same error in another step, which was a bit trickier to fix, because for some reason, src/_image.cpp gets copied to src/image.cpp on a temporary basis, and then compiled. (I presume the file isn't also modified?) But after the compile errors out, the copy is deleted, so just pasting in the offending gcc command doesn't work. So I had to manually copy src/_image.cpp to scr/image.cpp, and then paste in the modified gcc command. Ugh! I'd really love some help reducing this to a test case that I can send to Apple. I've got the same error(s) in the same situation (10.5.2). I haven't seen it any other context nor have had any success in reducing to a test case, alas. Could this have to do with picking up libraries (from fink or elsewhere) and/or different compiler versions? I've got XCode 3 and gcc 4.0. (I've actually got the apple 4.2 preview release as well but that craps out even earlier, I assume due to library version mismatches...) I'm pretty sure what I'm seeing isn't from Fink or other library versions -- this was on a pretty clean 10.5 install. I'm using a custom-built Python 2.5.2 instead of Apple's, so that required installing a new version of readline, but other than that, the system is plain vanilla. Has nobody else built matplotlib from source on 10.5.2 lately? Zach Zach On Mar 13, 2008, at 12:16 PM, Stephane Raynaud wrote: Hi, I got the same problem. Can you tell me where you specified the -Os option to gcc to escape the problem? On Mon, Mar 10, 2008 at 4:35 AM, Zachary Pincus [EMAIL PROTECTED] wrote: Hello, I just tried to compile the SVN head of matplotlib (r4994) from source on OS X 10.5.2 (with source builds of python 2.5.2 and the SVN head of numpy), and ran into an internal compiler error in the agg code. (pkgconfig 0.23 and wxPython 2.8.7.1 also present and accounted for.) Here's the compile line and error: building 'matplotlib.backends._backend_agg' extension gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno- fused- madd -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict- prototypes -I/Library/Frameworks/Python.framework/Versions/2.5/ lib/ python2.5/site-packages/numpy/core/include -I/usr/X11/include/ libpng12 -I/usr/local/include -I/usr/include -I/usr/X11R6/ include - I. -I/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/ site-packages/numpy/core/include -Isrc -Iagg24/include -I. -I/usr/ X11/include/freetype2 -I/usr/X11/include -I/usr/local/include -I/ usr/ include -I/usr/X11R6/include -I. -I/Library/Frameworks/ Python.framework/Versions/2.5/include/python2.5 -c src/ _image.cpp -o build/temp.macosx-10.4-i386-2.5/src/_image.o cc1plus: warning: command line option -Wstrict-prototypes is valid for C/ObjC but not for C++ src/_image.cpp: In member function 'Py::Object _image_module::from_images(const Py::Tuple)': src/_image.cpp:842: error: insn does not satisfy its constraints: (insn 2573 1070 2574 126 agg24/include/agg_color_rgba.h:268 (set (mem:QI (plus:SI (reg/f:SI 6 bp) (const_int -280 [0xfee8])) [0 SR.2969+0 S1 A8]) (reg:QI 5 di)) 56 {*movqi_1} (nil) (nil)) src/_image.cpp:842: internal compiler error: in reload_cse_simplify_operands, at postreload.c:391 Please submit a full bug report, with preprocessed source if appropriate. See URL:http://developer.apple.com/bugreporter for instructions. This seems to be an agg and OS X error; it's cropped up here: http://trac.osgeo.org/mapserver/ticket/2368 and John Hunter reported it on the agg list here: http://article.gmane.org/gmane.comp.graphics.agg/3963 Unfortunately, the error appears to either not have been fixed by the 10.5.1 update, as suggested in the email thread cited above, or the error re-appeared in 10.5.2. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - This SF.net email is sponsored by: Microsoft
Re: [Matplotlib-users] Compiler error on OS X 10.5.2 in agg
Hi Stephane, [CC'd to the matplotlib-users list in case others will find this useful.] I got the same problem. Can you tell me where you specified the -Os option to gcc to escape the problem? So the compile that command that failed is printed right above the error message it generated. (The long line that starts with 'gcc' ...). I just copied this command, edited the -O3 to an -Os, and pasted that command-line back into the terminal. Total low-tech hack, as I didn't want to much with the setup.py file to fix compile flags on a per-file basis. After that file is compiled manually, you can re-run 'python setup.py build', and it will start up at the next step after the error. I got the same error in another step, which was a bit trickier to fix, because for some reason, src/_image.cpp gets copied to src/image.cpp on a temporary basis, and then compiled. (I presume the file isn't also modified?) But after the compile errors out, the copy is deleted, so just pasting in the offending gcc command doesn't work. So I had to manually copy src/_image.cpp to scr/image.cpp, and then paste in the modified gcc command. Ugh! I'd really love some help reducing this to a test case that I can send to Apple. Zach On Mar 13, 2008, at 12:16 PM, Stephane Raynaud wrote: Hi, I got the same problem. Can you tell me where you specified the -Os option to gcc to escape the problem? On Mon, Mar 10, 2008 at 4:35 AM, Zachary Pincus [EMAIL PROTECTED] wrote: Hello, I just tried to compile the SVN head of matplotlib (r4994) from source on OS X 10.5.2 (with source builds of python 2.5.2 and the SVN head of numpy), and ran into an internal compiler error in the agg code. (pkgconfig 0.23 and wxPython 2.8.7.1 also present and accounted for.) Here's the compile line and error: building 'matplotlib.backends._backend_agg' extension gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno- fused- madd -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict- prototypes -I/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/numpy/core/include -I/usr/X11/include/ libpng12 -I/usr/local/include -I/usr/include -I/usr/X11R6/include - I. -I/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/ site-packages/numpy/core/include -Isrc -Iagg24/include -I. -I/usr/ X11/include/freetype2 -I/usr/X11/include -I/usr/local/include -I/ usr/ include -I/usr/X11R6/include -I. -I/Library/Frameworks/ Python.framework/Versions/2.5/include/python2.5 -c src/_image.cpp -o build/temp.macosx-10.4-i386-2.5/src/_image.o cc1plus: warning: command line option -Wstrict-prototypes is valid for C/ObjC but not for C++ src/_image.cpp: In member function 'Py::Object _image_module::from_images(const Py::Tuple)': src/_image.cpp:842: error: insn does not satisfy its constraints: (insn 2573 1070 2574 126 agg24/include/agg_color_rgba.h:268 (set (mem:QI (plus:SI (reg/f:SI 6 bp) (const_int -280 [0xfee8])) [0 SR.2969+0 S1 A8]) (reg:QI 5 di)) 56 {*movqi_1} (nil) (nil)) src/_image.cpp:842: internal compiler error: in reload_cse_simplify_operands, at postreload.c:391 Please submit a full bug report, with preprocessed source if appropriate. See URL:http://developer.apple.com/bugreporter for instructions. This seems to be an agg and OS X error; it's cropped up here: http://trac.osgeo.org/mapserver/ticket/2368 and John Hunter reported it on the agg list here: http://article.gmane.org/gmane.comp.graphics.agg/3963 Unfortunately, the error appears to either not have been fixed by the 10.5.1 update, as suggested in the email thread cited above, or the error re-appeared in 10.5.2. Changing the optimization flag from -O3 to -Os and compiling _image.cpp manually (along with copying src/_image.cpp to src/ image.cpp and compiling that manually in the same way) allowed me to finish building matplotlib, but clearly an optimized agg image library is pretty important... (-O2 didn't work...) Anyone have any idea at all about this error? Or is just turning off - O3 for this file the best thing to do until Apple fixes the compiler bug? Does anyone who knows more about agg than I want to try to reduce this to a test case? Zach Pincus Postdoctoral Fellow Molecular, Cellular, and Developmental Biology Yale University - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Stephane Raynaud - This SF.net email is sponsored by: Microsoft Defy all challenges
Re: [Matplotlib-users] Compiler error on OS X 10.5.2 in agg
For what it's worth, the standalone agg 2.4 library compiles just fine on my system -- this problem seems to be some sort of matplotlib / agg interaction. Zach On Mar 9, 2008, at 11:35 PM, Zachary Pincus wrote: Hello, I just tried to compile the SVN head of matplotlib (r4994) from source on OS X 10.5.2 (with source builds of python 2.5.2 and the SVN head of numpy), and ran into an internal compiler error in the agg code. (pkgconfig 0.23 and wxPython 2.8.7.1 also present and accounted for.) Here's the compile line and error: building 'matplotlib.backends._backend_agg' extension gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused- madd -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict- prototypes -I/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/numpy/core/include -I/usr/X11/include/ libpng12 -I/usr/local/include -I/usr/include -I/usr/X11R6/include - I. -I/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ site-packages/numpy/core/include -Isrc -Iagg24/include -I. -I/usr/ X11/include/freetype2 -I/usr/X11/include -I/usr/local/include -I/usr/ include -I/usr/X11R6/include -I. -I/Library/Frameworks/ Python.framework/Versions/2.5/include/python2.5 -c src/_image.cpp -o build/temp.macosx-10.4-i386-2.5/src/_image.o cc1plus: warning: command line option -Wstrict-prototypes is valid for C/ObjC but not for C++ src/_image.cpp: In member function ‘Py::Object _image_module::from_images(const Py::Tuple)’: src/_image.cpp:842: error: insn does not satisfy its constraints: (insn 2573 1070 2574 126 agg24/include/agg_color_rgba.h:268 (set (mem:QI (plus:SI (reg/f:SI 6 bp) (const_int -280 [0xfee8])) [0 SR.2969+0 S1 A8]) (reg:QI 5 di)) 56 {*movqi_1} (nil) (nil)) src/_image.cpp:842: internal compiler error: in reload_cse_simplify_operands, at postreload.c:391 Please submit a full bug report, with preprocessed source if appropriate. See URL:http://developer.apple.com/bugreporter for instructions. This seems to be an agg and OS X error; it's cropped up here: http://trac.osgeo.org/mapserver/ticket/2368 and John Hunter reported it on the agg list here: http://article.gmane.org/gmane.comp.graphics.agg/3963 Unfortunately, the error appears to either not have been fixed by the 10.5.1 update, as suggested in the email thread cited above, or the error re-appeared in 10.5.2. Changing the optimization flag from -O3 to -Os and compiling _image.cpp manually (along with copying src/_image.cpp to src/ image.cpp and compiling that manually in the same way) allowed me to finish building matplotlib, but clearly an optimized agg image library is pretty important... (-O2 didn't work...) Anyone have any idea at all about this error? Or is just turning off - O3 for this file the best thing to do until Apple fixes the compiler bug? Does anyone who knows more about agg than I want to try to reduce this to a test case? Zach Pincus Postdoctoral Fellow Molecular, Cellular, and Developmental Biology Yale University - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Compiler error on OS X 10.5.2 in agg
Hello, I just tried to compile the SVN head of matplotlib (r4994) from source on OS X 10.5.2 (with source builds of python 2.5.2 and the SVN head of numpy), and ran into an internal compiler error in the agg code. (pkgconfig 0.23 and wxPython 2.8.7.1 also present and accounted for.) Here's the compile line and error: building 'matplotlib.backends._backend_agg' extension gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused- madd -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict- prototypes -I/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/numpy/core/include -I/usr/X11/include/ libpng12 -I/usr/local/include -I/usr/include -I/usr/X11R6/include - I. -I/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ site-packages/numpy/core/include -Isrc -Iagg24/include -I. -I/usr/ X11/include/freetype2 -I/usr/X11/include -I/usr/local/include -I/usr/ include -I/usr/X11R6/include -I. -I/Library/Frameworks/ Python.framework/Versions/2.5/include/python2.5 -c src/_image.cpp -o build/temp.macosx-10.4-i386-2.5/src/_image.o cc1plus: warning: command line option -Wstrict-prototypes is valid for C/ObjC but not for C++ src/_image.cpp: In member function ‘Py::Object _image_module::from_images(const Py::Tuple)’: src/_image.cpp:842: error: insn does not satisfy its constraints: (insn 2573 1070 2574 126 agg24/include/agg_color_rgba.h:268 (set (mem:QI (plus:SI (reg/f:SI 6 bp) (const_int -280 [0xfee8])) [0 SR.2969+0 S1 A8]) (reg:QI 5 di)) 56 {*movqi_1} (nil) (nil)) src/_image.cpp:842: internal compiler error: in reload_cse_simplify_operands, at postreload.c:391 Please submit a full bug report, with preprocessed source if appropriate. See URL:http://developer.apple.com/bugreporter for instructions. This seems to be an agg and OS X error; it's cropped up here: http://trac.osgeo.org/mapserver/ticket/2368 and John Hunter reported it on the agg list here: http://article.gmane.org/gmane.comp.graphics.agg/3963 Unfortunately, the error appears to either not have been fixed by the 10.5.1 update, as suggested in the email thread cited above, or the error re-appeared in 10.5.2. Changing the optimization flag from -O3 to -Os and compiling _image.cpp manually (along with copying src/_image.cpp to src/ image.cpp and compiling that manually in the same way) allowed me to finish building matplotlib, but clearly an optimized agg image library is pretty important... (-O2 didn't work...) Anyone have any idea at all about this error? Or is just turning off - O3 for this file the best thing to do until Apple fixes the compiler bug? Does anyone who knows more about agg than I want to try to reduce this to a test case? Zach Pincus Postdoctoral Fellow Molecular, Cellular, and Developmental Biology Yale University - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users