You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(12) |
Sep
(12) |
Oct
(56) |
Nov
(65) |
Dec
(37) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(59) |
Feb
(78) |
Mar
(153) |
Apr
(205) |
May
(184) |
Jun
(123) |
Jul
(171) |
Aug
(156) |
Sep
(190) |
Oct
(120) |
Nov
(154) |
Dec
(223) |
| 2005 |
Jan
(184) |
Feb
(267) |
Mar
(214) |
Apr
(286) |
May
(320) |
Jun
(299) |
Jul
(348) |
Aug
(283) |
Sep
(355) |
Oct
(293) |
Nov
(232) |
Dec
(203) |
| 2006 |
Jan
(352) |
Feb
(358) |
Mar
(403) |
Apr
(313) |
May
(165) |
Jun
(281) |
Jul
(316) |
Aug
(228) |
Sep
(279) |
Oct
(243) |
Nov
(315) |
Dec
(345) |
| 2007 |
Jan
(260) |
Feb
(323) |
Mar
(340) |
Apr
(319) |
May
(290) |
Jun
(296) |
Jul
(221) |
Aug
(292) |
Sep
(242) |
Oct
(248) |
Nov
(242) |
Dec
(332) |
| 2008 |
Jan
(312) |
Feb
(359) |
Mar
(454) |
Apr
(287) |
May
(340) |
Jun
(450) |
Jul
(403) |
Aug
(324) |
Sep
(349) |
Oct
(385) |
Nov
(363) |
Dec
(437) |
| 2009 |
Jan
(500) |
Feb
(301) |
Mar
(409) |
Apr
(486) |
May
(545) |
Jun
(391) |
Jul
(518) |
Aug
(497) |
Sep
(492) |
Oct
(429) |
Nov
(357) |
Dec
(310) |
| 2010 |
Jan
(371) |
Feb
(657) |
Mar
(519) |
Apr
(432) |
May
(312) |
Jun
(416) |
Jul
(477) |
Aug
(386) |
Sep
(419) |
Oct
(435) |
Nov
(320) |
Dec
(202) |
| 2011 |
Jan
(321) |
Feb
(413) |
Mar
(299) |
Apr
(215) |
May
(284) |
Jun
(203) |
Jul
(207) |
Aug
(314) |
Sep
(321) |
Oct
(259) |
Nov
(347) |
Dec
(209) |
| 2012 |
Jan
(322) |
Feb
(414) |
Mar
(377) |
Apr
(179) |
May
(173) |
Jun
(234) |
Jul
(295) |
Aug
(239) |
Sep
(276) |
Oct
(355) |
Nov
(144) |
Dec
(108) |
| 2013 |
Jan
(170) |
Feb
(89) |
Mar
(204) |
Apr
(133) |
May
(142) |
Jun
(89) |
Jul
(160) |
Aug
(180) |
Sep
(69) |
Oct
(136) |
Nov
(83) |
Dec
(32) |
| 2014 |
Jan
(71) |
Feb
(90) |
Mar
(161) |
Apr
(117) |
May
(78) |
Jun
(94) |
Jul
(60) |
Aug
(83) |
Sep
(102) |
Oct
(132) |
Nov
(154) |
Dec
(96) |
| 2015 |
Jan
(45) |
Feb
(138) |
Mar
(176) |
Apr
(132) |
May
(119) |
Jun
(124) |
Jul
(77) |
Aug
(31) |
Sep
(34) |
Oct
(22) |
Nov
(23) |
Dec
(9) |
| 2016 |
Jan
(26) |
Feb
(17) |
Mar
(10) |
Apr
(8) |
May
(4) |
Jun
(8) |
Jul
(6) |
Aug
(5) |
Sep
(9) |
Oct
(4) |
Nov
|
Dec
|
| 2017 |
Jan
(5) |
Feb
(7) |
Mar
(1) |
Apr
(5) |
May
|
Jun
(3) |
Jul
(6) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2025 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
1
(35) |
2
(29) |
3
(12) |
4
|
5
(8) |
6
(5) |
|
7
(3) |
8
(38) |
9
(15) |
10
(20) |
11
(14) |
12
(12) |
13
(17) |
|
14
(6) |
15
(41) |
16
(38) |
17
(31) |
18
(7) |
19
(14) |
20
(12) |
|
21
(3) |
22
(3) |
23
(15) |
24
(4) |
25
|
26
(3) |
27
(2) |
|
28
(7) |
29
(16) |
30
(17) |
31
(10) |
|
|
|
|
From: Michael D. <md...@st...> - 2008-12-10 22:13:32
|
Unfortunately, I think this is a bug. The ordering of fonts in the family list is being ignored, and Bitstream Vera Sans is winning over Nimbus Roman for reasons other than its name. I'll have to get this patch in for the bugfix release we're already planning. As a workaround, try putting only "Nimbus Roman No9 L" as the only font in the list. Does that help? Also, I don't see the Nimbus Roman font file (n021003l.ttf) anywhere in the debugging output. Are you sure it's in C:\Windows\Fonts ? Mike Jörgen Stenarson wrote: > Hi, > > congratulations on releasing 0.98.4. I especially like the new > improved possibilities for legends. > > I'm trying to understand how to change fonts. But I'm not very > successful. I use python 2.5 on windows xp with the latest 0.98.4 of > matplotlib. > > I want to create plots that work well with a manuscript in LaTeX using > the IEEE template. Using that template the regular text comes out in > Nimbus Roman No 9L, but I can't get matplotlib to use that font. > > Using the attached script (with default matplotlibrc) I end up with > BitstreamVeraSerif-Roman in the resulting pdf. So it seems only Vera > is recognized. In the attached file 'log.txt' is the output from > running the script with verbose.level=debug. > > From the log it seems the pdfcorefonts are not on the fontpath. But > still Times New Roman and palatino both are available in the system > font directory as ttf fonts. > > Any ideas on how to fix this > > /Jörgen > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. > The future of the web can't happen without you. Join us at MIX09 to help > pave the way to the Next Web now. Learn more and register at > http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Ryan W. <rw...@vn...> - 2008-12-10 20:24:37
|
Hi Everyone,
Does anyone know the long term plans of fixing Axes3d / Mplot3D in MPL? Is this ever going to be re-incorporated in this library in the future? Just wondering...
-Ryan Wagner
|
|
From: Jörgen S. <jor...@bo...> - 2008-12-10 19:27:11
|
Hi, congratulations on releasing 0.98.4. I especially like the new improved possibilities for legends. I'm trying to understand how to change fonts. But I'm not very successful. I use python 2.5 on windows xp with the latest 0.98.4 of matplotlib. I want to create plots that work well with a manuscript in LaTeX using the IEEE template. Using that template the regular text comes out in Nimbus Roman No 9L, but I can't get matplotlib to use that font. Using the attached script (with default matplotlibrc) I end up with BitstreamVeraSerif-Roman in the resulting pdf. So it seems only Vera is recognized. In the attached file 'log.txt' is the output from running the script with verbose.level=debug. From the log it seems the pdfcorefonts are not on the fontpath. But still Times New Roman and palatino both are available in the system font directory as ttf fonts. Any ideas on how to fix this /Jörgen |
|
From: Eric F. <ef...@ha...> - 2008-12-10 17:55:54
|
Andrea Gavana wrote: > Hi Mauro & All, > > On Wed, Dec 10, 2008 at 10:32 AM, Mauro Cavalcanti wrote: >> Dear Andrea, >> >> Greetings. I have tried your script here. >> >> 2008/12/10 Andrea Gavana <and...@gm...>: >>> I attach my small sample to the message. Am I doing something worng in >>> my call to contour? Why I am unable to see the 20 contour I specified >>> in my vector V? >> But you can. Simply change the line below to: >>> CS = plt.contourf(X, Y, Z, V=V) >>> CS = plt.contourf(X, Y, Z, V) >> (I did not understand the reason behind the "V=V" in the argument list?) > > Ah! I thought "V" was a keyword argument. Shame on me. Thank you for the hint. > >>> Another related problem is with contourf: if I modify the attached >>> sample to use contourf and clabel, I get this error: >> Well, this one I do not understand myself. > > Uhm, I will wait for further suggestions. Maybe I am doing something > stupid, again ;-) Not stupid at all; it just happens that clabel works only with contour, not with contourf. Clabel operates on the LineCollection generated by contour, but contourf generates a PolyCollection. It should be possible to call contourf, then contour, then clabel, and then make the LineCollection from contour invisible, but I don't have time now to come up with an example. Eric > > Thank you! > > Andrea. > > "Imagination Is The Only Weapon In The War Against Reality." > http://xoomer.alice.it/infinity77/ > > ------------------------------------------------------------------------------ > SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. > The future of the web can't happen without you. Join us at MIX09 to help > pave the way to the Next Web now. Learn more and register at > http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Ken M. <mc...@ii...> - 2008-12-10 17:19:30
|
On Dec 10, 2008, at 6:35 AM, massimo sandal wrote: > Thanks a lot for your answer. I am very happy to know that you are > alive and (mostly) healthy and that you didn't forget us! :) Oh no, I certainly haven't forgotten about you all! >> I'm sorry I didn't reply to your email. It fell through the >> cracks, so to speak. >> WxMpl development has been stalled for quite some time now because >> I developed bilateral carpal tunnel syndrome this past spring. It >> was not my intention to leave it abandoned and incompatible with >> matplotlib, but I've been finding everything to be a bit of an >> uphill battle these days. > > Woah, how bad. I'm sorry about that, I hope you're somehow recovering. Thanks. I'm going to have some surgery early next year, which will hopefully fix things. I intend to have WxMpl working again and safely in matplotlib's repository before then, as I'll be effectively offline for six months or so, at least in terms of writing code. > Thanks a lot for your interest. I didn't have time to go into the > wxmpl source, but another guy (Paulo Meira , mu...@gm... ) did > a terrific work in bringing wxmpl up to date. I think you could > start by contacting him. Yes, I've had his email with the patch flagged in Mail.app for approximately forever. Thanks for sending me a patched copy of wxmpl.py, too. It'll be very helpful in figuring out the sort of changes I need to make. > Thanks a lot for your feedback again. I develop a data analysis > application that uses wx and MPL and your little library made things > much easier. Thanks for your wonderful work. Thank you very much for your kind words. :-) Ken |
|
From: John H. <jd...@gm...> - 2008-12-10 17:14:34
|
We have just released a new version of matplotlib, available for download at https://sourceforge.net/project/showfiles.php?group_id=80706&package_id=278194&release_id=646146 These "what's new" release notes, with graphs and links, are available in html at http://matplotlib.sourceforge.net/users/whats_new.html Thanks to Charlie Moad for testing and preparing the source release, including binaries for OS X and Windows for python 2.4 and 2.5 (2.6 and 3.0 will not be available until numpy is available on those releases). Thanks to the many developers who contributed to this release, with contributions from Jae-Joon Lee, Michael Droettboom, Ryan May, Eric Firing, Manuel Metz, Jouni K. Seppaenen, Jeff Whitaker, Darren Dale, David Kaplan, Michiel de Hoon and many others who submitted patches What new in 0.98.4 ============================== It's been four months since the last matplotlib release, and there are a lot of new features and bug-fixes Legend enhancements -------------------- Jae-Joon has rewritten the legend class, and added support for multiple columns and rows, as well as fancy box drawing. See http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.legend http://matplotlib.sourceforge.net/api/artist_api.html#matplotlib.legend.Legend http://matplotlib.sourceforge.net/examples/pylab_examples/legend_demo3.html Fancy annotations and arrows ----------------------------- Jae-Joon has added lot's of support to annotations for drawing fancy boxes and connectors in annotations. See http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.annotate http://matplotlib.sourceforge.net/api/artist_api.html#matplotlib.patches.BoxStyle http://matplotlib.sourceforge.net/api/artist_api.html#matplotlib.patches.ArrowStyle http://matplotlib.sourceforge.net/api/artist_api.html#matplotlib.patches.ConnectionStyle http://matplotlib.sourceforge.net/examples/pylab_examples/annotation_demo2.html Native OS X backend -------------------- Michiel de Hoon has provided a native Mac OSX backend that is almost completely implemented in C. The backend can therefore use Quartz directly and, depending on the application, can be orders of magnitude faster than the existing backends. In addition, no third-party libraries are needed other than Python and NumPy. The backend is interactive from the usual terminal application on Mac using regular Python. It hasn't been tested with ipython yet, but in principle it should to work there as well. Set 'backend : macosx' in your matplotlibrc file, or run your script with:: > python myfile.py -dmacosx psd amplitude scaling ------------------------- Ryan May did a lot of work to rationalize the amplitude scaling of :func:`~matplotlib.pyplot.psd` and friends. The changes should increase MATLAB (TM) compatabililty and increase scaling options. http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.psd http://matplotlib.sourceforge.net/examples/pylab_examples/psd_demo2.html#pylab-examples-psd-demo2 http://matplotlib.sourceforge.net/examples/pylab_examples/psd_demo3.html#pylab-examples-psd-demo3 Fill between ------------------ Added a fill_between function to make it easier to do shaded region plots in the presence of masked data. You can pass an *x* array and a *ylower* and *yupper* array to fill betweem, and an optional *where* argument which is a logical mask where you want to do the filling. See http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.fill_between http://matplotlib.sourceforge.net/examples/pylab_examples/fill_between.html Lots more ----------- Here are the 0.98.4 notes from the CHANGELOG:: Added mdehoon's native macosx backend from sf patch 2179017 - JDH Removed the prints in the set_*style commands. Return the list of pprinted strings instead - JDH Some of the changes Michael made to improve the output of the property tables in the rest docs broke of made difficult to use some of the interactive doc helpers, eg setp and getp. Having all the rest markup in the ipython shell also confused the docstrings. I added a new rc param docstring.harcopy, to format the docstrings differently for hardcopy and other use. Ther ArtistInspector could use a little refactoring now since there is duplication of effort between the rest out put and the non-rest output - JDH Updated spectral methods (psd, csd, etc.) to scale one-sided densities by a factor of 2 and, optionally, scale all densities by the sampling frequency. This gives better MatLab compatibility. -RM Fixed alignment of ticks in colorbars. -MGD drop the deprecated "new" keyword of np.histogram() for numpy 1.2 or later. -JJL Fixed a bug in svg backend that new_figure_manager() ignores keywords arguments such as figsize, etc. -JJL Fixed a bug that the handlelength of the new legend class set too short when numpoints=1 -JJL Added support for data with units (e.g. dates) to Axes.fill_between. -RM Added fancybox keyword to legend. Also applied some changes for better look, including baseline adjustment of the multiline texts so that it is center aligned. -JJL The transmuter classes in the patches.py are reorganized as subclasses of the Style classes. A few more box and arrow styles are added. -JJL Fixed a bug in the new legend class that didn't allowed a tuple of coordinate vlaues as loc. -JJL Improve checks for external dependencies, using subprocess (instead of deprecated popen*) and distutils (for version checking) - DSD Reimplementaion of the legend which supports baseline alignement, multi-column, and expand mode. - JJL Fixed histogram autoscaling bug when bins or range are given explicitly (fixes Debian bug 503148) - MM Added rcParam axes.unicode_minus which allows plain hypen for minus when False - JDH Added scatterpoints support in Legend. patch by Erik Tollerud - JJL Fix crash in log ticking. - MGD Added static helper method BrokenHBarCollection.span_where and Axes/pyplot method fill_between. See examples/pylab/fill_between.py - JDH Add x_isdata and y_isdata attributes to Artist instances, and use them to determine whether either or both coordinates are used when updating dataLim. This is used to fix autoscaling problems that had been triggered by axhline, axhspan, axvline, axvspan. - EF Update the psd(), csd(), cohere(), and specgram() methods of Axes and the csd() cohere(), and specgram() functions in mlab to be in sync with the changes to psd(). In fact, under the hood, these all call the same core to do computations. - RM Add 'pad_to' and 'sides' parameters to mlab.psd() to allow controlling of zero padding and returning of negative frequency components, respecitively. These are added in a way that does not change the API. - RM Fix handling of c kwarg by scatter; generalize is_string_like to accept numpy and numpy.ma string array scalars. - RM and EF Fix a possible EINTR problem in dviread, which might help when saving pdf files from the qt backend. - JKS Fix bug with zoom to rectangle and twin axes - MGD Added Jae Joon's fancy arrow, box and annotation enhancements -- see examples/pylab_examples/annotation_demo2.py Autoscaling is now supported with shared axes - EF Fixed exception in dviread that happened with Minion - JKS set_xlim, ylim now return a copy of the viewlim array to avoid modify inplace surprises Added image thumbnail generating function matplotlib.image.thumbnail. See examples/misc/image_thumbnail.py - JDH Applied scatleg patch based on ideas and work by Erik Tollerud and Jae-Joon Lee. - MM Fixed bug in pdf backend: if you pass a file object for output instead of a filename, e.g. in a wep app, we now flush the object at the end. - JKS Add path simplification support to paths with gaps. - EF Fix problem with AFM files that don't specify the font's full name or family name. - JKS Added 'scilimits' kwarg to Axes.ticklabel_format() method, for easy access to the set_powerlimits method of the major ScalarFormatter. - EF Experimental new kwarg borderpad to replace pad in legend, based on suggestion by Jae-Joon Lee. - EF Allow spy to ignore zero values in sparse arrays, based on patch by Tony Yu. Also fixed plot to handle empty data arrays, and fixed handling of markers in figlegend. - EF Introduce drawstyles for lines. Transparently split linestyles like 'steps--' into drawstyle 'steps' and linestyle '--'. Legends always use drawstyle 'default'. - MM Fixed quiver and quiverkey bugs (failure to scale properly when resizing) and added additional methods for determining the arrow angles - EF Fix polar interpolation to handle negative values of theta - MGD Reorganized cbook and mlab methods related to numerical calculations that have little to do with the goals of those two modules into a separate module numerical_methods.py Also, added ability to select points and stop point selection with keyboard in ginput and manual contour labeling code. Finally, fixed contour labeling bug. - DMK Fix backtick in Postscript output. - MGD [ 2089958 ] Path simplification for vector output backends Leverage the simplification code exposed through path_to_polygons to simplify certain well-behaved paths in the vector backends (PDF, PS and SVG). "path.simplify" must be set to True in matplotlibrc for this to work. - MGD Add "filled" kwarg to Path.intersects_path and Path.intersects_bbox. - MGD Changed full arrows slightly to avoid an xpdf rendering problem reported by Friedrich Hagedorn. - JKS Fix conversion of quadratic to cubic Bezier curves in PDF and PS backends. Patch by Jae-Joon Lee. - JKS Added 5-point star marker to plot command q- EF Fix hatching in PS backend - MGD Fix log with base 2 - MGD Added support for bilinear interpolation in NonUniformImage; patch by Gregory Lielens. - EF Added support for multiple histograms with data of different length - MM Fix step plots with log scale - MGD Fix masked arrays with markers in non-Agg backends - MGD Fix clip_on kwarg so it actually works correctly - MGD Fix locale problems in SVG backend - MGD fix quiver so masked values are not plotted - JSW improve interactive pan/zoom in qt4 backend on windows - DSD Fix more bugs in NaN/inf handling. In particular, path simplification (which does not handle NaNs or infs) will be turned off automatically when infs or NaNs are present. Also masked arrays are now converted to arrays with NaNs for consistent handling of masks and NaNs - MGD and EF |
|
From: Mauro C. <mau...@gm...> - 2008-12-10 13:47:56
|
Dear ALL,
Searching the MPL online documentation, I just found out that plot
linestyles can also be represented as a string (legal string values
are 'solid'|'dashed'|'dashdot'|'dotted'). So, I would like to ask you
gentlemen if such string representation is also available for plot
markers (I could not find this in the docs and so I am afraid it is
not) ?
Also, using linestyles in the conventional way (as single characters),
the docs are not very clear as what is what, so in linestyles = ['_',
'-', '--', ':'] is the underline character ('_') representing a solid
line? But in this case, what is the '-' character representing? An so
on... In my application, either "-", "--" (dotted?) and "-." (dash
dotted?) show solid lines and only ":" (dotted) works as expected,
showing a dotted line.
I am aware that this might, perhaps, be answered by trial-and-error in
the interactive prompt, but in my opinion if one can find the needed
information in the docs, this saves a lot of time with these tests
that sometimes are too much.
Thanks in advance for any hints and tips.
Best regards,
--
Dr. Mauro J. Cavalcanti
Ecoinformatics Studio
P.O. Box 46521, CEP 20551-970
Rio de Janeiro, RJ, BRASIL
E-mail: mau...@gm...
Web: http://studio.infobio.net
Linux Registered User #473524 * Ubuntu User #22717
"Life is complex. It consists of real and imaginary parts."
|
|
From: Nils W. <nw...@ia...> - 2008-12-10 13:46:40
|
--- the forwarded message follows --- |
|
From: Nils W. <nw...@ia...> - 2008-12-10 13:11:22
|
On Wed, 10 Dec 2008 04:24:24 -0800 "Joshua Lippai" <dis...@gm...> wrote: > With PyExcelerator installed, you can use the Excel >tools in the > matplotlib toolkits > > http://matplotlib.sourceforge.net/users/toolkits.html > > Using them, you can read in Excel files as recarrays and >write > recarrays to Excel files. It's fairly well-documented >through > docstrings. > > Josh > Hi Josh, Thank you for your prompt response ! I found an example in matplotlib/examples/pylab_examples loadrec.py Is it possible to color cells depending on the entry ? Nils |
|
From: massimo s. <mas...@un...> - 2008-12-10 12:26:25
|
Ken, Thanks a lot for your answer. I am very happy to know that you are alive and (mostly) healthy and that you didn't forget us! :) > I'm sorry I didn't reply to your email. It fell through the cracks, so > to speak. > > WxMpl development has been stalled for quite some time now because I > developed bilateral carpal tunnel syndrome this past spring. It was not > my intention to leave it abandoned and incompatible with matplotlib, but > I've been finding everything to be a bit of an uphill battle these days. Woah, how bad. I'm sorry about that, I hope you're somehow recovering. > My current plan is to spend some time later this month bringing WxMpl up > to date with the API changes. I'd be very pleased to see it hosted as a > matplotlib toolkit, so I'll move it over once it's working properly. If > someone wants to move the source over and start hacking on it in the > interim, please be my guest. Thanks a lot for your interest. I didn't have time to go into the wxmpl source, but another guy (Paulo Meira , mu...@gm... ) did a terrific work in bringing wxmpl up to date. I think you could start by contacting him. I attach his patched wxmpl.py in this mail. What I can say is that it is mostly working, at least for basic plotting, but it has some funny bug here and there (i.e. one of my collegues found on his system that the axes direction flips when zooming). It could be an interesting startpoint. Thanks a lot for your feedback again. I develop a data analysis application that uses wx and MPL and your little library made things much easier. Thanks for your wonderful work. Massimo -- Massimo Sandal , Ph.D. University of Bologna Department of Biochemistry "G.Moruzzi" snail mail: Via Irnerio 48, 40126 Bologna, Italy email: mas...@un... web: http://www.biocfarm.unibo.it/samori/people/sandal.html tel: +39-051-2094388 fax: +39-051-2094387 |
|
From: Andrea G. <and...@gm...> - 2008-12-10 11:03:40
|
Hi Mauro & All, On Wed, Dec 10, 2008 at 10:32 AM, Mauro Cavalcanti wrote: > Dear Andrea, > > Greetings. I have tried your script here. > > 2008/12/10 Andrea Gavana <and...@gm...>: >> I attach my small sample to the message. Am I doing something worng in >> my call to contour? Why I am unable to see the 20 contour I specified >> in my vector V? > > But you can. Simply change the line below to: >> CS = plt.contourf(X, Y, Z, V=V) > >> CS = plt.contourf(X, Y, Z, V) > (I did not understand the reason behind the "V=V" in the argument list?) Ah! I thought "V" was a keyword argument. Shame on me. Thank you for the hint. >> Another related problem is with contourf: if I modify the attached >> sample to use contourf and clabel, I get this error: > > Well, this one I do not understand myself. Uhm, I will wait for further suggestions. Maybe I am doing something stupid, again ;-) Thank you! Andrea. "Imagination Is The Only Weapon In The War Against Reality." http://xoomer.alice.it/infinity77/ |
|
From: Mauro C. <mau...@gm...> - 2008-12-10 10:32:41
|
Dear Andrea, Greetings. I have tried your script here. 2008/12/10 Andrea Gavana <and...@gm...>: > I attach my small sample to the message. Am I doing something worng in > my call to contour? Why I am unable to see the 20 contour I specified > in my vector V? But you can. Simply change the line below to: > CS = plt.contourf(X, Y, Z, V=V) > CS = plt.contourf(X, Y, Z, V) (I did not understand the reason behind the "V=V" in the argument list?) > Another related problem is with contourf: if I modify the attached > sample to use contourf and clabel, I get this error: Well, this one I do not understand myself. The plot I generated is attached. HTH, Ciao, -- Dr. Mauro J. Cavalcanti Ecoinformatics Studio P.O. Box 46521, CEP 20551-970 Rio de Janeiro, RJ, BRASIL E-mail: mau...@gm... Web: http://studio.infobio.net Linux Registered User #473524 * Ubuntu User #22717 "Life is complex. It consists of real and imaginary parts." |
|
From: Andrea G. <and...@gm...> - 2008-12-10 10:14:10
|
Hi All,
I am trying to create a contour map with matplotlib. I have
modified the source code for the contour sample which comes with the
matplotlib 0.98.3 online documentation: I am using the "contour(X, Y,
Z, V)" API call and, as the docs say:
"""
contour(X,Y,Z,V)
draw contour lines at the values specified in sequence V
"""
I have specified a 20-elements vector in V, buit I still only see 6
contours being drawn, namely the ones at the values:
[-1.0, -0.5, 0.0, 0.5, 1.0, 1.5]
I attach my small sample to the message. Am I doing something worng in
my call to contour? Why I am unable to see the 20 contour I specified
in my vector V?
Another related problem is with contourf: if I modify the attached
sample to use contourf and clabel, I get this error:
Traceback (most recent call last):
File "E:\MyProjects\prova143.py", line 24, in <module>
plt.clabel(CS, fontsize=9, inline=1)
File "C:\Python25\lib\site-packages\matplotlib\pyplot.py", line
1736, in clabel
ret = gca().clabel(*args, **kwargs)
File "C:\Python25\lib\site-packages\matplotlib\axes.py", line 6027, in clabel
return CS.clabel(*args, **kwargs)
File "C:\Python25\lib\site-packages\matplotlib\contour.py", line
161, in clabel
self.labelCValueList = np.take(self.cvalues, self.labelIndiceList)
File "C:\Python25\lib\site-packages\numpy\core\fromnumeric.py", line
85, in take
return take(indices, axis, out, mode)
IndexError: index out of range for array
This is in Windows XP, Python 2.5.2, matplotlib 0.98.3, numpy 1.2.0.
Thank you for your suggestions.
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
# CODE START
#!/usr/bin/env python
import matplotlib
import numpy as np
import matplotlib.mlab as mlab
import matplotlib.pyplot as plt
delta = 0.025
x = np.arange(-3.0, 3.0, delta)
y = np.arange(-2.0, 2.0, delta)
X, Y = np.meshgrid(x, y)
Z1 = mlab.bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0)
Z2 = mlab.bivariate_normal(X, Y, 1.5, 0.5, 1, 1)
# difference of Gaussians
Z = 10.0 * (Z2 - Z1)
V = np.linspace(np.min(np.min(Z)), np.max(np.max(Z)), 20)
print V
# And you can manually specify the colors of the contour
plt.figure()
CS = plt.contourf(X, Y, Z, V=V)
plt.clabel(CS, fontsize=9, inline=1)
plt.show()
# CODE END
|
|
From: Ken M. <mc...@ii...> - 2008-12-09 20:36:07
|
Massimo, I'm sorry I didn't reply to your email. It fell through the cracks, so to speak. WxMpl development has been stalled for quite some time now because I developed bilateral carpal tunnel syndrome this past spring. It was not my intention to leave it abandoned and incompatible with matplotlib, but I've been finding everything to be a bit of an uphill battle these days. My current plan is to spend some time later this month bringing WxMpl up to date with the API changes. I'd be very pleased to see it hosted as a matplotlib toolkit, so I'll move it over once it's working properly. If someone wants to move the source over and start hacking on it in the interim, please be my guest. Ken On Nov 21, 2008, at 4:52 AM, massimo sandal wrote: > Hi, > > I am a wxMPL user. I use it as a component to blend MPL into a wx > GUI for a data analysis application I develop ( http://code.google.com/p/hooke > ). > > I was extremly satisfied by that package, but I've noticed it > doesn't play well with latest mpl and needs to be patched. Another > wonderful guy on this list (Paulo Meira) managed to patch it get it > working but I am receiving reports it could be still buggy and it is > a completely unofficial patch. > > I tried to wrote to Ken McIvor (wxmpl author) about this but > received no answer. > So, I'd like to know: > - Is anyone able to contact Ken McIvor? > - Does anyone know about the wxmpl status? > - If wxmpl has been abandoned by its author, is there anyone > interested (beyond myself) in continuing its development? > > Thanks a lot, > Massimo > > -- > Massimo Sandal , Ph.D. > University of Bologna > Department of Biochemistry "G.Moruzzi" > > snail mail: > Via Irnerio 48, 40126 Bologna, Italy > > email: > mas...@un... > > web: > http://www.biocfarm.unibo.it/samori/people/sandal.html > > tel: +39-051-2094388 > fax: +39-051-2094387 > < > massimo_sandal > .vcf > > > ------------------------------------------------------------------------- > 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=100&url=/_______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Mauro C. <mau...@gm...> - 2008-12-09 20:10:38
|
Dear John,
Thanks, it works well!
Best regards,
2008/12/9 John Hunter <jd...@gm...>:
> Yep, we have a color converter for that -- it recognizes any mpl color
> string and returns rgba:
>
> In [72]: from matplotlib.colors import colorConverter
>
> In [73]: colorConverter.to_rgba('b')
> Out[73]: (0.0, 0.0, 1.0, 1.0)
>
> In [74]: colorConverter.to_rgba('blue')
> Out[74]: (0.0, 0.0, 1.0, 1.0)
>
--
Dr. Mauro J. Cavalcanti
Ecoinformatics Studio
P.O. Box 46521, CEP 20551-970
Rio de Janeiro, RJ, BRASIL
E-mail: mau...@gm...
Web: http://studio.infobio.net
Linux Registered User #473524 * Ubuntu User #22717
"Life is complex. It consists of real and imaginary parts."
|
|
From: John H. <jd...@gm...> - 2008-12-09 19:24:23
|
On Tue, Dec 9, 2008 at 1:01 PM, Mauro Cavalcanti <mau...@gm...> wrote:
> Dear ALL,
>
> MPL accepts several formats for passing color information for the
> plotting methods (plot, xlabel, ylabel, etc.) and these are well
> documented. The set_color() and other methods in
> matplotlib.Lines.Line2D accept all these formats, but I could not
> figure out how to retrieve the current color of a plot using the
> get_color() method in a format other than the 'b', 'r', 'g', etc.
> predefined color symbols! I would instead like to be able to retrieve
> the current color in RGB hex or HTML format. Is it possible?
Yep, we have a color converter for that -- it recognizes any mpl color
string and returns rgba:
In [72]: from matplotlib.colors import colorConverter
In [73]: colorConverter.to_rgba('b')
Out[73]: (0.0, 0.0, 1.0, 1.0)
In [74]: colorConverter.to_rgba('blue')
Out[74]: (0.0, 0.0, 1.0, 1.0)
|
|
From: Mauro C. <mau...@gm...> - 2008-12-09 19:02:01
|
Dear ALL, MPL accepts several formats for passing color information for the plotting methods (plot, xlabel, ylabel, etc.) and these are well documented. The set_color() and other methods in matplotlib.Lines.Line2D accept all these formats, but I could not figure out how to retrieve the current color of a plot using the get_color() method in a format other than the 'b', 'r', 'g', etc. predefined color symbols! I would instead like to be able to retrieve the current color in RGB hex or HTML format. Is it possible? Thanks in advance! With best regards, -- Dr. Mauro J. Cavalcanti Ecoinformatics Studio P.O. Box 46521, CEP 20551-970 Rio de Janeiro, RJ, BRASIL E-mail: mau...@gm... Web: http://studio.infobio.net Linux Registered User #473524 * Ubuntu User #22717 "Life is complex. It consists of real and imaginary parts." |
|
From: Mauro C. <mau...@gm...> - 2008-12-09 17:12:25
|
Dear Scott & Jeff, Sorry for the delay in replying, I was off office for a while. 2008/12/9 Scott Sinclair <sco...@gm...>: > As Jeff noted earlier, the number of elements in an array can't be > increased simply by reshaping it, so the error message isn't too > mysterious, if carefully considered. Sure, I got lost because I tried to follow the solution previously presented in the posting I referred to, since the example data I provided are identical in format to that used in that solution (a 3-column space delimited file, with the first two representing the longitude and latitude, and the 3rd representing the variable of interest). > 1. You have a small number of scattered data values in 'grid.dat' with > their locations specified by lat/lon co-ordinates. > 2. You want to create a regular square/rectangular grid that spans > your region of interest and assign the values in 'grid.dat' to the > grid box in which they fall, with all other regions of the grid being > masked. > 3. You then want to plot the masked rectangular grid onto a Basemap instance. You did understood it very correctly, and of course offered a much better description than I could provide myself using my pidgin English :-). Indeed, there is just one detail to add to the above problem description, and this is the fact that the "region of interest" may span the entire world (land or sea, depending on the biological organism under study). > The attached script shows one way to do this (using the imshow > method), I've left the task assigning the data values to the correct > grid box for you.. Thank you very much, I feel somewhat ashamed! Anyway, the final product of this project will be made freely available under GPL, so it will belong to everyone (and due credit will be given to all of you meteorologists, physicists, mathematicians, etc. that have been so helpful!) Returning to the techical aspects of the problem, it is indeed the assignment of data values to the correct grid box that lays in the core of the second part of my question -- it may indeed be not so difficult as the previous requirement, that is to build the data file (with the data values of interest) *before* the grid analysis, from simple lat-long files for each species under study (usually up to 20, but may be more). But I will develop this further. One more detail: is it possible to plot the value of the variable of interest, corresponding to each square of the grid, inside the respective square? With warmest regards, -- Dr. Mauro J. Cavalcanti Ecoinformatics Studio P.O. Box 46521, CEP 20551-970 Rio de Janeiro, RJ, BRASIL E-mail: mau...@gm... Web: http://studio.infobio.net Linux Registered User #473524 * Ubuntu User #22717 "Life is complex. It consists of real and imaginary parts." |
|
From: Scott S. <sco...@gm...> - 2008-12-09 16:33:39
|
> Mauro Cavalcanti wrote:
> I tried to do:
>
> coords = numpy.loadtxt('grid.dat')
> lon = coords[:,0]
> lat = coords[:,1]
> dat = coords[:,2]
> X, Y = numpy.meshgrid(lon, lat)
> nlons = X.shape[1]
> nlats = X.shape[0]
> Z = dat.reshape(nlats,nlons)
>
> (so that I could proceed to plotting with the X,Y,Z arrays), but got
> another error:
>
> "ValueError: total size of new array must be unchanged"
>
> and with this I get lost.... :(
Hi Mauro,
As Jeff noted earlier, the number of elements in an array can't be
increased simply by reshaping it, so the error message isn't too
mysterious, if carefully considered.
This might be a good time to step back from the code for a moment and
consider the problem that needs to be solved.
As I understand it:
1. You have a small number of scattered data values in 'grid.dat' with
their locations specified by lat/lon co-ordinates.
2. You want to create a regular square/rectangular grid that spans
your region of interest and assign the values in 'grid.dat' to the
grid box in which they fall, with all other regions of the grid being
masked.
3. You then want to plot the masked rectangular grid onto a Basemap instance.
The attached script shows one way to do this (using the imshow
method), I've left the task assigning the data values to the correct
grid box for you..
Cheers,
Scott
|
|
From: Fago, M. - A. <Mat...@it...> - 2008-12-09 16:12:40
|
> From: Ryan May > The scaling changes are in, as well as the warning and the corresponding > lines in > api_changes and CHANGELOG. I also added the converted matlab demo I > used to > figure this stuff out. Now would probably be the time to see if I did > something > wrong (especially the warning). The magnitudes do seem better, and the error message works in a reasonable way (no warning if explicitly set the new arg). The plot does still look somewhat different from Matlab (e.g., the peak at 150 Hz is much larger in matplotlib), even with window=window_none. Fernando might have a point about unit tests: perhaps we could somehow get a few numerical values out of Matlab to compare to in a test? Regardless, much better. Thank you! - Matt This e-mail and any files transmitted with it may be proprietary and are intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error please notify the sender. Please note that any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of ITT Corporation. The recipient should check this e-mail and any attachments for the presence of viruses. ITT accepts no liability for any damage caused by any virus transmitted by this e-mail. |
|
From: Jeff W. <js...@fa...> - 2008-12-09 15:08:07
|
Mauro Cavalcanti wrote:
> Dear Jeff,
>
> 2008/12/9 Jeff Whitaker <js...@fa...>:
>
>> Mauro: The shape of x, y, and dat must all be (nlats, nlons).
>>
>
> I tried to do:
>
> coords = numpy.loadtxt('grid.dat')
> lon = coords[:,0]
> lat = coords[:,1]
> dat = coords[:,2]
> X, Y = numpy.meshgrid(lon, lat)
> nlons = X.shape[1]
> nlats = X.shape[0]
> Z = dat.reshape(nlats,nlons)
>
> (so that I could proceed to plotting with the X,Y,Z arrays), but got
> another error:
>
> "ValueError: total size of new array must be unchanged"
>
> and with this I get lost.... :(
>
> I tried to follow the guidelines you provided for Mr. Tim Michelsen on
> a previous post
> (http://www.nabble.com/plotting-a-contour-map-from-CSV-file-td18440459.html)
> but it didn't help (however, that provided me with a solution to
> another problem!).
>
> Best regards,
>
>
Mauro: This will only work is dat is length(nlons*nlats). Is it?
-Jeff
--
Jeffrey S. Whitaker Phone : (303)497-6313
NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449
325 Broadway Boulder, CO, USA 80305-3328
|
|
From: Jeff W. <js...@fa...> - 2008-12-09 13:17:56
|
Mauro Cavalcanti wrote:
> Dear Jeff,
>
> 2008/12/9 Jeff Whitaker <js...@fa...>:
>
>> Assuming that this is a regular grid (so that using meshgrid makes sense)
>> you can
>>
>
>
>> using pcolor:
>> m.pcolormesh(x,y,dat)
>>
>
> Unfortunately, this didn't work. I got the error message (using the
> example data from my previous post):
>
> "File "/usr/lib/python2.5/site-packages/matplotlib/axes.py", line
> 6091, in pcolormesh
> C = ma.ravel(C[0:Ny-1, 0:Nx-1]) # data point in each cell is value at
> IndexError: too many indices"
>
>
>> using contourf:
>> m.contourf(x,y,dat,clevs)
>>
>
> Not tried because contour maps are not exactly what I need.
>
>
>> using imshow:
>> m.imshow(dat)
>>
>
> Another error message:
>
> " File "/usr/lib/python2.5/site-packages/matplotlib/image.py", line
> 292, in set_data
> raise TypeError("Invalid dimensions for image data")
> TypeError: Invalid dimensions for image data"
>
> (Have I to meshgrid the data first?)
>
Mauro: The shape of x, y, and dat must all be (nlats, nlons).
>
>> There are examples of all three included with basemap.
>>
>
> Indeed, I could not find an example of pcolormesh(). But the
> ccsm_popgrid.py example offers a potential solution for another
> problem (but this is the second part of my question).
>
test.py includes pcolormesh examples (the call signature for pcolor is
the same though).
-Jeff
> Best wishes,
>
>
--
Jeffrey S. Whitaker Phone : (303)497-6313
NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449
325 Broadway Boulder, CO, USA 80305-3328
|
|
From: Mauro C. <mau...@gm...> - 2008-12-09 13:05:00
|
Dear Jeff,
2008/12/9 Jeff Whitaker <js...@fa...>:
> Assuming that this is a regular grid (so that using meshgrid makes sense)
> you can
> using pcolor:
> m.pcolormesh(x,y,dat)
Unfortunately, this didn't work. I got the error message (using the
example data from my previous post):
"File "/usr/lib/python2.5/site-packages/matplotlib/axes.py", line
6091, in pcolormesh
C = ma.ravel(C[0:Ny-1, 0:Nx-1]) # data point in each cell is value at
IndexError: too many indices"
> using contourf:
> m.contourf(x,y,dat,clevs)
Not tried because contour maps are not exactly what I need.
> using imshow:
> m.imshow(dat)
Another error message:
" File "/usr/lib/python2.5/site-packages/matplotlib/image.py", line
292, in set_data
raise TypeError("Invalid dimensions for image data")
TypeError: Invalid dimensions for image data"
(Have I to meshgrid the data first?)
> There are examples of all three included with basemap.
Indeed, I could not find an example of pcolormesh(). But the
ccsm_popgrid.py example offers a potential solution for another
problem (but this is the second part of my question).
Best wishes,
--
Dr. Mauro J. Cavalcanti
Ecoinformatics Studio
P.O. Box 46521, CEP 20551-970
Rio de Janeiro, RJ, BRASIL
E-mail: mau...@gm...
Web: http://studio.infobio.net
Linux Registered User #473524 * Ubuntu User #22717
"Life is complex. It consists of real and imaginary parts."
|
|
From: Mauro C. <mau...@gm...> - 2008-12-09 12:55:06
|
Dear Jeff, 2008/12/9 Jeff Whitaker <js...@fa...>: > Mauro: If your points are defined in terms of longitude and latitude, you > have to convert to map projection coordinates using the __call__ method of > the Basemap instance, i.e. > > x, y = m(lon, lat) # lon,lat can be arrays, lists or scalars. m is a > Basemap instance. > > You then pass x,y to the plot command (be it 'plot', 'scatter', 'contour' or > whatever). > OK, but since this step is not necessary with the usual Equirectangular projection, I got confused. Maybe this could also be included in the documentation? Best regards, -- Dr. Mauro J. Cavalcanti Ecoinformatics Studio P.O. Box 46521, CEP 20551-970 Rio de Janeiro, RJ, BRASIL E-mail: mau...@gm... Web: http://studio.infobio.net Linux Registered User #473524 * Ubuntu User #22717 "Life is complex. It consists of real and imaginary parts." |
|
From: Jeff W. <js...@fa...> - 2008-12-09 12:42:13
|
Mauro Cavalcanti wrote: > Dear Jeff & ALL, > > This is just a simple question on plotting points on Basemap (maybe it > will have to be pursued further). I presume points could be plotted > onto maps, no matter what projection is used -- so, I have been > plotting quite well on maps using an Equirectangular projetion and one > of your "classical" examples shows the plot of points on maps using an > ortographic projection. However, my points are not displayed when I, > change the map projection, say, from Equirectangular to South Polar > Stereographic, even if most of the points are well within range in the > new projection. Any hints? > > Best regards, > > Mauro: If your points are defined in terms of longitude and latitude, you have to convert to map projection coordinates using the __call__ method of the Basemap instance, i.e. x, y = m(lon, lat) # lon,lat can be arrays, lists or scalars. m is a Basemap instance. You then pass x,y to the plot command (be it 'plot', 'scatter', 'contour' or whatever). -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449 325 Broadway Boulder, CO, USA 80305-3328 |