Re: [Matplotlib-users] [newbie] live plots of multiple lines
Hello Chris, you may try something like plot([x1], [y1], bo, [x2], [y2], r+) or you have to iterate through your data. best regards Matthias On Friday 07 March 2008 10:11, Chris Withers wrote: Hi All, Apologies if I'm missing anything obvious... How do I plot lines point-by-point as opposed to by passing arrays? I'm guessing something like: plot([x],[y]) ...but that feels a bit weird to me. In any case, using that, I don't know how to plot more than one line at a time, so thought I'd ask here... Hope you can help! cheers, Chris - 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
Re: [Matplotlib-users] problem with figure toolbar
Hello, I'm not sure if there is a nicer way to do what you want and I understand correctly what you want to do, but as a workaround I would recommand you the following: use the mainloop-mode after show and an event to rearch a function, which includes a raw_input to input text from the shell like import pylab def myfunc(event): txt = raw_input( input a string : ) print The string %s was recognized and will be executed % (txt) exec(txt) pylab.draw() pylab.figure() pylab.axes() pylab.connect(key_press_event, myfunc) # call myfunc after a key press event pylab.show() you can end the mainloop by closing the figure. best regards Matthias On Sunday 02 March 2008 13:31, linzhenhua wrote: Hello,all I have a problem with matplotlib. The numpy and matplotlib versions are all the newest versions. First,if I want to plot a figure,I can type several command,finally use the show() command,everything seems well,but I have to use the Ctrl+c to stop the show() to go further. And I know I can use the interactive mode.So first I use ion(),then use the plot command to plot figure and draw() command to update the figure,but in this case ,the figure toolbar is not visible on the figure and I can not use it.However if I run the show() command then the figure toolbar appear and I can control the figure using the toolbar. I wonder whether I can take advantage of the figure toolbar and the command line at the same time or not ? Best wishes. - 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
Re: [Matplotlib-users] wx backend scaling problem
Well, that was a good puzzle! It turns out that in the Wx backends, the figure is created at the correct (requested) size, and then immediately the height is shrunk by 25 pixels (at least on my platform) when the status bar is added to the window. By creating the status bar before the figure canvas I was able to prevent this from happening. This seems like a safe fix to me, but anyone who currently extends the Wx Frame (meaning the whole window etc.) and is unknowingly compensating for this effect may have problems after my change. Committed on the maintenance branch in r4997. http://matplotlib.svn.sourceforge.net/viewvc/matplotlib?view=revrevision=4997 BTW, I also committed the fix for the range of values in figure.subplot.* here: http://www.nabble.com/Re%3A-pylab-axis-query-and-possible-bug-p14459682.html to the maintenance branch (it was previously only made to the trunk.) Cheers, Mike Gary Ruben wrote: Gary Ruben wrote: The attached test.py Oops. Here it is. Gary R. - 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 -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA - 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] Major Issue with 0.91.2 and Python-2.5
I upgraded my notebook to Slackware-12.0 (which includes python-2.5) and discovered that the application I'm developing no longer ran. Turns out that matplotlib went missing during the upgrade. So, I just built matplotlib-0.91.2 using the same matplotlib.Slackbuild script I used on my workstation/server, but this time it failed. The font manager seems to be the issue; the error message repeatedly is: Found an unknown keyword in AFM header (was Underline). Specifically, the error is in File /usr/lib/Python2.5/site-packages/matplotlib/afm.py, line 166, in _parse_char_metrics name=vals[2].split()[1] IndexError: List index out of range Is this unique to me? What do I do to fix the problem? TIA, Rich -- Richard B. Shepard, Ph.D. | IntegrityCredibility Applied Ecosystem Services, Inc.|Innovation http://www.appl-ecosys.com Voice: 503-667-4517 Fax: 503-667-8863 - 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
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