[Matplotlib-users] idea for a matplotlib figure contest (in memoriam John Hunter)
Hi all, Shocked by news of John Hunter's untimely severe health problems and now death, I have been thinking about what we could do as a community to 1) fuel matplotlib to further heights and 2) give everyone, but especially John's family, some appreciation for how wide, and ongoing, his impact is. To those ends, I envision an MPL figure contest. I have a lot of ideas about the shape such a contest could take (it could be an annual event, have multiple categories, have corporate sponsored prizes, and so on). Ultimately, however, I simply don't have the time to organize the contest myself. I do see this as an ideal project for someone who wants to contribute to the MPL community without necessarily requiring in-depth technical skills. Consequently, I'm floating this idea here, and I hope someone in the community can run with it. You would certainly have figure submissions from my lab! Best regards, Andrew -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] missing module docs
John Hunter wrote: On Mon, Feb 22, 2010 at 1:44 PM, Ben Axelrod baxel...@coroware.com mailto:baxel...@coroware.com wrote: I noticed that there are many modules in the current code base that are not listed at: http://matplotlib.sourceforge.net/modindex.html. I understand that a few are new files and that the documentation for these will be generated during the next release. But I know that most of these were in the last release so should have had their documentation generated. Am I missing something? Can the documentation for these modules be found somewhere else? You're not missing anything in terms of the html/pdf docs. When we converted our documentation build system to sphinx/rest, we had to convert our docstrings to rest as well. We made good headway for a while but the progress has stalled. To add a module to the documentation system, you need to Also, it's worth nothing that the docs from svn head are automatically compiled and uploaded from svn on each commit: HTML: http://matplotlib.sourceforge.net/trunk-docs/index.html PDF: http://matplotlib.sourceforge.net/trunk-docs/Matplotlib.pdf -Andrew -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] line drawing bug or it's me doing something wrong?
Paweł Rumian wrote: 2010/1/14 Michael Droettboom md...@stsci.edu: What backend are you using? Agg, Cairo and Wx all check out for me. The examples you point to don't look like Agg output to me... The examples were produced using savefig and PNG, but I've tried GTK and Qt with Agg and Cairo - neither of them works. Do you have anything in your matplotlibrc? Nothing but the backend... I've just noticed that the green line shows sometimes when moving the plot. Quick examples: no move: http://img524.imageshack.us/img524/5696/61571712.png slightly right (no change): http://img94.imageshack.us/img94/6722/44916983.png more (green line appears): http://img27.imageshack.us/img27/522/91772530.png even more (disappears behind the edge): http://img246.imageshack.us/img246/9726/24229795.png to the right (another part suddenly appears): http://img190.imageshack.us/img190/5697/69412483.png still no idea... Hi Paweł, to repeat a point that may have been lost in Michael's first email, some code that produces the problem will be greatly useful in tracking down what's going on. -Andrew -- Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Ratio of a plot using matplotlib
Yagua Rovi wrote: I use matplotlib since two days only. I have done some things pretty good but I am now in front of a problem an I didn't found a solution in the documentation. I would like to draw the surface defined by the lists X, Y and the matrix Z. I get to a nice graphical output with the following code. My problem is that the labels on the axes indicate values corresponding to the indices in Tables X and Y or something like that. I would like to see the values between xmin and xmax, ymin and ymax. If I uncomment the lines set_xlim and set_ylim, the axes are properly represented, but the picture is shrinked into a corner. How to put the good values on the axes and correct the image full screen and correct scale ? I think you want the extent kwarg to imshow. See http://www.scipy.org/Plotting_Tutorial for one example. -- Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] An other question about matplotlib
Yagua Rovi wrote: Hello Andrew, For the same need as the previous message, I try to display in colour a given surface based with on polar coordinates. Z = f (r, theta) Can you show me which function I have to use? I don't know what to do with polar (theta, r) function. Is there an option for imshow ? I don't see an example like that in the demo gallery of matplotlib. Perhaps it is not possible, but I don't believe there is a lot of things impossible with matplotlib ! :-) Thank you for your valuable help. Hi Yagua -- this is not possible with imshow, which is for Cartesian, rectangular data. Maybe you could transform your data points into Cartesian coordinates and then use pcolor. Also, you could resample your data onto Cartesian coordinates using the griddata() function (see http://matplotlib.sourceforge.net/api/mlab_api.html#matplotlib.mlab.griddata ) and then use imshow again. -Andrew -- Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] feature discussion/request: a 'layout' command for matplotlib
per freem wrote: hi all, i am a *huge fan* of matplotlib and use it for all plotting. one feature that i would find extremely useful that i believe is missing (but am very open to being corrected in case i overlooked something) is a way to define the layout of complex subplots. by this i mean something like R's layout command, which allows you to nearly arbitrarily arrange the subplots of a figure. this command is much more general than subplot since it does not restrict you to square arrangements of figure subplots. for examples, check out these figures/examples: 1. source code of complex layout: http://rgraphics.limnology.wisc.edu/rmargins_layout.php (the associated graph it produces is here: http://rgraphics.limnology.wisc.edu/images/layouts/rmargins_layout_thumb.png) 2. a tutorial on complex layouts with this command: http://www.statmethods.net/advgraphs/layout.html in particular, see: http://www.statmethods.net/advgraphs/images/layout3a.png where a complex layout which is currently not possible with subplot is made. a command like R's layout would be a tremendously helpful addition to matplotlib, in my opinion. it will prevent the need for annoying manual postprocessing of figures into these layouts using tools like Illustrator, since these figures could be generated programmatically instead, which much more precision. as far as i know, this cannot be done in matplotlib right now, without plotting your own axes (using some combination of axes grid toolkit and raw axes plotting.) if anyone out there has written some kind of wrappers that do something like the layout command, i would love to know about it. if it's still in testing and not part of the current matplotlib, i'd be more than happy to beta test this for anyone and try it on many examples. Hi Per, I wrote two things that may be of interest to you. This first is mplsizer, based on the wx layout model, and works live (with a figure open in a GUI) as well as for saving to disk. See the demo directory for, well, some demos. I haven't been using this too much lately, but it still works as well as it ever did AFAIK. There is a trivial bit of documentation and a copy of the source at http://github.com/astraw/mplsizer The second is svg_stack. This is used as a post-processing step that requires saving my figures as svg files and then composing them with this tool. There is some minimal documentation and the source at http://github.com/astraw/svg_stack . The nice thing with svg_stack is that you can use svg files from other sources (i.e. not just matplotlib). Also, everything can be manually adjusted in Inkscape, which itself has nice command-line export to .png and .pdf capabilities. -Andrew -- This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] feature discussion/request: a 'layout' command for matplotlib
Gael Varoquaux wrote: On Sun, Jan 10, 2010 at 07:32:27AM -0800, Andrew Straw wrote: This first is mplsizer, based on the wx layout model, and works live (with a figure open in a GUI) as well as for saving to disk. See the demo directory for, well, some demos. I haven't been using this too much lately, but it still works as well as it ever did AFAIK. There is a trivial bit of documentation and a copy of the source at http://github.com/astraw/mplsizer Any interest in merging this in as an mpl_toolkit? It already is. :) Any interest in writing docs and advertising it? -- This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] making inset graphs (small graph inside larger graph?)
per freem wrote: Hi all, I was hoping someone could point to an example of making inset graphs, where a small graph appears inside of a large graph. For example i want to make a line plot (using plot) and then embed a bar graph (using bar) inside it. how can i do that? http://matplotlib.sourceforge.net/examples/pylab_examples/axes_demo.html -- This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] incorrect boxplot?
Robert Kern wrote: On 2009-09-14 13:49 PM, Gökhan Sever wrote: On Mon, Sep 14, 2009 at 12:30 PM, jason-s...@creativetrax.com mailto:jason-s...@creativetrax.com wrote: I tried the following (most output text is deleted): In [1]: ob1=[1,1,2,2,1,2,4,3,2,2,2,3,4,5,6,7,8,9,7,6,4,5,5] In [2]: import matplotlib.pyplot as plt In [3]: plt.figure() In [4]: plt.boxplot(ob1) In [5]: plt.savefig('test.png') In [6]: import scipy.stats In [7]: scipy.stats.scoreatpercentile(ob1,75) Out[7]: 5.5 Note that the 75th percentile is 5.5. R agrees with this calculation. However, in the boxplot, the top of the box is around 6, not 5.5. Isn't the top of the box supposed to be at the 75th percentile? Thanks, Jason -- Jason Grout From matplotlib/lib/matplotlib/axes.py You can see how matplotlib calculating percentiles. And yes it doesn't conform with scipy's scoreatpercentile() # get median and quartiles q1, med, q3 = mlab.prctile(d,[25,50,75]) I[36]: q1 O[36]: 2.0 I[37]: med O[37]: 4.0 I[38]: q3 O[38]: 6.0 Could this be due to a rounding? I don't know, but I am curious to hear the explanations for this discrepancy. prctile does not handle the case where the exact percentile lies between two items. scoreatpercentile does. Fixed in r8039. -- This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] matplotlib with Qt4 backend
Celil Rufat wrote: I just installed matplotlib on Snow Leopard 10.6 with the Qt4 backend (via macports). However, when I try one of the Qt4 examles: python /opt/local/share/py26-matplotlib/examples/user_interfaces/embedding_in_qt4.py IOError: [Errno 4] Interrupted system call Any ideas on what could be causing this? Out of curiosity, does anyone know where the signal interrupting the system call is originating? Is this a standard communication mechanism within Qt4? (I have never used Qt4.) I'm interested in knowing about OSS that use signals as a means of across-thread or across-process communication. -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] matplotlib with Qt4 backend
Robert Kern wrote: On 2009-11-12 12:05 PM, Andrew Straw wrote: Celil Rufat wrote: I just installed matplotlib on Snow Leopard 10.6 with the Qt4 backend (via macports). However, when I try one of the Qt4 examles: python /opt/local/share/py26-matplotlib/examples/user_interfaces/embedding_in_qt4.py IOError: [Errno 4] Interrupted system call Any ideas on what could be causing this? Out of curiosity, does anyone know where the signal interrupting the system call is originating? Is this a standard communication mechanism within Qt4? (I have never used Qt4.) I'm interested in knowing about OSS that use signals as a means of across-thread or across-process communication. This problem arises when signal handlers are installed, not necessarily when a signal itself is sent (dtrace doesn't detect any). Hmm, but a system call isn't going to get interrupted and return EINTR by any means other than a signal. So the OP must have had a signal interrupting the call and it must have come from somewhere. Or... am I wrong? PyQt4 doesn't do it, but I think something in QApplication does. I really don't know what, though. Here are the files that call signal(3) or sigaction(3): ./src/3rdparty/freetype/src/tools/ftrandom/ftrandom.c ./src/3rdparty/phonon/qt7/quicktimevideoplayer.mm ./src/3rdparty/sqlite/shell.c ./src/3rdparty/webkit/JavaScriptCore/jsc.cpp ./src/corelib/io/qfilesystemwatcher_dnotify.cpp ./src/corelib/io/qprocess_unix.cpp ./src/corelib/kernel/qcrashhandler.cpp ./src/corelib/kernel/qeventdispatcher_unix.cpp ./src/gui/embedded/qwindowsystem_qws.cpp ./src/gui/embedded/qwssignalhandler.cpp ./tools/qvfb/main.cpp It's not obvious to me that any of these are activated on OS X (the qcrashhandler.cpp file is intriguing, but it only seems to be used in the X11 QApplication). dtrace doesn't actually show either signal(3) or sigaction(3) being called at all. Actually, running a program under dtrace while probing those functions makes the problem go away. Sometimes. Ahh, a fun Heisenbug. OK, well if I decide to look for programs that use signals as a means of communication, I'll investigate Qt further. I asked because there's a proprietary library I'm forced to use that does communicate internally with signals. It's a real pain, however, because it means anything else in that process also gets hit with signals and so system calls must be EINTR safe. -Andrew -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] mplot3d: plot_surface() and contour on grid?
Matthias Michler wrote: Hello list, I'm not an expert in axes3d, but in case the feature which Nicolas requested is not possible in an easy manner up to now, I propose an additional kwarg for axes3d.Axes3D.contour. Something like *offset*. If offset is None the z-values of the contour lines corresponds to given Z and otherwise offset is used for the z-values of the contour lines. I attached a changed axes3d.py and a patch against current svn. The result is illustrated in the contour3d_demo.png. Could any of the experts have a look at it and tell me if this could be useful, please? Thanks in advance for any comments. Kind regards Matthias On Wednesday 30 September 2009 19:22:42 Nicolas Bigaouette wrote: Hi, I have a nice plot_surface() using mplot3d (see attachement). I'd like to project the surface on the axis xoy, xoz and yoz with a contour, similar to this figure: http://homepages.ulb.ac.be/~dgonze/INFO/matlab/fig19.jpg Is it possible using matplotlib and mplot3d? Thanx! Hi Matthias, I committed your patch to a github branch of MPL, but I'll let Reinier actually commit something based on this to MPL. http://github.com/astraw/matplotlib/tree/dev/michler-3d-contourf-offsets -Andrew -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Contouring on triangular grids
Ian Thomas wrote: I've written some code to perform contouring on triangular grids. I wrote the underlying C++ for a separate project, but as there has been some interest on the mpl mailing lists for such functionality I've had a go at wrapping it up as a python module so that it is available from mpl. I've also added a few utility functions for plotting triangular grids, doing pseudocolour plots, etc. Hi Ian, Thanks for this. I haven't had a chance to look at your code -- can you elaborate on the approach you took versus natural neighbors interpolation, as available through the mlab.griddata function? (See examples/pylab_examples/griddata_demo.py for an example apparently similar to yours.) -Andrew -- Come build with us! The BlackBerryreg; Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9#45;12, 2009. Register now#33; http://p.sf.net/sfu/devconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] violin plots
Flávio Coelho has implemented Violin plots for MPL. Nice! He has a question regarding its suitability for inclusion due to a dependency on scipy for the gaussian_kde function. http://pyinsci.blogspot.com/2009/09/violin-plot-with-matplotlib.html Is there a place this could live in the MPL code base without requiring scipy? Perhaps we should just include it as a demo. I note that examples/pylab_examples/demo_agg_filter.py requires scipy, too. Thanks Flávio for sharing -- I have occasionally wondered how my data would look in a violin plot. -Andrew -- Come build with us! The BlackBerryreg; Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9#45;12, 2009. Register now#33; http://p.sf.net/sfu/devconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] [job] top-flight graphicist needed for climate science media group
I am posting this for a friend of mine. Please respond to the email address in the ad if you are interested. -- Forwarded message -- From: *Ben Strauss* bstra...@climatecentral.org mailto:bstra...@climatecentral.org Date: Fri, Sep 11, 2009 at 4:56 PM Subject: [job] top-flight graphicist needed for climate science media group To: matplotlib-users@lists.sourceforge.net mailto:matplotlib-users@lists.sourceforge.net Please apply if interested--or forward to any associates you believe would be good! Much appreciated; this is a very important position for us and we're looking for a real star. Many thanks-- Ben Strauss Associate Director, Strategic Initiatives Climate Central Seeking Immediately: Experienced Graphic Designer for Climate Science Media Group's TV, Web Productions Objective Climate Central seeks an experienced, inspired and technically proficient graphic designer or data visualization expert--ideally versed in both art and science--to develop conceptual and data-driven visualizations from climate science research for broadcast TV and Internet. A group of internationally recognized scientists and communicators, Climate Central is dedicated to producing vivid media based on sound climate change science, and has within its first 18 months already appeared on PBS's The NewsHour with Jim Lehrer, nytimes.com http://nytimes.com/, bloomberg.com http://bloomberg.com/, TIME.com, Newsweek and Scientific American. We will begin this Princeton, NJ position as a 90-day contract; successful performance will lead to full-time hire. Description Climate change presents one of the greatest communications challenges of all time. Many words have been printed, but Climate Central aims to develop an unmatched collection of clear, compelling, and science-based graphics and animations to tell the story visually. We are currently expanding capacity in this area. The Designer will collaborate with staff scientists and producers, as well as design colleagues, to produce static graphics and end-to-end broadcast-quality animated visualizations tailored for a general audience. Each product must be accessible and understandable, yet vivid and scientifically rigorous. The position will involve the development, maintenance, and application of a wide variety of tools for analyzing data and production, with some emphasis on tools for geographical display of information (GIS, Google Earth, Google Maps, generic maps). An important dimension of this position will be working with NASA scientists and satellite data to develop an Earth-from-space “sky witness” collection of climate change visualizations. For a sample of Climate Central's designs and animations to date, see the static graphics and videos at climatecentral.org http://climatecentral.org/. Qualifications Significant experience (5+ years best) in scripting, data conversion, modeling, rendering and compositing, and handling large datasets, is required. Candidate should show initiative and be a self-starter and self-teacher able to work well from high-level direction. We are looking for someone with commitment to excellence, attention to detail, and passion for work and the subject. Applicants should be proficient with the following tools, languages and data formats we regularly use: •Maya, After Effects, Illustrator, Photoshop, Google Earth/Maps •Python, Javascript •ESRI Shapefile, KML ...and it would also be helpful if you are familiar with: •MATLAB/Octave, VTK, Blender, Imagemagick, Gimp, QGIS, GDAL/OGR, NCAR NCL •C/C++ •NetCDF, CSV, HDF To Apply To apply, please send a cover letter, resume and link to your portfolio. We are looking for thoughtful, personalized cover letters that demonstrate applicants' qualifications and work style. Send materials as text in the body of an email message to j...@climatecentral.org mailto:j...@climatecentral.org; please put graphics in the subject line. If you send attachments, they must be in pdf format. No phone calls, please. Salary is competitive and will depend on experience. Climate Central offers excellent benefits, a delightful workplace, and the opportunity to play a crucial role in an organization with a mission. Climate Central is an equal-opportunity employer and does not discriminate based on anything except how good you are at your work. People of color and individuals from other underrepresented groups are strongly encouraged to apply. About Climate Central: Climate Central combines sound science and vivid media to increase public understanding and attention to the climate challenge. In less than two years of operation, our work has already appeared on PBS NewsHour, nytimes.com http://nytimes.com/, bloomberg.com http://bloomberg.com/, time.com http://time.com/, newsweek.com http://newsweek.com/, Scientific American, and beyond. Our staff
Re: [Matplotlib-users] segfault on plot
Dave wrote: I resolved the issue by compiling matplotlib from source on my windows box which I'm happy to report wasn't too difficult! It seems to work for my usual interactive use however it segfaults when running the tests :| http://pastebin.com/m5ee30885 Thanks for running this. To my knowledge, you're the first one to run the new test infrastructure on Windows, so congratulations. :) (I presume you erased the MPL/build directory before compiling to clear out any cruft in there.) Anyhow, I have no clue what's going on. Is there any way you can get a stack trace? And why do you say segfault -- did Windows pop up a dialog? What did it say? One of these days I will try to get a Windows buildslave for the MPL buildbot, -Andrew -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] making quicktime animations from linux
Phil Austin wrote: Andrew Straw wrote: I use:: ffmpeg -r 60 -i frame%05d.png -vcodec wmv2 -b 2000k out.avi That's encouraging, thanks. I tried this and produced http://clouds.eos.ubc.ca/~phil/video/out.avi Just to confirm: the two OSX users down the hall get a missing components message from quicktime when they click on this file in firefox or safari, and are sent to a page that gives an undifferentiated list of extra codecs (divx, etc.). Hmm. It plays fine on QuickTime 7.6.2 on Mac OS X 10.5.7 using Firefox 3.5.2 for me. I don't remember installing any extra codecs for wmv, but I do remember installing the Theora codec. Do I need to tell them to install something like http://www.microsoft.com/windows/windowsmedia/player/wmcomponents.mspx or am I still missing some proprietary codec on my end? I'm happy to post the detailed ffmpeg output if it would provide any clues. Hmm, come to this of it, that does look familiar. I think I installed it at one point. A colleague of mine managed to get .avi files with an mpeg4 codec variant encoded using ffmpeg or mencoder on linux that played in Mac and Windows versions of Adobe Reader and in the linux video players. I don't know whether this also required an additional codec. Apple seems to push the h264 codec, so maybe that would be the best bet on Mac? -Andrew -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] making quicktime animations from linux
I use:: ffmpeg -r 60 -i frame%05d.png -vcodec wmv2 -b 2000k out.avi And this works well to generate movies that play on Windows, Mac and Linux. As a bonus, these movies can be included in Latex/Beamer output using the movies15 package and played within the PDF via Adobe Reader on Mac and Windows. (I'm sure it's just a matter of time before the linux PDF readers can do this, too.) Finally I feel I am near a an end to my cross-platform, doesn't-suck presentation-with-movies quest. I only wish the movie format required to make this possible was less license and patent encumbered... I have been encoding on Ubuntu Jaunty with libraries from mediabuntu. I haven't tested the above using the plain Ubuntu ffmpeg yet. -Andrew Philip Austin wrote: This isn't strictly a matplotlib question, but I'm hoping dual mac/linux users can provide some advice on converting png files to quicktime movies using mencoder on Ubuntu or Centos. So far I've found that 1) starting with http://matplotlib.sourceforge.net/examples/animation/movie_demo.html using mencoder mf://*.png -mf type=png:w=800:h=600:fps=25\ -ovc lavc -lavcopts vcodec=mpeg4 -oac copy -o output.avi produces an avi file that works with Ubuntu/mplayer, but fails with Windows Media Player. 2) changing the codec based on http://pymolwiki.org/index.php/Making_Movies mencoder -mc 0 -noskip -skiplimit 0 -ovc lavc -lavcopts vcodec=msmpeg4v2:vhq mf://*.png -mf type=png:fps=18 -o output.avi works with mplayer and windows media player, but won't play on macs (unless they install vlc). When I try to convert the avi file to quicktime using h264enc -2p -p qt and accepting all defaults it makes it through both passes, gets to converting avi file to mp4 container and exits the - Failed! Any pointers appreciated. I'm open to any linux based solution that produces animations that can be be viewed on all three platforms -- thanks, Phil -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Placing vector eps graphics
jakobg wrote: Hi there, I want to place an eps graphic I created in Inkscape in a plot. The final image is supposed to be a vector eps as well. I looked up the forum but just found the option with the Image (PIL) library which obviously rasterizes my vector image. And I use the Tex option so I cannot just save as SVG and do the compositing stuff in Inkscape. The placing of the image is straight forward and fine documented (with additional axes and imshow), so it is just a problem of importing a eps vector image. I would be very grateful if someone could help me with this issue. It you could save from inkscape as .svg instead of .eps, you might be able to modify Jae-Joon's trick to directly include this svg into a matplotlib-generated svg file. See http://abitofpythonabitofastronomy.blogspot.com/2009/02/mpl-w-svg-filter-again.html . -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] best format for MS word?
Shixin Zeng wrote: Hi, Could someone tell me what's the best format that matplotlib can produce for insertion to MS word? You can try PyEMF. I don't know its status -- it might need some TLC. http://pyemf.sourceforge.net/ -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Axes.frame vs. Axes.spines in SVN Basemap and Matplotlib? (was New contourf()...)
Zane Selvans wrote: Yep, looks like the trunk has fixed the contourf() issue. Unfortunately there also seems to be some new incompatibility with the Basemap toolkit, even after re-installing Basemap from source. I get: AttributeError: Axes.frame was removed in favor of Axes.spines It appears Basemap hasn't caught up with the new Axes.spines usage. Can you change mpl_toolkits/basemap/__init__.py line 1265 from:: ax.frame.set_linewidth(linewidth) to:: for spine in ax.spines.itervalues(): spine.set_linewidth(linewidth) There may be more issues, here -- this is just the first one and based off your traceback. Jeff: I had to drop the Axes.frame to implement spines that could be moved relative to the Axes boundary. I made sure this worked with the custom projection examples in the main MPL distribution, so I imagine it won't take too much to convert basemap. Please see svn r7144, 7145, and 7170 for my changes to lib/matplotlib/projections/geo.py -Andrew -- Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] one data set, two y axis scales
John Hunter wrote: On Thu, Jun 4, 2009 at 12:16 PM, Jae-Joon Leelee.j.j...@gmail.com wrote: I hope the code below gives you some idea. def Tc(Tf): return (5./9.)*(Tf-32) ax1 = subplot(111) # y-axis in F ax2 = twinx() # y-axis in C def update_ax2(ax1): y1, y2 = ax1.get_ylim() ax2.set_ylim(Tc(y1), Tc(y2)) # automatically update ylim of ax2 when ylim of ax1 changes. ax1.callbacks.connect(ylim_changed, update_ax2) ax1.plot([78, 79, 79, 77]) Yes, this is a cute little example. I was thinking along the lines Ryan was, to just plot the same data twice with twinx, but this is cleverer. I added it to svn as: examples/api/fahrenheit_celcius_scales.py But using twinx has always been a hack. I think what we really need is to have each spine have it's own locator, formatter and tick collection (eg the natural points for Celcius ticks are different from the natural points for Fahrenheit ticks) and currently the left and right ticks of an axis share the axis locator and formatter. Currently the spines just draw the lines and the axes/axis handle all the ticks and the locators. It might be more natural to move these into the spine itself, and support independent ticks/locators/formatter for each spine, with the default being shared. Andrew, did you give this any thought in the spine implementation? I am pretty sure it would be hard, but maybe you have a better sense of *how hard*. This would be a nice enhancement. I think this would be a good direction, as well. It would also allow disabling the tick mark labels in some axes that share the same axis -- because the ticks/labels would belong to the spine, which itself wouldn't (necessarily) be shared. I can't promise anything, but this may be a solution to the issues that Jae-Joon pointed out w.r.t loglog plots in the spine implementation (although I suspect they are more general). I'll take a look at it, although I can't say exactly when I'll do so -- hopefully within the coming week. -Andrew -- OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] ANN: matplotlib-0.98.5.3
Adam Mercer wrote: On Wed, May 20, 2009 at 21:25, John Hunter jdh2...@gmail.com wrote: The problem here is that I built the site docs from svn, not the last release. 0.98.6svn is the version stamp from svn. I have mixed feelings about fixing this. On the one hand, there is merit to having the site docs reflect the current stable release. On the other hand, I like pushing people onto svn HEAD, because this is where all the latest features and bugfixes are. By building the site docs from svn, viewers of the gallery and examples directories, as well as the plain-ol-docs, get a peak at what is possible from svn. If they try it and find their latest installation doesn't support it, after complaining on the mailing list they may try installing svn. And that is a plus for mpl, because we have more testers on svn HEAD and more potential developers. That makes sense, however the reason I was asking is that I am the maintainer of the MacPorts matplotlib port and I wanted to a way to check for the latest release, I had been using a regex to the check the latest version as displayed on home page but when this was updated to the svn release this broke. Also as the 0.98.5.3 release is not a specific release but a sub release of 0.98.5 I can't use the sourceforge downloads page to query this. It would be really helpful if a page was provided that listed the latest stable release that packagers could use to automatically query. If there's a port of uscan for MacPorts ( http://manpages.debian.net/cgi-bin/man.cgi?query=uscan ) you could simply use the debian watch file. It's contents are: version=3 http://sf.net/matplotlib/matplotlib-([0-9]+(?:\.[0-9]+)*)\.tar\.gz -- Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian Group, R/GA, Big Spaceship. http://www.creativitycat.com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Question about imshow
John Hunter wrote: On Sun, May 17, 2009 at 11:07 PM, Jae-Joon Lee lee.j.j...@gmail.com wrote: I think one possible solution would be to simply deprecate the support for PIL image in imshow, and let users explicitly use array-interface via asarray function. Is there any other idea? I'll make this change unless someone come up with something. I'm not wild about removing the PIL functionality entirely just to remove an inconsistency. Andrew wrote the PIL support -- perhaps he can comment. I wouldn't remove PIL support in imshow immediately, either, but I think deprecation should be OK. Since Image-numpy conversion is now happening through the array interface, I don't think there's much call to support PIL directly anymore. We should make the deprecation warning give the appropriate hint (In the future, 'imshow(pil_image)' will not be supported. Use 'imshow(np.array(pil_image))' instead. Note that you may need an origin='upper' keyword argument for the latter case.) -Andrew -- Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] pyplot.figure stealing window focus!!
Tyler B wrote: Hi there, I am trying to run a python script on my computer at a regular interval [in the background] to output an image file using matplotlib. My problem is that every time the script runs, it momentarily steals focus from whatever I'm working on -- which over time gets to be very annoying. I think that I've narrowed it down to a single line in the python script: fig = plt.figure(facecolor ='w', frameon=False) [note that I've imported matplotlib.pyplot as plt earlier] I made a short video to show the problem: http://screencast.com/t/MRObeKrx Can anyone think of a good way to prevent matplotlib from stealing focus?? This is the last problem I have to solve.. though I'm out of ideas. You don't show the beginning of your script, but try: import matplotlib matplotlib.use('Agg') before any other MPL imports. -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] pyplot.figure stealing window focus!!
Tyler B wrote: I think that did it --- thanks Andrew!! Just out of curiosity, what does 'Agg' refer to? It's the low-level drawing library, anti-grain. You're bypassing the loading of whatever other backend -- a low-level drawing system -- that matplotlib was loading before. Also, I'm guessing that some efficiency is lost once we make Python import the entire library (as opposed to just pyplot as before) -- is there a more efficient way, or is that just the price to pay? Actually, I'd guess it's the opposite -- now you're not loading the graphical library that was grabbing focus, but merely a low(er) level drawing library. -Andrew -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Updating a plot
Pellegrini Eric wrote: Hello everybody, I would like to create a plot from which I set the x data later. The method set_xdata works but the corresponding plot displays the initial x limits. Is it possible to update the plot automatically in order that the displayed plot has x limits corresponding to the newly set x data ? Here is the script that fails: import pylab fig = pylab.figure() ax = fig.add_subplot(111, label = 'plot1') p, = ax.plot([1,2,3,4,5]) p.set_xdata([10,20,30,40,50]) # ax.set_xlim([10,50]) fig.show() to update the xlim I have to add the commented line. thank you very much Eric Pellegrini I think this is more or less the same question asked by C M on April 8 on this list. Can you see if the response by Ryan May is sufficient for you? -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Basemap Installation Errors
jtamir wrote: Andrew Straw wrote: Does that file .h exist at that location? Yes, __multiarray_api.h is in ~/lib/python2.5/site-packages/numpy/core/include/numpy/ I am installing with prefix set to home directory. Andrew Straw wrote: can you re-send the output including the first error? The full output is quite long - 1650 lines (attached) $ python setup.py install --prefix=/home/jtamir log error: Command gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Isrc -I/home/jtamir/lib/python2.5/site-packages/numpy/core/include -I/home/jtamir/include/python2.5 -c src/_proj.c -o build/temp.linux-i686-2.5/src/_proj.o failed with exit status 1 http://www.nabble.com/file/p22992540/log log compile options: '-Isrc -I/home/jtamir/lib/python2.5/site-packages/numpy/core/include -I/home/jtamir/include/python2.5 -c' gcc: src/_proj.c src/_proj.c:4:20: error: Python.h: No such file or directory That's the first error -- and it's quite diagnostic. gcc can't find Python.h. I see you are doing some slightly non-standard stuff with paths. From your paths, it appears you have Python installed in /home/jtamir/bin/python. If this is the case, you should try /home/jtamir/bin/python setup.py install (without the --prefix=/home/jtamir). That will let distutils attempt to do everything normally. Otherwise, you'll have to figure out what Python.h isn't in /home/jtamir/include/python2.5 if you want the above to work. -- Andrew D. Straw, Ph.D. California Institute of Technology http://www.its.caltech.edu/~astraw/ -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Basemap Installation Errors
jtamir wrote: Hi, I am having trouble installing Basemap. I followed the directions in the README file included in the archive (and posted at http://matplotlib.sourceforge.net/basemap/doc/html/users/installing.html). After successfully installing the GEOS library (also included), I cd to the top level basemap directory and run the command python setup.py install. The install fails, with multiple compile errors related to src/_proj.c. However, it appears that lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_a pi.h also produces errors, so I suspect it may have to do with gcc... Does that file .h exist at that location? Typically, it is the first error that I look at -- can you re-send the output including the first error? -Andrew -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] matplotlib._path failed on windows build for Python 2.6
Lorenzo Di Gregorio wrote: Hello, I've tried to build matplotlib 0.98.5.2 for Python 2.6 under Windows (Win2k) using MinGW and win32_static. After a few fixes, the compilation and install appear to be ok, but I've got stuck at importing matplotlib._path (see transcript below). Any suggestions on what is going wrong and how to fix it? File C:\Python26\lib\site-packages\matplotlib\artist.py, line 5, in module from transforms import Bbox, IdentityTransform, TransformedBbox, Transformed Path File C:\Python26\lib\site-packages\matplotlib\transforms.py, line 34, in mo dule from matplotlib._path import affine_transform ImportError: DLL load failed: Die angegebene Prozedur wurde nicht gefunden. Did _path.cpp get compiled to a .pyd OK? (Do you have C:\PYTHON26\Lib\site-packages\matplotlib\_path.pyd installed? -- I guess that's where it would be... Not running Python on Windows, though, I could be off a bit.) And, as a hint to anyone else attempting to debug this: the above traceback means The given procedure was not found. (And Lorenzo Di Gregorio doesn't sound like a very German name to me, so why your computer is speaking German I don't know... :) I do find something nice about running Python 2.6 under Win2k, though... Andrew -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] imread() and PNGs
Tobias Wood wrote: Tobias, I would like to apply your patch, but the test in examples/tests/pngsuite fails. If you can submit a new patch where this test passes, and, even better, if a small example 12-bit PNG of yours is added to the test, I will apply it. Apart from that, I would echo Eric's thanks for the patch and explanation. -Andrew Hi Andrew and Eric, Thanks for the responses. I was unaware of the png test suite. I have attached a new diff that passes this test correctly. It originally failed because I was not handling greyscale images with an alpha channel, but it also brought to light several other issues with my code that I have fixed. I have changed the structure of the code significantly - the if/else struct has gone and a single loop returns the different image matrices. Although this is more concise, it no longer informs the user if it hits an unsupported image type. Unfortunately I do not have a small test image available, all of ours are a minimum of 512x620. However the pngsuite page, http://libpng.org/pub/png/pngsuite.html, does have a set of suitable images labelled cs*n*.png. These have thrown up an interesting issue - to what maximum value should n-bit images be scaled when n is between 8 and 16? The png spec and test images suggest it should be (2^n - 1). This means that higher bit depths give higher precision over the same intensity range and the same maximum value. However for my particular camera and software this would be wrong, as the CCD has a fixed 12-bit dynamic range and the lower png bit depths are only used to save file space. Hence at the moment I have set my software to scale to (2^16 - 1) for 8 n 16, but it follows the png spec for n 8, so there are two contradictory behaviours and I am unsure which is the best approach. Personally I would prefer matplotlib to return raw integer values, not floats scaled between 0 and 1 and then I can apply the scaling myself, but I am aware that this is not particularly user friendly for anyone else. imshow() seems to handle integer values fine and correctly scales for display, provided that no alpha channel is present. Should I post another message to the developer list about this to see what people think? I'd very much like to discuss this with someone who has a lot more experience of pngs than me. Tobias, I went ahead and applied your patch to the svn trunk and the 0.98.5 maintenance branch -- the aspect of having grayscale images come in as 2d arrays brings the functionality inline with the docstring to imread(), so it qualifies as a bug fix. The rest is a nice feature addition (the ability to read high dynamic range PNGs) that I think is unlikely to break anything. As for your questions, I think they can be addressed later. (I hope you maintain your interest in this subject.) In particular, it would be good to get Michael Droetboom's responses on this -- he's the resident PNG expert. In terms of the 8 n 16 bit PNG issue, if they are to be stored as integers, they will have to be stored in 16 bits, thus there are two reasonable ways to do it -- left shifted and right shifted. There are arguments for both. Thus, my opinion is that adding keyword arguments to imread() that would modify the current behavior appropriately would be the best solution. In other words, something like return_as_integer=False, integer_shift='left' would be the defaults. Next time you submit patches, I do think it would be best to submit to the mpl-dev email list. Anyhow, thanks for the patch! -Andrew -- ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] imread() and PNGs
Eric Firing wrote: Tobias Wood wrote: Hi everyone, After getting fed severely fed up with Matlab in recent months I downloaded Python, Numpy and Matplotlib to try out as an alternative. So far I'm pleasantly impressed, even if building from source on Mac OS X is an experience ;) However, I have discovered a couple of problems with Matplotlib's imread() function and, shall we say, 'esoteric' PNG files. My research group uses a 12-bit CCD controlled through Labview to capture high dynamic range image stacks. Often there are ~30 images in a single data set. These get read into Matlab in one go for processing as a stack. I tried converting my code over to Python but, after digging through the _png.cpp source file found the following that are problems from my point of view: 1) All .png files in imread() are converted to 4-plane RGBA files regardless of original format. I would prefer greyscale images to return a single plane. 2) 16-bit PNGs are stripped to 8 bit, losing any extra precision. 3) The significant bits option in the PNG header was not being checked. Our camera software will automatically save the PNGs at the maximum bit-depth required to cover the dynamic range in the image, and can sum images before saving, so pixels can be anywhere from 6- to 16-bits (at least those are the values I have observed whilst using the camera). I have attached the results of an svn diff after I made an attempt at correcting these issues. This is the first time I have contributed to an open source project, so am not sure of the etiquette here. Also, I have only had Python and Matplotlib for a fortnight so am still unfamiliar with them and haven't programmed with libpng before so I apologise in advance if there any stupid mistakes in my code. I am aware that imread() is a pretty important function in Matplotlib and hence any changes I suggest would need comprehensive testing. In brief, I made the following changes: Tobias, Thank you very much for the patch and the careful explanation. I'm not the right person to review it, but I expect someone familiar with libpng use in mpl will do so soon. Mike D. would be a candidate, but I think he will be unavailable for several days. If you have not gotten any feedback within a week, *please* ping us with a reminder. If it comes to that, you could do it by forwarding your original message to matplotlib-devel. Tobias, I would like to apply your patch, but the test in examples/tests/pngsuite fails. If you can submit a new patch where this test passes, and, even better, if a small example 12-bit PNG of yours is added to the test, I will apply it. Apart from that, I would echo Eric's thanks for the patch and explanation. -Andrew -- ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Installing matplotlib for python 2.6 under windows
Romi Agar wrote: Hi! I'm having a bit difficulty getting matplotlib to run under windows (vista x64) with python 2.6. I downloaded the source from svn, ran the build and install commands, Does that mean python setup.py install? then copied the content of /build/lib.win32-2.6 to Lib/site-packages folder. Hmm, why did you have to do that? Doesn't the install step do that automatically? Or did it break? But when I try to import pylab I get the following error message: Traceback (most recent call last): File pyshell#0, line 1, in module import pylab File C:\Python26\lib\site-packages\pylab.py, line 1, in module from matplotlib.pylab import * File C:\Python26\lib\site-packages\matplotlib\pylab.py, line 207, in module from matplotlib import mpl # pulls in most modules File C:\Python26\lib\site-packages\matplotlib\mpl.py, line 1, in module from matplotlib import artist File C:\Python26\lib\site-packages\matplotlib\artist.py, line 5, in module from transforms import Bbox, IdentityTransform, TransformedBbox, TransformedPath File C:\Python26\lib\site-packages\matplotlib\transforms.py, line 34, in module from matplotlib._path import affine_transform ImportError: No module named _path So, where might I find the _path module be? This gets compiled from C sources. Do you a C compiler on your system? Python 2.6 is built with MicroSoft Visual Studio 2008 (aka VC++ v 9.0), but the free VC++ 2008 Express Edition compiles Python extensions just fine, according to http://mien.sourceforge.net/docs/platform_win.html#py26 Thanks in advance, Romi -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Rotating in imshow
Eric Firing wrote: Thomas Robitaille wrote: Hello, I was wondering whether there is a way to rotate a grayscale/ colorscale when using imshow. I have been using PGPLOT (a fortran/c plotting library) for many years now, and the equivalent to imshow is called PGGRAY (or PGIMAG). One of the arguments this function takes is a 6-element array TR which is a transformation matrix. From the PGPLOT documentation: The transformation matrix TR is used to calculate the world coordinates of the center of the cell that represents each array element. The world coordinates of the center of the cell corresponding to array element A(I,J) are given by: X = TR(1) + TR(2)*I + TR(3)*J Y = TR(4) + TR(5)*I + TR(6)*J You could do this with the Axes.pcolormesh method. You could start with an unrotated grid (generated by meshgrid, for example), apply your rotation, and use that transformed grid in pcolormesh. Note that pcolormesh requires the grid for the cell boundaries, not centers. It should work with imshow() as well if you can set the affine component of the transform to the desired values. Which it looks like you can in Affine2D(). (The affine matrix is the elements of TR listed above, it appears.) I have not tried to do this, however -- just saying that I think it's possible. -Andrew -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] find the projected distance between two curves
G. Allegri wrote: Hi Andrew. With dist(point_i,polynomial_curve) do you mean point_i belonging to the Line 2 set of points and pol_curve as Line 1? yes In this case it could be reasonably ok for me. How can I derive the closed form for dist()? Excuse my ignorance with geometry Take the equation for line 1parameterized by s. Something like f(s) = (x,y) = (as**2 + bs +c, ds**2 + es + f ) for your polynomial model. Now, the distance for that point on line 1 from point i is dist(point_i, f(s)), where dist can be Euclidean distance, for example. So, the question is what value of s minimizes the distance. Since this function will be smallest at an inflection, just take the derivative of your distance function and solve for it to be equal to zero. Hopefully this function will be convex and you'll have only one zero, which will tell you the value of s where distance is a minimum. Otherwise, pick the inflection at the closest distance. Finally, repeat for all points i and sum the results. Hopefully that helps on the conceptual side. Sympy will be more useful than matplotlib on the coding side... -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] find the projected distance between two curves
G. Allegri wrote: Hello list, I'm completely new to matplotlib and I'm not a computer scientist (not a good starting point!) but I need to solve a geometric/graphical problem. I've been asked to find a method, in Python, to find the distance between a 2D polynomial curve, derived from least squares interpolation on a set of points, and a curve locallly interpolating another set of points. Do you really need the distance to be relative to the interpolated curve? Why not to the points which are being interpolated? Then the answer is just: Sum_i dist(point_i,polynomial_curve) Where dist() can be arrived at in closed form... Otherwise, I guess it would depend on the interpolation, which you didn't really specify. - the starting line is a smooth line, while the second should describe a path passing exactly thorugh the given points. - the distance should be the one along the normal to the first line I attach a sketch to explain this. Is there an heuristic, an algorithm, to solve this problem in an efficient way (I have to apply it to thousands couples of sets from sonar and seismic acquisitions)? Is the mapltolip API useful for this? Thanks in advance, Giovanni -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] [matplotlib-devel] What would you like to see in a book about Matplotlib?
Hi Sandro, It's great news that a book may come out on MPL. Speaking as an aspiring university professor in neuroscience, I would like to see something that could be used as a resource for undergraduate students just learning Python and MPL. Due to this perspective, I think such a book would cover both numpy and MPL. The emphasis could clearly by on MPL, but basic numpy idioms and concepts should also be taught. I think an example-driven approach would be very useful -- something like an undergraduate laboratory experiment where students measure and plot raw values and compute histograms and statistics (e.g. mean and std). More advanced sections might perform statistical comparisons of different treatments (e.g. using chi squared, KS and/or T tests), do linear least squares fitting (with np.linalg.lstsq), and possibly non-linear curve fitting using something like scipy.optimize.fmin. That's my self-serving $0.02, since you asked! :) You may also want to speak with John Hunter and Fernando Perez about the possibility of collaborating -- they've already done some work towards a book, too. Andrew Sandro Tosi wrote: Hello and Happy 2009! I received the interesting proposal to author a book on Matplotlib, the powerful 2D plotting library for Python. While preparing the arguments list, I'd like to hear even your opinion, because different points-of-view will lead to a better product. Some basic question I'd like to ask are: - what are you using matplotlib for? - what are the things you like the most of matplotlib, that you want to give emphasis to? And why? - what are the (basic) things that, when you were beginning to use matplotlib, you wanted to see grouped up but couldn't find? - what would you like to see in a book about matplotlib? - what are some those advanced feature that made you yell WOW!! ? - what are the things you'd like to explore of matplotlib and never had time to do? Your suggestions are really appreciated :) And wish me good luck! Cheers, -- ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Matplotlib PSD bug?
Ryan May wrote: Fago, Matt - AES wrote: I cannot really compute the example without the pad_to support in svn. Nevertheless, using something similar (nfft=128, noffset=64) gives similarly erroneous results. Did you add 'pad_to'? If so, thanks! Good to know. I recently (within the last month) did a bunch of work on psd, based in a large part on work done by one of my colleagues, Sean Arms. I was worried some of this had broken existing code, but it appears more likely that this was already a problem. After much playing, and reading the Matlab docs, it looks like the difference is that Matlab normalizes by the sampling frequency. Also, if a one-sided psd is returned, it multiplies everything by 2. If I apply these two scaling factors, I get results in line with those produced by Matlab. Now, this scaling was not performed by the old code, so this is not a new incompatibility (bug?) with Matlab. Also, while I have not reviewed the reference specified in the docstring (Bendat and Piersol 1986), the book I have handy (Stoica and Moses 2005) does not mention scaling by the sampling frequency, nor does the included Matlab code perform any such scaling. So what should be done here? I would be opposed to making such scaling the default, as IMHO it tries to do too much and I would have to work around it to get the more raw numbers. However, I am not opposed to adding (yet another) option to do such scaling. Hi Ryan, I appreciate the work you're doing on this, and while I don't have any very strong opinions on the API questions you raise, I would request that you include in the docstrings information at least at the level of the above, listing the scaling issue, the sources you've followed and how and why you've chosen to follow them or deviate, and differences with the default behavior of other software. I recently helped a colleague use Matlab's PSD/pwelch functions and had to spend some time sending in sine waves of various frequencies and amplitudes to figure out what the results meant. If matplotlib gives different results by default, I think it should 1) justify why and 2) indicate what option(s) may be set to get results equivalent to other systems, including Matlab. Thanks again, Andrew - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Error During Install basemap-0.9.9
I don't know fedora, but is there a numpy-dev package or something similar? You'll need it to install numpy's header files. Zainal Abidin wrote: Hi All, I have an error during basemap-0.9.9 installation src/_geos.c:28:31: error: numpy/arrayobject.h: No such file or directory and so on .. I'm using fedora 8 numpy 1.1.0 scipy 0.6.0 shapelib 1.2.10 pyshapelib 0.3 help me please, is there n\any I should do? -- Zainal Abidin, S.Si Sub Bidang Informasi Meteorologi Publik Badan Meteorologi dan Geofisika Jl. Angkasa I No. 2 Jakarta - Indonesia Visit Indonesia Year 2008 - Celebrating 100 Years of National Awakening - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Colormap cluttering?
Laurent Dufrechou wrote: Hello, I would like to have a cluttering functionality to colorbar. http://en.wikipedia.org/wiki/Clutter_(radar) Before writing it, I would like to know if there is a way to doing it with matplotlib. What I mean by cluttering is: You’ve got a colormap associated with a graphic where value goes from 0 to 255 for example. Assigning a classical colormap (for example cm.jet) 0 value will be blue and 255 one will be red. What I need is a low clutter and max clutter, if I set low clutter to 10 and ax cluter to 250 then: Blue will be for value from 0 to 10 Then the colormap do his job from 10 to 250 and finally From 250 to 255 colr will be set to max one = red. Is it ever done in matplotlib, if not what could be the strategy here…? I was thinking of set_over/set_under but seems not be exactly what I need because I want to recreate the colormap from 10 to 250 with N segments. (moreover I don’t understand how you set the over/under value…) Dear Laurent, if I understand you correctly, set vmin=10 and vmax=250 and it will do what you want. -Andrew - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Axes3d
Mike, just a question about the new transforms backend -- can the input dimensionality be greater than 2? (I realize functions to do so probably don't currently exist, but the question is about the transforms machinery itself.) -Andrew Michael Droettboom wrote: I'm not very familiar with how axes3d works, but just by looking at the number of transform calls and objects, it appears that it will take significant effort to update it. It was never one of the goals of the transformation refactoring to have that working. Personally, I'm +1 on removing axes3d.py to avoid confusion. However, a motivated user could follow the information in API_CHANGES to update axes3d.py. I'd be happy to help if you got stuck, but I don't really have the motivation/mandate to do the whole thing myself. Cheers, Mike Matthias Michler wrote: Hello list, I know it is not recommended to use matplotlib for 3d plotting, but for a while simple plots worked fine for me. This is not the case with actual svn version and therefore my question is: Would it break at lost or cost much effort to make the 3d-plot-examples of the Cookbook work? if I try: [1] import matplotlib.axes3d as p3 I get the error attached below. Thanks for any advise in advance. best regards Matthias --- type 'exceptions.ImportError' Traceback (most recent call last) /home/michler/CompPhys_2008/Uebungsaufgaben/050_Antidot/3D_matplotlib/ipython console in module() /scratch/michler/SOFT/lib/python2.5/site-packages/matplotlib/axes3d.py in module() 14 from axes import Axes 15 import cbook --- 16 from transforms import unit_bbox 17 18 import numpy as np type 'exceptions.ImportError': cannot import name unit_bbox /scratch/michler/SOFT/lib/python2.5/site-packages/matplotlib/axes3d.py(16)module() 15 import cbook --- 16 from transforms import unit_bbox 17 - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] deb or rpm packages
rex wrote: Andrew Straw [EMAIL PROTECTED] [2008-06-05 09:42]: For i386: http://debs.astraw.com/hardy/python-matplotlib_0.98.0-0ads2_i386.deb For amd64: http://debs.astraw.com/hardy/python-matplotlib_0.98.0-0ads2_amd64.deb For all arch: http://debs.astraw.com/hardy/python-matplotlib-data_0.98.0-0ads2_all.deb http://debs.astraw.com/hardy/python-matplotlib-doc_0.98.0-0ads2_all.deb I tried to install on Debian Lenny with Python 2.5 and it fails with: python-matplotlib depends on python-wxgtk2.8 wxgtk2.8 doesn't seem to be available for Python 2.5 and Lenny at: http://apt.wxwidgets.org/dists/ Any ideas, short of building from source? That's probably your best bet at this point -- my repo is for Ubuntu Hardy. It looks like you can get the Debian experimental package of wxwidgets 2.8 at http://packages.debian.org/hu/source/experimental/wxwidgets2.8 . I have no idea why this isn't in unstable or testing yet -- a few minutes of googling didn't find anything. -Andrew - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] deb or rpm packages
Johan Mazel wrote: Hi I can't find any deb package of matplotlib in the url that you gave me. The sources are there but I'm not interested in the sources since I can find them on the official website of matplotlib. Is there any problem ? Thanks for the answer by the way. Johan mazel They are there. For i386: http://debs.astraw.com/hardy/python-matplotlib_0.98.0-0ads2_i386.deb For amd64: http://debs.astraw.com/hardy/python-matplotlib_0.98.0-0ads2_amd64.deb For all arch: http://debs.astraw.com/hardy/python-matplotlib-data_0.98.0-0ads2_all.deb http://debs.astraw.com/hardy/python-matplotlib-doc_0.98.0-0ads2_all.deb - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] deb or rpm packages
I have .debs for Ubuntu Hardy available at http://debs.astraw.com/hardy/ . Note that these packages don't follow all Debian/Ubuntu guidelines and are of lower quality than the official packages, which I recommend over these. Nevertheless, I've packaged these things up for my personal and my laboratory's use, and anyone is welcome to use them, too. As always, please let me know if you find any bugs. (The source .dsc packages are also available at the same site, and might work with recompilation for Debian testing and possibly older Ubuntu versions.) -Andrew Johan Mazel wrote: Hi I'd like to know when the latest packages in *.deb or *.rpm (from the 0.98.0 version) will be available in the repositories ? If you have any addresses of custom repositories where I could get this package, it would be nice too. I prefer to have a package installed than installed the software myself since I think it would be easier for me if I want to uninstall it. Thanks. Johan Mazel - 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
Re: [Matplotlib-users] Numpy v1.1.0 not compatible with pylab in matplotlib 0.9.1
Eric Firing wrote: _backend_gdk.c and nxutils.c both call into the numpy C API; maybe some c++ code does also. It is not entirely clear to me whether 1.1 is sufficiently binary-compatible that this is safe. The C API did not change (with the possible exception of additions). I'd be really surprised if this is an issue -- the numpy devs worked to make sure there would be no breakage at the C API level. (And even if it did change, as it might one day in the future -- numpy 2? -- there's a check that happens at numpy load time, during import_array(), that checks whether the version of numpy you compiled with is the version you're loading now and raises an exception if it's not. So, the old nightmares of numeric and numarray possibly being run against binary incompatible versions are a thing of the past. This check actually saved quite a few headaches during the runup to numpy 1.0, when there were a number of C API changes happening in quick succession as Travis worked to get it right. That machinery is still in there.) - 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] matplotlib and cron
Andre, my guess is that there's an attempt made to connect to the (non-existant) X server. You can disable this by forcing a backend that doesn't need the X server. Try import matplotlib matplotlib.use('Agg') before the rest of your script. Andre Wong wrote: Hi I am attempting to generate graphs using matplotlib/pyplot via a cron process. These scripts work perfectly fine when I am logged in and run the scripts on the command line, however they fail to run when they are set up as a cronjob. Even a simplified plotting routine does not work: from matplotlib.pylab import plot from matplotlib.pylab import savefig plot([1,2,3,4]) savefig('test.png') my crontab is configured like this: SHELL= /bin/tcsh 45 8 * * * cd [path to script]; python graphtest.py Thanks in advance, - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] pylab.imshow - how does it work?
Hi Adeola, OpenGL must be expecting a certain packing but your image data is packed differently. You have (at least) two options: 1) alter your numpy arrays to match the packing of OpenGL. This can be done by creating an array with the appropriate .strides value. 2) alter OpenGL's idea of how the data is packed. For this, see 7. Watch Your Pixel Store Alignment in http://www.opengl.org/resources/features/KilgardTechniques/oglpitfall/ -Andrew Adeola Bannis wrote: Hi, I have a set of images I want to render with OpenGL, and I do this by doing some calculations, producing an array, then passing this array to OpenGL. Here's the relevant OpenGL call, for reference: gluBuild2DMipmaps(GL_TEXTURE_2D, 1, image.shape[0], image.shape[1], GL_LUMINANCE, GL_UNSIGNED_BYTE, flatImage) flatImage is just image as a flattened, contiguous numpy array... all that matters is that it contains the same values as in image. The problem is that passing my arrays to pylab.imshow() displays them exactly as they are meant to be, but in OpenGL they are 'twisted'. There is an offset that is _different_ for each picture that only seems to be resolved by replacing 'image.shape[0]' by 'image.shape[0]-5' or some other numbers that make the rows shorter. How is it that OpenGL does weird things with the row length but pylab is always happy? I can send pictures of the problem if it helps Adeola - 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] etframes: Applying the ideas of Edward Tufte to matplotlib
I came across this piece by Adam Hupp on programming.reddit.com just now. It looks interesting: http://hupp.org/adam/weblog/2007/09/03/etframes-applying-the-ideas-of-edward-tufte-to-matplotlib/ - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. 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] Core-dump when (mis)using scale_transform
Thanks for tracking this down, Ben. Applied in svn as r3547. Ben North wrote: I've been using matplotlib for a little while and am finding it very useful. Yesterday, though, I hit a problem: - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Problems with auto scaling with infinite values
Darren Dale wrote: If we can figure out how to get it from numpy, we can use numpy's isnan as well, and drop that bit of extension code from mpl's sources. Done in r3512. Hurray for inclusion instead of code duplication. (I originally copied that stuff from numarray, which inspired numpy's design of that stuff, but since back then would couldn't depend on either...) On Friday 13 July 2007 10:32:15 am John Hunter wrote: I'm happy to do this, if someone can advise how to get a portable isinf. Also in r3512, I inserted the definition of isfinite, copied from numpy's umathmodule.c.src at the top of _transforms.cpp. If it works for numpy, it should work for us. I'm slightly worried that this stuff will break on MSVC... Does anyone have the ability to test this svn revision sooner than later? -Andrew - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] a patch in matplotlib/__init__.py about get_py2exe_datafiles function
Hi Tocer, Thanks for the patch to matplotlib/__init__.py. I changed an obvious issue ('.nil' to '.nib'), but otherwise committed it as-is. Can you (or Werner, who was also having this issue) test the current svn version (=3418) and report back? Cheers! Andrew tocer wrote: Hi, matplotlib developer You know there is a bug about get_py2exe_datafiles in MPL0.90.1. I think I fix it below. - matplotlib/__init__.py -- def get_py2exe_datafiles(): datapath = get_data_path() head, tail = os.path.split(datapath) d = {} for root, dirs, files in os.walk(datapath): # Need to explicitly remove cocoa_agg files or py2exe complains # NOTE I dont know why, but do as previous version if 'Matplotlib.nib' in files: files.remove('Matplotlib.nil') files = [os.path.join(root, filename) for filename in files] root = root.replace(tail, 'matplotlibdata') root = root[root.index('matplotlibdata'):] d[root] = files return d.items() - end - and the sample of setup.py is below: - setup.py sample --- from distutils.core import setup import py2exe import matplotlib dist_dir = r'r:\matplotlib_dist_dir' setup( console=['simple_demo.py'], options={ 'py2exe': { 'packages' : ['matplotlib', 'pytz'], 'dist_dir': dist_dir } }, data_files=matplotlib.get_py2exe_datafiles() ) it work well in my box. -- Tocer - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] 2D Radial Plots
Can you convert your radial coordinates to Cartesian coordinates and use approach #2 here: http://scipy.org/Cookbook/Matplotlib/Gridding_irregularly_spaced_data Lorenzo Isella wrote: Hello, Sorry for this tread getting quite long, but I am not getting there yet. Online I found examples like: - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] spawning plots as separate processes
signal seeker wrote: Bill, The problem is I am writing a bunch of diagonistic tools for users who do not know anything about unix. they just want to type a bunch of commands on a shell and see the plots and they hardly know anything fancy like sending processes to the background :) I guess, I am going to have to use threads or sub processes to spawn new plots. That's exactly what Bill's ezplot is supposed to do. I am sure that he will appreciate any helping making it easier to just work without the user having to know or do anything. (I know I will.) - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] ANN: matplotlib-0.90.1
Werner F. Bruhin wrote: Hi Andrew, Werner F. Bruhin wrote: Hi Andrew, Andrew Straw wrote: Dear Werner, This seems to be an unintended side-effect of reorganizing the mpl data file location that I did prior to this release. (I.e. it's not your code that broke, I think it's mpl.) Unfortunately, since I didn't (and still don't) use py2exe, it will be hard for me to fix this. Can you send a patch that gets py2exe working again? The work around I did is using glob.glob instead as follows: # matplotlib data ##mpdir, mpfiles = matplotlib.get_py2exe_datafiles() mpfiles = glob.glob('C:\Python25\lib\site-packages\matplotlib\mpl-data\*.*') But I can't confirm yet that this works as I am also trying out something else in my InnoSetup script. Will confirm ASAP and will try and look into matplotlib.get_py2exe_datafiles() and see how it could be fixed. I have change matplotlib.get_py2exe_datafiles() to: def get_py2exe_datafiles(): import glob mplfiles = [] for item in glob.glob(os.sep.join([get_data_path(), '*/*'])): if os.path.isdir(item): mplfiles += glob.glob(os.sep.join([item, '/*'])) mplfiles.append(os.sep.join([get_data_path(), 'matplotlibrc'])) try: mplfiles.remove(os.sep.join([get_data_path(), 'Matplotlib.nib'])) except: pass return ('matplotlibdata', mplfiles) Now this creates a flat folder, i.e. all datafiles are directly under matplotlibdata. In my tests this works for me in my limited tests, with the exception that I also get the Could not match Bitstream Vera ..etc error - but this is something I also get with py2exe, so I don't know if this is an issue. Andrew, do you know if the sub-folder structure should be retained when using py2exe for matplotlib to work correctly in all circumstances? If that would be the case let me know and I try to come up with something. Dear Werner, I am reluctant to eliminate the sub-folder structure because I think it would add the possibility of unnecessary bugs to just the py2exe built version. Would it be possible for you to re-factor this to include the directory layout? When you test it, can you test some interactive plot to make sure all the button icons are loaded properly? Thanks, Andrew - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Encoding?
Marek, See the unicode_demo.py and the tex_unicode_demo.py in the examples directory. Marek Wojciechowski wrote: Hi. How can I get polish letters in, for example, plot title? Now I have empty squares instead... Thanks in advance for any help. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] ANN: matplotlib-0.90.1
Dear Werner, This seems to be an unintended side-effect of reorganizing the mpl data file location that I did prior to this release. (I.e. it's not your code that broke, I think it's mpl.) Unfortunately, since I didn't (and still don't) use py2exe, it will be hard for me to fix this. Can you send a patch that gets py2exe working again? Thanks, Andrew Werner F. Bruhin wrote: Werner F. Bruhin wrote: John Hunter wrote: matplotlib 0.90.1 is out and available for download from the sourceforge site. When trying to package my application with py2exe I get the following error: Traceback (most recent call last): File setup.py, line 141, in module mpdir, mpfiles = matplotlib.get_py2exe_datafiles() File C:\Python25\Lib\site-packages\matplotlib\__init__.py, line 369, in get_py2exe_datafiles mplfiles.remove(os.sep.join([get_data_path(), 'Matplotlib.nib'])) ValueError: list.remove(x): x not in list To work around this I just put a try/except in: try: # Need to explicitly remove cocoa_agg files or py2exe complains mplfiles.remove(os.sep.join([get_data_path(), 'Matplotlib.nib'])) except: pass But I then get this error: error: can't copy 'C:\Python25\lib\site-packages\matplotlib\mpl-data\fonts': doesn't exist or not a regular file I guess I will have to review how I am using the get_py2exe_datafiles stuff. Werner - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Handling LARGE data sets
[EMAIL PROTECTED] wrote: Hi Alan, I'm not speaking for anyone else, but as far as I'm concerned that code is public domain. OK, well, who wrote the code and who holds the copyright? In other words, your concerns about the code being in the public domain may or may not be relevant, depending on where the code came from and whether you have any legal authority to distribute the code and under what conditions. It would be nice to include an SG filter in scipy, for example, but that would only be possible if it were released under a BSD-like license. -Andrew - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] One title over two subplots
See pylab.figtext() David D Clark wrote: Hello, I have a figure with four subplots (2x2). I would like to put a title centered over the top row. How do I do this? Thanks, Dave - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] small question: svn mpl.__revision__
It hasn't changed since rev 3131: $ svn info __init__.py | grep 'Rev' Revision: 3257 Last Changed Rev: 3131 Matthias Michler wrote: Hi devolopers, one small remark about the mpl svn. I recognized, that in the file ./lib/matplotlib/__init__.py the actual revision is: __revision__ = '$Revision: 3131 $' and the svn info tells Revision: 3257. best regards, Matthias - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Python issue of Computing in Science and Engineering available
The May/June issue of Computing in Science and Engineering http://computer.org/cise: is out and has a Python theme. Many folks we know and love from the community and mailing lists contribute to the issue. Read articles by Paul Dubois and Travis Oliphant for free online. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Python issue of Computing in Science and Engineering available
(Off list...) (Another g-mailer, huh? Soon they'll know everything about everyone...) Thanks for that info re: online paper copies. I'm actually a week or two away from submitting a follow-up paper from my SciPy '06 talk to them... And submitting to a non-open-access journal was one issue. But this makes it... bearable. Cannae make SciPy '07 :( Will be at a insect/robot flight conference in the Italian-speaking part of Switzerland! :) -Andrew Fernando Perez wrote: On 4/25/07, John Hunter [EMAIL PROTECTED] wrote: On 4/25/07, Fernando Perez [EMAIL PROTECTED] wrote: Since authors are allowed by their publication policy to keep a publicly available copy of their papers on their personal website, here's the ipython one: Didn't know that... here's a link to my matplotlib article I'm going by the language here: http://www.ieee.org/web/publications/rights/policies.html Specifically: When IEEE publishes the work, the author must replace the previous electronic version of the accepted paper with either (1) the full citation to the IEEE work or (2) the IEEE-published version, including the IEEE copyright notice and full citation. Prior or revised versions of the paper must not be represented as the published version. This explicitly mentions author website redistribution, as long as the official IEEE version is used. Unless I'm misreading the above, I think it's OK for us to keep such copies in our personal sites. We can link to them from the scipy wiki, though I don't think it would be OK to /copy/ the PDFs to the scipy wiki. As always, IANAL and all that. Cheers, f - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Python issue of Computing in Science and Engineering available
Andrew Straw wrote: (Off list...) Eek, well, not off-list! :) - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Matplotlib conflicts with python-dateutils?
Joshua J. Kugler wrote: Installing an egg today, I got this message from easy_install: /usr/bin/easy_install:5: UserWarning: Module dateutil was already imported from /usr/lib/python2.4/site-packages/matplotlib-0.87.7-py2.4-linux-i686.egg/dateutil/__init__.pyc, but /usr/lib/python2.4/site-packages/python_dateutil-1.1-py2.4.egg is being added to sys.path from pkg_resources import load_entry_point Investigating, it seems that Matplotlib includes python-dateutils wholesale in its egg, instead of depending on the python-dateutils egg and installing that, thus generating warning messages like these. Where did you get that matplotlib egg? Particularly on linux (which you appear to be using), distributing .eggs for matplotlib would be problematic because of all the 3rd party libraries required, so I didn't think they'd be officially distributed. Indeed, I don't see one for linux on the matplotlib download page. Would be possible to remove the dateutil module from future matplotlib eggs and simply rely on the python-dateutils egg? Since matplotlib doesn't require setuptools (other than for Python 2.3), there can be no install_requires field. (And even if we had it in the install_requires field, does your linux distribution's python-dateutil package include the egg info required for the install_requires field to work?) If you built the egg yourself, you can re-build it with dateutil installed and then matplotlib's setup.py file won't include its own dateutil. Ditto for pytz. -Andrew - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] source install question: WXAgg's accelerator requires the wxPython headers.
Dear Ryan, I think you want libwxgtk2.6-dev Ryan Krauss wrote: I am getting a message during a source install that WXAgg's accelerator requires the wxPython headers. What do I need to do to get them for Ubuntu? I think I have all wx packages installed? Do I need to download the source tarball from wxPython.org? If so, where should I put the headers? Ryan - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Nonblocking Plots with Matplotlib
Bill, very cool. Also, thanks for showing me how Twisted can be used like Pyro, more-or-less, I think. (If I understand your code from my 1 minute perusal.) On Mac OS X, there's one issue I don't have time to follow any further: sys.executable points to /Library/Frameworks/Python.framework/Versions/2.4/Resources/Python.app/Contents/MacOS/Python whereas /Library/Frameworks/Python.framework/Versions/Current/bin/python is the file actually on my path. For some reason, when I run the latter ezplot is found, when the former, it is not. Thus, your auto-spawning of a plotserver instance fails on my installation. Other than that, the example you gave works as advertised and looks great. (Ohh, those anti-aliased lines look better and better the more I suffer through my colleagues' aliased plots...) Bill Baxter wrote: Howdy Folks, I was missing the good ole days of using Matlab back at the Uni when I could debug my code, stop at breakpoints and plot various data without fear of blocking the interpreter process. Using ipython -pylab is what has been suggested to me in the past, but the problem is I don't do my debugging from ipython. I have a very nice IDE that works very well, and it has a lovely interactive debugging prompt that I can use to probe my code when stopped at a breakpoint. It's great except I can't really use matplotlib for debugging there because it causes things to freeze up. So I've come up with a decent (though not perfect) solution for quickie interactive plots which is to run matplotlib in a separate process. I call the result it 'ezplot'. The first alpha version of this is now available at the Cheeseshop. (I made an egg too, so if you have setuptools you can do easy_install ezplot.) The basic usage is like so: In [1]: import ezplot In [2]: p = ezplot.Plotter() In [3]: p.plot([1,2,3],[1,4,9],marker='o') Connecting to server... waiting... connected to plotserver 0.1.0a1 on http://localhost:8397 Out[3]: True In [4]: from numpy import * In [5]: x = linspace(-5,5,20) In [13]: p.clf() Out[13]: True In [14]: p.plot(x, x*x*log(x*x+0.01)) (Imagine lovely plots popping up on your screen as these commands are typed.) The only return values you get back are True (success...probably) or False (failure...for sure). So no fancy plot object manipulation is possible. But you can do basic plots no problem. The nice part is that this (unlike ipython's built-in -pylab threading mojo) should work just as well from wherever you're using python. Whether it's ipython (no -pylab) or Idle, or a plain MS-DOS console, or WingIDE's debug probe, or SPE, or a PyCrust shell or whatever. It doesn't matter because all the client is doing is packing up data and shipping over a socket. All the GUI plotting mojo happens in a completely separate process. There are plenty of ways this could be made better, but for me, for now, this probably does pretty much all I need, so it's back to Real Work. But if anyone is interested in making improvements to this, let me know. Here's a short list of things that could be improved: * Right now I assume use of the wxAGG backend for matplotlib. Don't know how much work it would be to support other back ends (or how to go about it, really). wxAGG is what I always use. * Returning more error/exception info from the server would be nice * Returning full fledged proxy plot objects would be nice too, but I suspect that's a huge effort * SOAP may be better for this than xmlrpclib but I just couldn't get it to work (SOAPpy + Twisted). * A little more safety would be nice. Anyone know how to make a Twisted xmlrpc server not accept connections from anywhere except localhost? * There's a little glitch in that the spawned plot server dies with the parent that created it. Maybe there's a flag to subprocess.Popen to fix that? * Sometimes when you click on Exit Server, if there are plot windows open it hangs while shutting down. Only tested on Win32 but there's nothing much platform specific in there. Give it a try and let me know what you think! --bb - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash
Re: [Matplotlib-users] Square/Circle markers with transparent faces?
set markerfacecolor (a.k.a. mfc) = 'None' (make sure you include the quotes). -Andrew John T Whelan wrote: Dear matplotlib gurus, When I use plot(t,x,'rx',t,y,'bs'); in matlab, it produces blue boxes for y, i.e., squares with a blue border and a transparent interior, so that if one of them lies on top of a red x, I can see the red x inside the blue box. The same construction in matplotlib produces blue squares: squares with a black border and a blue interior. I can change the color of the interior with the markerfacecolor or mfc argument, e.g., plot(t,x,'rx'); plot(t,y,'bs',mec='b',mfc='w'); but that produces an opaque white interior which renders invisible any red x it covers up. I can change the transparency of a line with the alpha argument, but there seems to be no corresponding markerfacealpha. Is there a way in matplotlib to get a square marker with a blue border and a transparent interior? Thanks, - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Building on Kubuntu: No module named _ns_backend_agg
Dear Gary, _ns is the numpy backend. Do you have numpy installed? Is it working? Are you compiling matplotlib from source? What version of Ubuntu are you using (Dapper? Edgy?) Gary Pajer wrote: [sorry if this appears more than once. The list manager is timing out when I try to change my email address, so I can't tell if it has taken effect] No_module_named _ns_backend_agg I've set to True everything in setupext.py that had agg in it. This is my first time building on ubuntu. I spent lots of time chasing down dependencies, and there are no errors during the build. Help please? TIA, gary - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Floating exception when rendering ylabel()
You may be encountering this bug: http://code.astraw.com/debian_sarge_libc.html John T Whelan wrote: I just installed matplotlib 0.87.5 and numpy 1.0 from source on my Debian sarge (stable release) system. (I chose those versions because they're the ones currently included in the testing etch release.) Everything I've tried has worked *except* the ylabel() command. Whenever a plot containing a ylabel is rendered (on the screen with show() or figure(), or non-interactively with savefig()), python exits with the error Floating exception This does not happen if the ylabel() command is omitted, and there is no problem with xlabel(), so I assume the issue is rotating the text for the y axis label. Simple example: == ipython -pylab /usr/lib/python2.3/site-packages/numpy/ctypeslib.py:12: UserWarning: All features of ctypes interface may not work with ctypes 1.0.1 warnings.warn(All features of ctypes interface may not work with \ /usr/lib/python2.3/site-packages/IPython/Shell.py:628: GtkDeprecationWarning: gtk.timeout_add is deprecated, use gobject.timeout_add instead self.gtk.timeout_add(self.TIMEOUT, self.on_timer) Python 2.3.5 (#2, Oct 16 2006, 19:19:48) Type copyright, credits or license for more information. IPython 0.6.13 -- An enhanced Interactive Python. ? - Introduction to IPython's features. %magic - Information about IPython's 'magic' % functions. help- Python's own help system. object? - Details about 'object'. ?object also works, ?? prints more. Welcome to pylab, a matplotlib-based Python environment. For more information, type 'help(pylab)'. In [1]: plot([0, 1],[0, 1]) Out[1]: [matplotlib.lines.Line2D instance at 0xb5b46f2c] In [2]: xlabel('foo') Out[2]: matplotlib.text.Text instance at 0xb5b2d4cc In [3]: ylabel('bar') Floating exception == Anyone have experience with this and care to point me towards the solution to such a problem? Thanks, - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] [basemap] stereographic projection bounding boxes
I've been playing around with stereographic projections, and it appears that the bounding-box for the 'stere' projection isn't computed. Being blissfully unaware of all the complexities involved, I thought I'd send this email to see if there's an easy way to deal with the situation. Basically, I'm trying to plot on an equatorial stereographic projection created like so: m=Basemap(projection='stere', lat_ts = 0.0, lat_0 = 0, lon_0 = 90.0) This creates a projection that seems to work well, but the problem is that the [ll|ur]crn* attributes aren't set to anything useful, meaning that lots of the nice basemap goodies aren't working (drawmeridians, etc.) (Note: I don't really understand what the lat_ts is doing -- the docstring says it is the natural origin. I can't find reference to this at http://en.wikipedia.org/wiki/Stereographic_projection . I guess this is related to the discussion of scale error at the extremities at http://www.remotesensing.org/geotiff/proj_list/oblique_stereographic.html , and thus I assume that if lat_ts is set to lat_0, the scale factor will be 1 at the point of tangency. ) So, the question is, can some default bounding box be computed for equatorial (and possibly oblique) stereographic projections in any reasonable way? It would be nice to make plots like those found on the wikipedia page. Cheers! Andrew - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] [basemap] stereographic projection bounding boxes
Jeff Whitaker wrote: You should be able to make all those plots without too much difficulty - just some trial and error in choosing the corners of the plot region. If you are making a polar stereographic projection, you can use projection='npstere' or 'spstere' and set the bounding latitude (the latitude that is tangent to the plot boundary - see the polarmaps.py example) and Basemap will determine the corners for you automatically. I don't know of any obvious way to do this for the equatorial case - it's pretty hard to guess what the user might want. I welcome any suggestions though. -Jeff Dear Jeff, Thanks for your quick reply. I ended up setting my boundaries by simply using the projection to plot my points, letting matplotlib plot the x,y points (without basemap to set the axes limits), and then taking the limits automatically computed by matplotlib and passing them through the inverse projection to get the lon,lat coordinates of the box. Now, on my next pass through, I'm using these as the bounding box information. As always, basemap is working very well. Cheers! Andrew - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] EPS fails to open in Adobe Illustrator
Darren Dale wrote: Hi Andrew, On Monday 10 July 2006 8:19 pm, Andrew Straw wrote: Where should I start trying to debug an issue where Adobe Illustrator CS for Windows is unable to open my EPS file generated by matplotlib? When attempting to open the file, a a dialog pops up that says, The operation cannot complete because of an unknown error. So much for informative error messages. Ghostview 3.6.1 can read the file just fine, and Acrobat Distiller 7.0 for windows can also convert it to a PDF just fine. FWIW, I'm using matplotlib.rc('ps',usedistiller=None), but I get similar problems setting usedistiller='xpdf'. I'm basically an EPS file newbie, so don't be afraid to give me the equivalent of did you make sure the power switch is turned on. I have a feeling its a problem with the font handling. I cant open a file in inkscape either, the image looks fine but the fonts are missing. Try setting ps.usedistiller = ghostscript. That converts the file to low-level postscript, which CS should definitely be able to open. It worked for inkscape, at least. Hi Darren, Hmm, that didn't do it. Simple plots (like simple_plot.py) work with no distiller step, so it must be something about my more complex plot. Unfortunately, it's a rather complex menagerie of code that produces the plot so I'm afraid that if I want to narrow this down, it'll be rather painful and slow going. I might just stick with the MPL-EPS-Distiller-PDF-Illustrator toolchain, which seems to work for the moment. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users