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
(2) |
2
(4) |
3
(16) |
4
(4) |
5
(15) |
6
(16) |
7
(6) |
8
(4) |
9
(9) |
10
(5) |
11
(8) |
12
(14) |
13
(19) |
14
(21) |
15
(8) |
16
(6) |
17
(10) |
18
(22) |
19
(15) |
20
(7) |
21
(21) |
22
(1) |
23
(6) |
24
(16) |
25
(12) |
26
(11) |
27
(27) |
28
(7) |
29
|
30
(4) |
31
(5) |
|
|
|
|
|
2011年1月20日 Uri Laserson <las...@mi...>: > Hi all, > I recently reinstalled MPL from scratch on top of python2.7 that I built > from scratch using homebrew on OS X Snow Leopard. Since then, I have been > getting the following types of warnings whenever I plot something: > /Users/laserson/matplotlib/lib/python2.7/site-packages/matplotlib/font_manager.py:1242: > UserWarning: findfont: Font family ['sans-serif'] not found. Falling back to > Bitstream Vera Sans > (prop.get_family(), self.defaultFamily[fontext])) I'm not sure what you mean by "using homebrew" (is this a software package or do you mean you compiled it yourself), but have you specified anything special in your matplotlibrc? Friedrich
Dear All, I am using contour plot and I am drawing different contours with different colors and linestyles and I would like to have a legend with a caption for each contour function used. Here you can see an example of what I would like to do >> #create the 2D histogram and the x and y axis >> x, y = np.random.normal(0, 0.5, 1000), np.random.normal(0, 1, 1000) >> h, xe,ye = np.histogram2d(x,y, bins=25) >> xe, ye = (xe[1:]+xe[:-1])/2, (ye[1:]+ye[:-1])/2 >> >> lines,text = [], [] # initialise lists >> >> #contour plots >> lines.append(plt.contour(xe,ye,h, levels=[10,9], linestyles="-", colors="k")) >> text.append("level=10, 9") >> >> lines.append(plt.contour(xe,ye,h, levels=[5,4], linestyles="--", colors="r")) >> text.append("level=5, 4") >> >> plt.legend(lines, text) Everything goes well untill I plot the legend. At the end of the mail I report the error that I get. Anyway, if I do >> plt.legend(lines) I don't get any errors but it's quite useless, since the text of the legend is just like: <matplotlib.contour.ContourSet instance at 0x6bedc20> as you can see from the attached figure. I've the feeling that the problem is that "contour" gives back a "matplotlib.contour.ContourSet instance", while the functions like "plot" gives back a "<matplotlib.lines.Line2D object". Does anyone knows how to do what I want? Thanks in advance Francesco ps: Error message follow -------------------------- /usr/lib/pymodules/python2.6/matplotlib/pyplot.pyc in legend(*args, **kwargs) 2435 # changes will be lost 2436 def legend(*args, **kwargs): -> 2437 ret = gca().legend(*args, **kwargs) 2438 draw_if_interactive() 2439 return ret /usr/lib/pymodules/python2.6/matplotlib/axes.pyc in legend(self, *args, **kwargs) 4042 4043 handles = cbook.flatten(handles) -> 4044 self.legend_ = mlegend.Legend(self, handles, labels, **kwargs) 4045 return self.legend_ 4046 /usr/lib/pymodules/python2.6/matplotlib/legend.pyc in __init__(self, parent, handles, labels, loc, numpoints, markerscale, scatterpoints, scatteryoffsets, prop, pad, labelsep, handlelen, handletextsep, axespad, borderpad, labelspacing, handlelength, handletextpad, borderaxespad, columnspacing, ncol, mode, fancybox, shadow, title, bbox_to_anchor, bbox_transform) 302 303 # init with null renderer --> 304 self._init_legend_box(handles, labels) 305 306 self.set_title(title) /usr/lib/pymodules/python2.6/matplotlib/legend.pyc in _init_legend_box(self, handles, labels) 580 581 handle = handle_list[-1] --> 582 handlebox.add_artist(handle) 583 if hasattr(handle, "_legmarker"): 584 handlebox.add_artist(handle._legmarker) /usr/lib/pymodules/python2.6/matplotlib/offsetbox.pyc in add_artist(self, a) 473 'Add any :class:`~matplotlib.artist.Artist` to the container box' 474 self._children.append(a) --> 475 a.set_transform(self.get_transform()) 476 477 AttributeError: 'NoneType' object has no attribute 'set_transform'
Daniel, Did you try saving the figure with same dpi ?. Try the following. plt.savefig('name',dpi=300) On Fri, Jan 21, 2011 at 9:08 AM, Daniel Mader < dan...@go...> wrote: > Hi, > > I need to create a huge range of plots with need to fit into a report > (OpenOffice or Word). In order to save the work of manual resizing them when > dragged and dropped, I wanted to preset a correct figure size with a nice > resolution: > > pylab.rcParams['figure.figsize'] = 5,4 > pylab.rcParams['figure.dpi'] = 300 > > Now, the created figure has a size of 500x400 pixels, and when I import it > into a word processor, its dimensions are reported as 12.7x10.16cm2, which > matches the figsize definition. Yet, the resulting images are pretty much > blurred... > > How can I increase the resolution, or what am I doing wrong? > Thanks in advance, > Daniel > > > ------------------------------------------------------------------------------ > Special Offer-- Download ArcSight Logger for FREE (a 49ドル USD value)! > Finally, a world-class log management solution at an even better > price-free! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >
Hi, I need to create a huge range of plots with need to fit into a report (OpenOffice or Word). In order to save the work of manual resizing them when dragged and dropped, I wanted to preset a correct figure size with a nice resolution: pylab.rcParams['figure.figsize'] = 5,4 pylab.rcParams['figure.dpi'] = 300 Now, the created figure has a size of 500x400 pixels, and when I import it into a word processor, its dimensions are reported as 12.7x10.16cm2, which matches the figsize definition. Yet, the resulting images are pretty much blurred... How can I increase the resolution, or what am I doing wrong? Thanks in advance, Daniel
Hi, I'm trying to install matplotlib from the svn source. I can compile the code and install it to my desired location but I cannot import it into python. I did: svn co https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/matplotlib matplotlib cd matplotlib python setup.py install --prefix=/home/glen/local I have numpy and scipy installed and working correctly using the above prefix and matplotlib compiles and installs the same way but when I issue "import matplotlib as mpl" nothing results. There is no error but also no library. >>> dir(mpl) ['__builtins__', '__doc__', '__file__', '__name__', '__package__', '__path__'] >>> mpl.__path__ ['matplotlib'] >>> mpl.__file__ 'matplotlib/__init__.pyc' Where am I going wrong? Glen
On Thursday, January 20, 2011, Jeff Whitaker <js...@fa...> wrote: > On 1/20/11 2:31 PM, R. Mitra wrote: >> Hi >> I have a set of records with known lat long. I want to show the >> concentration of the records with a contour diagram on a world map in >> any projection. It cannot spill over to the oceans. I know I have to >> use basemap. Is there a quick recipe somewhere I can follow to give >> me a desired output. I have gone through earlier posts on this board >> but cannot find the right one. Any pointers would be very helpful. >> Many thanks. >> Best >> Mitra > > > Mitra: The basic procedure is this: > > 1) load you data into 2d numpy arrays (lats, lons, data). lats and lons > must be in degrees (not radians). > 2) create a Basemap instance (called "map") for the desired projection. > 3) calculate the map projection coordinates of your grid with x,y = > map(lons,lats) > 4) contour your data with the contourf method (map.contourf). > 5) draw coastlines with the coastlines method. > 6) draw lat/lon lines with the drawparallels and drawmeridians methods. > > There are many examples of this in the basemap examples directory. > > -Jeff > > ------------------------------------------------------------------------------ > Special Offer-- Download ArcSight Logger for FREE (a 49ドル USD value)! > Finally, a world-class log management solution at an even better price-free! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > In order to contour, you will need some sort z-value to contour. This means you need to bin your data. You could use numpy's hist2d, or (I prefer) matplotlib's hexbin(). I hope that helps! Ben Root
On 1/20/11 2:31 PM, R. Mitra wrote: > Hi > I have a set of records with known lat long. I want to show the > concentration of the records with a contour diagram on a world map in > any projection. It cannot spill over to the oceans. I know I have to > use basemap. Is there a quick recipe somewhere I can follow to give > me a desired output. I have gone through earlier posts on this board > but cannot find the right one. Any pointers would be very helpful. > Many thanks. > Best > Mitra Mitra: The basic procedure is this: 1) load you data into 2d numpy arrays (lats, lons, data). lats and lons must be in degrees (not radians). 2) create a Basemap instance (called "map") for the desired projection. 3) calculate the map projection coordinates of your grid with x,y = map(lons,lats) 4) contour your data with the contourf method (map.contourf). 5) draw coastlines with the coastlines method. 6) draw lat/lon lines with the drawparallels and drawmeridians methods. There are many examples of this in the basemap examples directory. -Jeff
Try the solution proposed at <http://groups.google.com/group/scitools/browse_thread/thread/b3ee1646bc453d72> Christoph On 1/20/2011 2:42 PM, David Williams wrote: > Hi folks > > I am teaching myself Python by working > through Hans Petter Langtangen's > excellent book "Primer on Scientific > Programming in Python". > > The exercises in chapter 4 of the book > require the student to use Python with > the freely downloadable tools > MatplotLib and SciTools to plot graphs > of mathematical functions. > > Despite downloading and installing > numerous different versions of Python > 2.x, MatPlotLib and SciTools, I am > unable to find a combination which > will work together without crashing. > > I'm currently using a Windows XP > laptop with: > Python 2.6.6 > IDLE 2.6.6 > MatplotLib 0.99,3 win32 Py2.6 > Scitools from > scipy-0.80-win32-superpack-python 2.6 > > When I try to run a simple script to > test the plotting functions, I get the > error messages attached below. > > I don't want to use Python 3, as there > still seem to be some teething > problems with this, and many of the > modules that I've already written or > need to use are not compatible with > Python 3.x. > > I've emailed the author, but have not > yet had a reply. > > I'd be very grateful if you could > explain why I get the error messages > shown below, what is a compatible > combination of versions of Python 2.x, > MatPlotLib and Scitools; and the URL > of sites where I can download these. > > Many thanks in anticipation > > > Dave > (UK) > > ============================= > Test script: > > 1. from scitools.std import * > 2. > 3. def f(t): > 4. return t**2*exp(-t**2) > 5. > 6. t = linspace(0,3,51) > 7. y = zeros(len(t)) > 8. for i in xrange(len(t)): > 9. y[i] = f(t[i]) > 10. > 11. plot(t,y) > 12. > 13. > > =============================== > >>>> > scitools.easyviz backend is matplotlib > > Traceback (most recent call last): > File "C:\Python\Dave_Book > Exercises4円_3_2 Plot test_DW.py", line > 11, in<module> > plot(t,y) > File > "C:\Python26\lib\site-packages\scitools\easyviz\common.py", > line 3060, in plot > self._replot() > File > "C:\Python26\lib\site-packages\scitools\easyviz\matplotlib_.py", > line 906, in _replot > self._g.draw() > File > "C:\Python26\lib\site-packages\matplotlib\pyplot.py", > line 352, in draw > get_current_fig_manager().canvas.draw() > File > "C:\Python26\lib\site-packages\matplotlib\backends\backend_tkagg.py", > line 215, in draw > FigureCanvasAgg.draw(self) > File > "C:\Python26\lib\site-packages\matplotlib\backends\backend_agg.py", > line 314, in draw > self.figure.draw(self.renderer) > File > "C:\Python26\lib\site-packages\matplotlib\artist.py", > line 46, in draw_wrapper > draw(artist, renderer, *args, > **kwargs) > File > "C:\Python26\lib\site-packages\matplotlib\figure.py", > line 773, in draw > for a in self.axes: a.draw(renderer) > File > "C:\Python26\lib\site-packages\matplotlib\artist.py", > line 46, in draw_wrapper > draw(artist, renderer, *args, > **kwargs) > File > "C:\Python26\lib\site-packages\matplotlib\axes.py", > line 1735, in draw > a.draw(renderer) > File > "C:\Python26\lib\site-packages\matplotlib\artist.py", > line 46, in draw_wrapper > draw(artist, renderer, *args, > **kwargs) > File > "C:\Python26\lib\site-packages\matplotlib\axis.py", > line 742, in draw > tick.draw(renderer) > File > "C:\Python26\lib\site-packages\matplotlib\artist.py", > line 46, in draw_wrapper > draw(artist, renderer, *args, > **kwargs) > File > "C:\Python26\lib\site-packages\matplotlib\axis.py", > line 196, in draw > self.label1.draw(renderer) > File > "C:\Python26\lib\site-packages\matplotlib\text.py", > line 518, in draw > bbox, info = > self._get_layout(renderer) > File > "C:\Python26\lib\site-packages\matplotlib\text.py", > line 280, in _get_layout > clean_line, self._fontproperties, > ismath=ismath) > File > "C:\Python26\lib\site-packages\matplotlib\backends\backend_agg.py", > line 148, in > get_text_width_height_descent > texmanager = self.get_texmanager() > File > "C:\Python26\lib\site-packages\matplotlib\backend_bases.py", > line 374, in get_texmanager > from matplotlib.texmanager import > TexManager > File > "C:\Python26\lib\site-packages\matplotlib\texmanager.py", > line 72, in<module> > class TexManager: > File > "C:\Python26\lib\site-packages\matplotlib\texmanager.py", > line 94, in TexManager > _dvipng_hack_alpha = > dvipng_hack_alpha() > File > "C:\Python26\lib\site-packages\matplotlib\texmanager.py", > line 68, in dvipng_hack_alpha > raise RuntimeError('Could not obtain > dvipng version') > RuntimeError: Could not obtain dvipng > version >>>> > > ------------------------------------------------------------------------------ > Special Offer-- Download ArcSight Logger for FREE (a 49ドル USD value)! > Finally, a world-class log management solution at an even better price-free! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >
Hi I have a set of records with known lat long. I want to show the concentration of the records with a contour diagram on a world map in any projection. It cannot spill over to the oceans. I know I have to use basemap. Is there a quick recipe somewhere I can follow to give me a desired output. I have gone through earlier posts on this board but cannot find the right one. Any pointers would be very helpful. Many thanks. Best Mitra
Hi folks I am teaching myself Python by working through Hans Petter Langtangen's excellent book "Primer on Scientific Programming in Python". The exercises in chapter 4 of the book require the student to use Python with the freely downloadable tools MatplotLib and SciTools to plot graphs of mathematical functions. Despite downloading and installing numerous different versions of Python 2.x, MatPlotLib and SciTools, I am unable to find a combination which will work together without crashing. I'm currently using a Windows XP laptop with: Python 2.6.6 IDLE 2.6.6 MatplotLib 0.99,3 win32 Py2.6 Scitools from scipy-0.80-win32-superpack-python 2.6 When I try to run a simple script to test the plotting functions, I get the error messages attached below. I don't want to use Python 3, as there still seem to be some teething problems with this, and many of the modules that I've already written or need to use are not compatible with Python 3.x. I've emailed the author, but have not yet had a reply. I'd be very grateful if you could explain why I get the error messages shown below, what is a compatible combination of versions of Python 2.x, MatPlotLib and Scitools; and the URL of sites where I can download these. Many thanks in anticipation Dave (UK) ============================= Test script: 1. from scitools.std import * 2. 3. def f(t): 4. return t**2*exp(-t**2) 5. 6. t = linspace(0,3,51) 7. y = zeros(len(t)) 8. for i in xrange(len(t)): 9. y[i] = f(t[i]) 10. 11. plot(t,y) 12. 13. =============================== >>> scitools.easyviz backend is matplotlib Traceback (most recent call last): File "C:\Python\Dave_Book Exercises4円_3_2 Plot test_DW.py", line 11, in <module> plot(t,y) File "C:\Python26\lib\site-packages\scitools\easyviz\common.py", line 3060, in plot self._replot() File "C:\Python26\lib\site-packages\scitools\easyviz\matplotlib_.py", line 906, in _replot self._g.draw() File "C:\Python26\lib\site-packages\matplotlib\pyplot.py", line 352, in draw get_current_fig_manager().canvas.draw() File "C:\Python26\lib\site-packages\matplotlib\backends\backend_tkagg.py", line 215, in draw FigureCanvasAgg.draw(self) File "C:\Python26\lib\site-packages\matplotlib\backends\backend_agg.py", line 314, in draw self.figure.draw(self.renderer) File "C:\Python26\lib\site-packages\matplotlib\artist.py", line 46, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "C:\Python26\lib\site-packages\matplotlib\figure.py", line 773, in draw for a in self.axes: a.draw(renderer) File "C:\Python26\lib\site-packages\matplotlib\artist.py", line 46, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "C:\Python26\lib\site-packages\matplotlib\axes.py", line 1735, in draw a.draw(renderer) File "C:\Python26\lib\site-packages\matplotlib\artist.py", line 46, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "C:\Python26\lib\site-packages\matplotlib\axis.py", line 742, in draw tick.draw(renderer) File "C:\Python26\lib\site-packages\matplotlib\artist.py", line 46, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "C:\Python26\lib\site-packages\matplotlib\axis.py", line 196, in draw self.label1.draw(renderer) File "C:\Python26\lib\site-packages\matplotlib\text.py", line 518, in draw bbox, info = self._get_layout(renderer) File "C:\Python26\lib\site-packages\matplotlib\text.py", line 280, in _get_layout clean_line, self._fontproperties, ismath=ismath) File "C:\Python26\lib\site-packages\matplotlib\backends\backend_agg.py", line 148, in get_text_width_height_descent texmanager = self.get_texmanager() File "C:\Python26\lib\site-packages\matplotlib\backend_bases.py", line 374, in get_texmanager from matplotlib.texmanager import TexManager File "C:\Python26\lib\site-packages\matplotlib\texmanager.py", line 72, in <module> class TexManager: File "C:\Python26\lib\site-packages\matplotlib\texmanager.py", line 94, in TexManager _dvipng_hack_alpha = dvipng_hack_alpha() File "C:\Python26\lib\site-packages\matplotlib\texmanager.py", line 68, in dvipng_hack_alpha raise RuntimeError('Could not obtain dvipng version') RuntimeError: Could not obtain dvipng version >>>
Ben, thanks for your advice! With a little modification of your code I got what I was after for. BR Jack -- View this message in context: http://old.nabble.com/Beginner-and-plotting-CFD-data-from-file-tp30705461p30724168.html Sent from the matplotlib - users mailing list archive at Nabble.com.
========================= Announcing EuroScipy 2011 ========================= --------------------------------------------- The 4th European meeting on Python in Science --------------------------------------------- **Paris, Ecole Normale Supérieure, August 25-28 2011** We are happy to announce the 4th EuroScipy meeting, in Paris, August 2011. The EuroSciPy meeting is a cross-disciplinary gathering focused on the use and development of the Python language in scientific research. This event strives to bring together both users and developers of scientific tools, as well as academic research and state of the art industry. Main topics =========== - Presentations of scientific tools and libraries using the Python language, including but not limited to: - vector and array manipulation - parallel computing - scientific visualization - scientific data flow and persistence - algorithms implemented or exposed in Python - web applications and portals for science and engineering. - Reports on the use of Python in scientific achievements or ongoing projects. - General-purpose Python tools that can be of special interest to the scientific community. Tutorials ========= There will be two tutorial tracks at the conference, an introductory one, to bring up to speed with the Python language as a scientific tool, and an advanced track, during which experts of the field will lecture on specific advanced topics such as advanced use of numpy, scientific visualization, software engineering... Keynote Speaker: Fernando Perez =============================== We are excited to welcome Fernando Perez (UC Berkeley, Helen Wills Neuroscience Institute, USA) as our keynote speaker. Fernando Perez is the original author of the enhanced interactive python shell IPython and a very active contributor to the Python for Science ecosystem. Important dates =============== Talk submission deadline: Sunday May 8 Program announced: Sunday May 29 Tutorials tracks: Thursday August 25 - Friday August 26 Conference track: Saturday August 27 - Sunday August 28 Call for papers =============== We are soliciting talks that discuss topics related to scientific computing using Python. These include applications, teaching, future development directions, and research. We welcome contributions from the industry as well as the academic world. Indeed, industrial research and development as well academic research face the challenge of mastering IT tools for exploration, modeling and analysis. We look forward to hearing your recent breakthroughs using Python! Submission guidelines ===================== - We solicit talk proposals in the form of a one-page long abstract. - Submissions whose main purpose is to promote a commercial product or service will be refused. - All accepted proposals must be presented at the EuroSciPy conference by at least one author. The one-page long abstracts are for conference planing and selection purposes only. We will later select papers for publication of post-proceedings in a peer-reviewed journal. How to submit an abstract ========================= To submit a talk to the EuroScipy conference follow the instructions here: http://www.euroscipy.org/card/euroscipy2011_call_for_papers Organizers ========== Chairs: - Gaël Varoquaux (INSERM, Unicog team, and INRIA, Parietal team) - Nicolas Chauvat (Logilab) Local organization committee: - Emmanuelle Gouillart (Saint-Gobain Recherche) - Jean-Philippe Chauvat (Logilab) Tutorial chair: - Valentin Haenel (MKP, Technische Universität Berlin) Program committee: - Chair: Tiziano Zito (MKP, Technische Universität Berlin) - Romain Brette (ENS Paris, DEC) - Emmanuelle Gouillart (Saint-Gobain Recherche) - Eric Lebigot (Laboratoire Kastler Brossel, Université Pierre et Marie Curie) - Konrad Hinsen (Soleil Synchrotron, CNRS) - Hans Petter Langtangen (Simula laboratories) - Jarrod Millman (UC Berkeley, Helen Wills NeuroScience institute) - Mike Müller (Python Academy) - Didrik Pinte (Enthought Inc) - Marc Poinot (ONERA) - Christophe Pradal (CIRAD/INRIA, Virtual Plantes team) - Andreas Schreiber (DLR) - Stéfan van der Walt (University of Stellenbosch) Website ======= http://www.euroscipy.org/conference/euroscipy_2011
Hi all, I recently reinstalled MPL from scratch on top of python2.7 that I built from scratch using homebrew on OS X Snow Leopard. Since then, I have been getting the following types of warnings whenever I plot something: /Users/laserson/matplotlib/lib/python2.7/site-packages/matplotlib/font_manager.py:1242: UserWarning: findfont: Font family ['sans-serif'] not found. Falling back to Bitstream Vera Sans (prop.get_family(), self.defaultFamily[fontext])) Do I need to specify some configuration parameter to point somewhere that the installer couldn't find? Thanks! Uri ................................................................................... Uri Laserson Graduate Student, Biomedical Engineering Harvard-MIT Division of Health Sciences and Technology M +1 917 742 8019 las...@mi...
Hi all, I recently installed cairo and py2cairo, which seem to import fine. When I use the cairo backend with MPL, I get no problem when I save as a PNG, but I get a segfault if I try saving as PDF or SVG. I have no idea how to begin to figure out the problem. Any help is much appreciated...thanks! Uri ................................................................................... Uri Laserson Graduate Student, Biomedical Engineering Harvard-MIT Division of Health Sciences and Technology M +1 917 742 8019 las...@mi...
Hello! I am also using two axes in a plot and want to be able to pick the lines of both axes. So far I used MPL 0.99.3 and a button on my interface to change the z-order of the axes in order to be able to pick lines of the "active" axes and to see the correct x/y data in the navigation toolbar. The callback code of my button is basically the code from othererik. Since MPL 1.0.0 I have the problem that lines of the second axes simply disappear from the plot whenever the plot is redrawn and it's zorder is higher. Here is my example code: http://old.nabble.com/file/p30717629/twinxtest.py twinxtest.py ----------------------- import matplotlib matplotlib.use('TkAgg') from numpy import arange, sin, pi, cos from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg from matplotlib.figure import Figure import Tkinter as Tk root = Tk.Tk() f = Figure(figsize=(5,4), dpi=100) ax1 = f.add_subplot(111) ax2 = ax1.twinx() t = arange(0.0,3.0,0.01) s1 = sin(2*pi*t) s2 = 2*cos(2*pi*t) ax1.plot(t,s1,color='red', picker=True) ax2.plot(t,s2,picker=True) def pick_cb(event): if event.artist.get_lw() > 1: event.artist.set_lw(1) else: event.artist.set_lw(3) f.canvas.draw() def toggle(): if ax1.get_zorder() == 0: ax1.set_zorder(0.1) ax2.set_zorder(0) else: ax1.set_zorder(0) ax2.set_zorder(0.1) canvas = FigureCanvasTkAgg(f, master=root) canvas.show() canvas.get_tk_widget().pack(side=Tk.TOP, fill=Tk.BOTH, expand=1) toolbar = NavigationToolbar2TkAgg(canvas, root) toolbar.update() canvas._tkcanvas.pack(side=Tk.TOP, fill=Tk.BOTH, expand=1) canvas.mpl_connect('pick_event', pick_cb) button = Tk.Button(master=root, text='Toggle', command=toggle) button.pack(side=Tk.BOTTOM) Tk.mainloop() ------------------ Right after start I can only pick the blue line and both lines are properly shown even when I resize the plot. When I hit the "Toggle" button now I can pick the red line but the pick event callback also calls canvas.draw() which let's the blue line disappear. When I click "Toggle" and call canvas.draw() again by resizing the window, the blue line is visible again. In Matplotlib 0.99.3 everything worked as I expected with this code. Both lines were always visible. -Stephan -- View this message in context: http://old.nabble.com/onpick-on-a-2-y-plot-%28-via-twinx%28%29-%29-seems-to-only-allow-picking-of-second-axes%27s-artists-tp25049128p30717629.html Sent from the matplotlib - users mailing list archive at Nabble.com.
On Tue, Jan 18, 2011 at 5:33 PM, sgee <jaa...@gm...> wrote: > > I'm a CFD student and I wish to learn to make high-quality plots from my > calculations using matplotlib. However, I'm a complete novice in using > matplotlib and python and I didn't find any earlier posts so here goes. > > I have data form Ansys Fluent in the following form > continuity x-velocity y-velocity energy > k epsilon > 1 0.00011115784 1.5359586e-07 1.0506172e-07 > 0.0032920227 > 0.40809903 > 1 0.16584706 0.0047719572 2.7355736e-07 > 0.026478255 0.19814095 > 0.5674 0.044237841 0.0026294924 2.8202695e-07 0.030139321 > 0.13935529 > > The first line is for the first iteration, the second line for the second > iteration etc. Basically, I would like to have plot this data and have a > picture like http://openfoamwiki.net/images/f/ff/Pump_residuals.png this > > Any help would be much appreciated. > > BR Jack > Jack, First, you would load your data using numpy's loadtxt() function. You can tell loadtxt() to skip the first line since it is a header. This will give you a 2-D array (n rows and 6 columns) where n is the number of iterations. You can then plot the data using matplotlib's plot command (or semilogy to automatically get y-log scaling), passing in the first column for the x data, and then the other columns for the y data. So, your code would look something like this: import numpy as np import matplotlib.pyplot as plt data = np.loadtxt('foobar.txt', skiprows=1) plt.semilogy(data[:, 0], data[:, 1:]) plt.xlabel('Iteration') plt.ylabel('Residuals') plt.legend(['Ux_0', 'Uy_0', 'p_0', 'k_0', 'epsilon_0']) plt.show() That should get you a similar plot. There are more things you can do to control various aspects, but this should get you a good start. I hope this helps! Ben Root
On Wed, Jan 19, 2011 at 10:16 AM, Benjamin Root <ben...@ou...> wrote: > > > On Tue, Jan 18, 2011 at 5:32 PM, Alex Liberzon <ale...@gm...> > wrote: >> >> Hi, >> >> While moving from Matlab to Numpy/Scipy/Matplotlib I need sometimes to >> work with Matlab figures. It would be nice if we could load Matlab figures >> in Python, extract the data and some basic parameters of how it was looking >> in Matlab and create its "clone" in matplotlib. At present the Matlab >> figures are MAT files and in the near future it will be HDF5, both formats >> are loadable. However, I have not found any reference for such attempts to >> load and parse the FIG files. As a beginner I find it difficult to write a >> large piece of code. However, if there are other interested users that can >> cooperate on such, I'd gladly contribute some hours for this task. >> Meanwhile, to show the proof-of-concept attempt is attached below. All your >> useful comments and suggestions are very welcome. >> >> Thank you, >> Alex >> > > Alex, > > That is very interesting. I was not aware that matlab's figure files were > simply .mat files in disguise. I would presume that it would be feasible to > produce some sort of importer in such a case (provided the documentation for > Matlab's figure format is complete enough). > > I am wary of making such a function a core feature of Matplotlib, however, > because it would require creating a dependency to the scipy.io package. > However, I could see it being a toolkit package like Basemap. > > Would you mind creating a feature request ticket at: > > http://sourceforge.net/tracker/?group_id=80706 > > If you include this example code, and maybe some links to some documentation > on matlab's figure files, maybe something can grow from that. > > Thanks! > Ben Root I agree, but for a slightly different reason. I think it would be great if it would be possible to incorporate viewing matlab figures into the rest of my system, so making it more isolated would help in this regard. -Todd
On Wed, Jan 19, 2011 at 10:20 AM, todd rme <tod...@gm...> wrote: > On Wed, Jan 19, 2011 at 10:22 AM, Benjamin Root <ben...@ou...> wrote: > > > > > > On Wed, Jan 19, 2011 at 4:48 AM, Jochen Deibele <joc...@nt...> > > wrote: > >> > >> Hi! > >> > >> todd rme wrote on 19.01.2011 04:40: > >> > The class, on the other hand, seems to be an application-specific > >> > description of what the role is within the application. I think this > >> > should probably be "figure". > >> > >> Just an idea: What about exposing this (or maybe all) of the values in > >> the api to be set dynamically by the user? Of course providing a useful > >> default value as well. > >> > >> The thought behind is that it's hard to guess in what context the user > >> wants to use the figure. And perhaps the user has 21 plots of some type > >> and one which is different and he wants to treat differently. > >> But at the same time - you also could do this if you adjust the window > >> title. > >> > >> Jochen > >> > > > > I agree. If we are going to do this, we might as well do it right. > Anybody > > who isn't using this feature will not see a difference, but those who do > > manage their windows with rules can benefit significantly from just > having > > sensible default values and from having the ability to explicitly set the > > value. Therefore, this should probably be something that is added to the > > rcParams and the user can specify a value by keyword argument to the > Figure > > __init__ method. > > > > Ben Root > > That is far outside the scope of my capabilities. I already have wx > and gtk backends set up (although it needs to be tested) with > hard-coded values, and qt4 half-working (and tested, this doesn't > appear to be possible in qt). I can submit patches for that, and if > someone else wants to make it configurable they can do so. I'll set > it up to use variables that you can then do what you want with. > > -Todd > > That would be a good start. I have no objections to starting off with that. Ben Root
On Wed, Jan 19, 2011 at 10:22 AM, Benjamin Root <ben...@ou...> wrote: > > > On Wed, Jan 19, 2011 at 4:48 AM, Jochen Deibele <joc...@nt...> > wrote: >> >> Hi! >> >> todd rme wrote on 19.01.2011 04:40: >> > The class, on the other hand, seems to be an application-specific >> > description of what the role is within the application. I think this >> > should probably be "figure". >> >> Just an idea: What about exposing this (or maybe all) of the values in >> the api to be set dynamically by the user? Of course providing a useful >> default value as well. >> >> The thought behind is that it's hard to guess in what context the user >> wants to use the figure. And perhaps the user has 21 plots of some type >> and one which is different and he wants to treat differently. >> But at the same time - you also could do this if you adjust the window >> title. >> >> Jochen >> > > I agree. If we are going to do this, we might as well do it right. Anybody > who isn't using this feature will not see a difference, but those who do > manage their windows with rules can benefit significantly from just having > sensible default values and from having the ability to explicitly set the > value. Therefore, this should probably be something that is added to the > rcParams and the user can specify a value by keyword argument to the Figure > __init__ method. > > Ben Root That is far outside the scope of my capabilities. I already have wx and gtk backends set up (although it needs to be tested) with hard-coded values, and qt4 half-working (and tested, this doesn't appear to be possible in qt). I can submit patches for that, and if someone else wants to make it configurable they can do so. I'll set it up to use variables that you can then do what you want with. -Todd
On Wed, Jan 19, 2011 at 9:16 AM, Nicholas Devenish < mis...@gm... <misnomer%2Bm...@gm...>> wrote: > Hi, > > I have a few questions on formatting axis labels, when using the > ScalarFormatter class (which appears to be the basic standard). > > Firstly, is there a general method to change the font size of all > labels on the axis, other than looping over them such as in: > >>> [x.set_fontsize(10) for x in plt.gca().xaxis.get_ticklabels()] > If you have version 1.0.0 or later, you can use tick_params(): http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.tick_params http://matplotlib.sourceforge.net/api/axes_api.html#matplotlib.axes.Axes.tick_params > > Secondly, when displaying the power limits with very large numbers on > the axis, how do you change the font size of the displayed power > limit? it does not seem to be tied into the axis ticklabels lists, and > I do not know how to access it. > > Most likely, you are talking about the "offset text", which you can get access to its Text object using: ax.xaxis.get_offset_text() or ax.yaxis.get_offset_text() > Lastly, some questions on the defaults: The documentation mentions > that the default power limits were changed from (-3, 4) to (-7, 7). > I'm curious as to the reasoning for this, because 10^7 seems an > excessively large number of digits and altogether a much worse > default. In addition, the fact that using math text for the exponent > is turned off by default (displaying 1e3 instead of the much more > appropriate 10ドル^3$) is also puzzling. In relation to this exponential > display, is there a better way to turn it on, on an existing plot, > other than the (seemingly undocumented): > >>> plt.gca().yaxis.get_major_formatter()._useMathText=True > > I can't comment on the change of the default range of values (that happened before I joined). However, there are two ways to get the nice MathText formatting of tick labels. One, you can change the axis scale to log: ax.set_xscale('log') or ax.set_yscale('log') Or (if you don't want log scale), you can explicitly pass in a ScalarFormatter object with MathText turned on: http://matplotlib.sourceforge.net/api/ticker_api.html#matplotlib.ticker.ScalarFormatter niceMathTextForm = ScalarFormatter(useMathText=True) ax.xaxis.set_major_formatter( niceMathTextForm ) I hope that helps! Ben Root
On Wed, Jan 19, 2011 at 4:48 AM, Jochen Deibele <joc...@nt...>wrote: > Hi! > > todd rme wrote on 19.01.2011 04:40: > > The class, on the other hand, seems to be an application-specific > > description of what the role is within the application. I think this > > should probably be "figure". > > Just an idea: What about exposing this (or maybe all) of the values in > the api to be set dynamically by the user? Of course providing a useful > default value as well. > > The thought behind is that it's hard to guess in what context the user > wants to use the figure. And perhaps the user has 21 plots of some type > and one which is different and he wants to treat differently. > But at the same time - you also could do this if you adjust the window > title. > > Jochen > > I agree. If we are going to do this, we might as well do it right. Anybody who isn't using this feature will not see a difference, but those who do manage their windows with rules can benefit significantly from just having sensible default values and from having the ability to explicitly set the value. Therefore, this should probably be something that is added to the rcParams and the user can specify a value by keyword argument to the Figure __init__ method. Ben Root
Hi, I have a few questions on formatting axis labels, when using the ScalarFormatter class (which appears to be the basic standard). Firstly, is there a general method to change the font size of all labels on the axis, other than looping over them such as in: >>> [x.set_fontsize(10) for x in plt.gca().xaxis.get_ticklabels()] Secondly, when displaying the power limits with very large numbers on the axis, how do you change the font size of the displayed power limit? it does not seem to be tied into the axis ticklabels lists, and I do not know how to access it. Lastly, some questions on the defaults: The documentation mentions that the default power limits were changed from (-3, 4) to (-7, 7). I'm curious as to the reasoning for this, because 10^7 seems an excessively large number of digits and altogether a much worse default. In addition, the fact that using math text for the exponent is turned off by default (displaying 1e3 instead of the much more appropriate 10ドル^3$) is also puzzling. In relation to this exponential display, is there a better way to turn it on, on an existing plot, other than the (seemingly undocumented): >>> plt.gca().yaxis.get_major_formatter()._useMathText=True Thanks! Nick
On Tue, Jan 18, 2011 at 5:32 PM, Alex Liberzon <ale...@gm...>wrote: > Hi, > > While moving from Matlab to Numpy/Scipy/Matplotlib I need sometimes to work > with Matlab figures. It would be nice if we could load Matlab figures in > Python, extract the data and some basic parameters of how it was looking in > Matlab and create its "clone" in matplotlib. At present the Matlab figures > are MAT files and in the near future it will be HDF5, both formats are > loadable. However, I have not found any reference for such attempts to load > and parse the FIG files. As a beginner I find it difficult to write a large > piece of code. However, if there are other interested users that can > cooperate on such, I'd gladly contribute some hours for this task. > Meanwhile, to show the proof-of-concept attempt is attached below. All your > useful comments and suggestions are very welcome. > > Thank you, > Alex > > Alex, That is very interesting. I was not aware that matlab's figure files were simply .mat files in disguise. I would presume that it would be feasible to produce some sort of importer in such a case (provided the documentation for Matlab's figure format is complete enough). I am wary of making such a function a core feature of Matplotlib, however, because it would require creating a dependency to the scipy.io package. However, I could see it being a toolkit package like Basemap. Would you mind creating a feature request ticket at: http://sourceforge.net/tracker/?group_id=80706 If you include this example code, and maybe some links to some documentation on matlab's figure files, maybe something can grow from that. Thanks! Ben Root
Ryan May wrote on 19.01.2011 16:00: > On Wed, Jan 19, 2011 at 4:48 AM, Jochen Deibele<joc...@nt...> wrote: >> todd rme wrote on 19.01.2011 04:40: >> > The class, on the other hand, seems to be an application-specific >> > description of what the role is within the application. I think this >> > should probably be "figure". >> >> Just an idea: What about exposing this (or maybe all) of the values in >> the api to be set dynamically by the user? Of course providing a useful >> default value as well. >> >> The thought behind is that it's hard to guess in what context the user >> wants to use the figure. And perhaps the user has 21 plots of some type >> and one which is different and he wants to treat differently. >> But at the same time - you also could do this if you adjust the window >> title. > > I'm not sure what the complete motivation behind all of this is, but > if you just want to set the window title, that's already available: > > fig = plt.figure() > fig.canvas.set_window_title("Look at me!") > Thanks, but that's not the intention. Some windowmanager on X11 systems provide the possibility to manage windows due to some criteria. You can f.ex. force all windows of your browser to open minimized or always on top etc. As far as I understood the discussion it is about what information should be provided to make this kind of window-handling possible. Jochen
On Wed, Jan 19, 2011 at 4:48 AM, Jochen Deibele <joc...@nt...> wrote: > todd rme wrote on 19.01.2011 04:40: > > The class, on the other hand, seems to be an application-specific > > description of what the role is within the application. I think this > > should probably be "figure". > > Just an idea: What about exposing this (or maybe all) of the values in > the api to be set dynamically by the user? Of course providing a useful > default value as well. > > The thought behind is that it's hard to guess in what context the user > wants to use the figure. And perhaps the user has 21 plots of some type > and one which is different and he wants to treat differently. > But at the same time - you also could do this if you adjust the window > title. I'm not sure what the complete motivation behind all of this is, but if you just want to set the window title, that's already available: fig = plt.figure() fig.canvas.set_window_title("Look at me!") Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma