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
(8) |
2
(2) |
3
(11) |
4
(11) |
5
(3) |
6
(3) |
7
(8) |
8
(1) |
9
(10) |
10
(16) |
11
(1) |
12
(8) |
13
(21) |
14
(13) |
15
(15) |
16
(6) |
17
(12) |
18
(2) |
19
(6) |
20
(6) |
21
(5) |
22
(2) |
23
(9) |
24
|
25
|
26
(2) |
27
(3) |
28
(2) |
29
(10) |
30
(2) |
31
(4) |
|
From: Benjamin R. <ben...@ou...> - 2010-12-15 15:19:54
|
On Tue, Dec 14, 2010 at 2:29 PM, vt603800 <vt6...@ba...> wrote: > I tried to upgrade to version 1.0 but without success. Could anybody tell > where it went wrong? > I downloaded the package matplotlib-1.0.0.tar.gz from > http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.0/ > > First I tried a easy install, doing > easy_install -m matplotlib-1.0.0.tar.gz > from the command line but after this I checked the current version in Idle > and it still was 0.99 > > So I manually removed all the matplotlib files from /usr/lib/pymodules/ > and did the easy install again from the command line > but now I can't import matplotlib anymore in Idle. > > This was the installation report: > > install_dir /usr/local/lib/python2.6/dist-packages/ > > Processing matplotlib-1.0.0.tar.gz > > Running matplotlib-1.0.0/setup.py -q bdist_egg --dist-dir > /tmp/easy_install-dWh4_f/matplotlib-1.0.0/egg-dist-tmp-ohZvCJ > > basedirlist is: ['/usr/local', '/usr'] > > > ============================================================================ > > BUILDING MATPLOTLIB > > matplotlib: 1.0.0 > > python: 2.6.6 (r266:84292, Sep 15 2010, 16:22:56) [GCC > > 4.4.5] > > platform: linux2 > > > > REQUIRED DEPENDENCIES > > numpy: 1.3.0 > > freetype2: found, but unknown version (no pkg-config) > > * WARNING: Could not find 'freetype2' headers in > any > > * of '/usr/local/include', '/usr/include', '.', > > * '/usr/local/include/freetype2', > > * '/usr/include/freetype2', './freetype2'. > > > > OPTIONAL BACKEND DEPENDENCIES > > libpng: found, but unknown version (no pkg-config) > > * Could not find 'libpng' headers in any of > > * '/usr/local/include', '/usr/include', '.' > > Tkinter: no > > * Using default library and include directories > for > > * Tcl and Tk because a Tk window failed to open. > > * You may need to define DISPLAY for Tk to work so > > * that setup can determine where your libraries > are > > * located. Tkinter present, but header files are > not > > * found. You may need to install development > > * packages. > > wxPython: 2.8.11.0 > > * WxAgg extension not required for wxPython >= 2.8 > > pkg-config: looking for pygtk-2.0 gtk+-2.0 > > * Package pygtk-2.0 was not found in the > pkg-config > > * search path. Perhaps you should add the > directory > > * containing `pygtk-2.0.pc' to the PKG_CONFIG_PATH > > * environment variable No package 'pygtk-2.0' > found > > * Package gtk+-2.0 was not found in the pkg-config > > * search path. Perhaps you should add the > directory > > * containing `gtk+-2.0.pc' to the PKG_CONFIG_PATH > > * environment variable No package 'gtk+-2.0' found > > * You may need to install 'dev' package(s) to > > * provide header files. > > Gtk+: no > > * Could not find Gtk+ headers in any of > > * '/usr/local/include', '/usr/include', '.' > > Mac OS X native: no > > Qt: no > > Qt4: no > > Cairo: 1.8.8 > > > > OPTIONAL DATE/TIMEZONE DEPENDENCIES > > datetime: present, version unknown > > dateutil: 1.4.1 > > pytz: 2010b > > > > OPTIONAL USETEX DEPENDENCIES > > dvipng: no > > ghostscript: 8.71 > > latex: no > > pdftops: 0.14.3 > > > > [Edit setup.cfg to suppress the above messages] > > > ============================================================================ > > pymods ['pylab'] > > packages ['matplotlib', 'matplotlib.backends', > 'matplotlib.backends.qt4_editor', 'matplotlib.projections', > 'matplotlib.testing', 'matplotlib.testing.jpl_units', 'matplotlib.tests', > 'mpl_toolkits', 'mpl_toolkits.mplot3d', 'mpl_toolkits.axes_grid', > 'mpl_toolkits.axes_grid1', 'mpl_toolkits.axisartist', > 'matplotlib.sphinxext', 'matplotlib.numerix', 'matplotlib.numerix.mlab', > 'matplotlib.numerix.ma', 'matplotlib.numerix.linear_algebra', > 'matplotlib.numerix.random_array', 'matplotlib.numerix.fft', > 'matplotlib.tri', 'matplotlib.delaunay'] > > warning: no files found matching 'MANIFEST' > > warning: no files found matching 'examples/data/*' > > warning: no files found matching 'lib/mpl_toolkits' > > gcc: error trying to exec 'cc1plus': execvp: No such file or directory > > error: Setup script exited with error: command 'gcc' failed with exit > status 1 > > > Hans R > > Hans, First of all, don't do easyinstall. Follow the instructions for building here: http://matplotlib.sourceforge.net/users/installing.html#installing-from-source Be sure to note the build requirements, as they need to be installed first. Also, according to your build log, you do not have gcc installed. If gcc is not installed on your linux machine, then most likely none of the needed build tools are available on your machine. This would make building numpy and other tools from source impossible. On a Fedora system, I think all you need is the 'gcc' package. On a Debian-based system (like Ubuntu) you can make this whole dependency process easier with the following command: sudo apt-get build-depends python-matplotlib That will find (and install?) all packages that are required for building matplotlib. Be sure to first remove any previous builds of matplotlib from your system before trying this, of course. I hope that helps! Ben Root |
From: Åke K. <ake...@gm...> - 2010-12-15 14:55:10
|
I added a feature request. It would be awesome to just have an extra tag whether to include invisible artists. On Wed, Dec 15, 2010 at 10:36 PM, Benjamin Root <ben...@ou...> wrote: > On Wed, Dec 15, 2010 at 8:13 AM, Åke Kullenberg <ake...@gm...>wrote: > >> I am using matplotlib in a wxpython application where series are added >> dynamically to subplots in a figure. I added the very handy option to toggle >> series' visibility (by calling set_visible(False). The catch is however that >> the invisible series are included in the rescaling of the artists (Line2D >> all of them). Is there any way to fix that? The behavior I'm after is for >> rescaling to be based on visible artists only. >> >> The way I am doing the rescaling currently is simply by calling these two >> methods from the event handler: >> >> event.inaxes.relim() >> event.inaxes.autoscale_view(tight=None, scalex=False, scaley=True) >> >> > This might be a good feature request to make (if it hasn't already...): > > https://sourceforge.net/tracker/?group_id=80706 > > I would like to add one caveat, however. There are some cases where one > would want to include the bounding boxes of the invisible artist elements in > determining the axes limits. A particular use case would be animations. I > believe that matplotlib would be best served by having a simple option > available to let the user determine if they want to include invisible > artists or not. > > Ben Root > > |
From: Benjamin R. <ben...@ou...> - 2010-12-15 14:36:34
|
On Wed, Dec 15, 2010 at 8:13 AM, Åke Kullenberg <ake...@gm...>wrote: > I am using matplotlib in a wxpython application where series are added > dynamically to subplots in a figure. I added the very handy option to toggle > series' visibility (by calling set_visible(False). The catch is however that > the invisible series are included in the rescaling of the artists (Line2D > all of them). Is there any way to fix that? The behavior I'm after is for > rescaling to be based on visible artists only. > > The way I am doing the rescaling currently is simply by calling these two > methods from the event handler: > > event.inaxes.relim() > event.inaxes.autoscale_view(tight=None, scalex=False, scaley=True) > > This might be a good feature request to make (if it hasn't already...): https://sourceforge.net/tracker/?group_id=80706 I would like to add one caveat, however. There are some cases where one would want to include the bounding boxes of the invisible artist elements in determining the axes limits. A particular use case would be animations. I believe that matplotlib would be best served by having a simple option available to let the user determine if they want to include invisible artists or not. Ben Root |
From: John F. <joh...@nt...> - 2010-12-15 14:23:36
|
I have tried to install matplotlib to our IBM cluster P5(aix5) and get this error message (see below): The python script output xlC_r xlC_r (2 times) (see end of this email). Is that right? John f05n07l:matplotlib-1.0.0$ python setup.py build basedirlist is: ['/usr/local'] ============================================================================ BUILDING MATPLOTLIB matplotlib: 1.0.0 python: 2.6.3 (r263:75183, Oct 23 2009, 14:41:52) [C] platform: aix5 REQUIRED DEPENDENCIES numpy: 1.5.1rc2 freetype2: 9.22.3 OPTIONAL BACKEND DEPENDENCIES libpng: 1.2.35 Tkinter: Tkinter: 73770, Tk: 8.4, Tcl: 8.4 wxPython: no * wxPython not found Gtk+: no * Building for Gtk+ requires pygtk; you must be able * to "import gtk" in your build/install environment Mac OS X native: no Qt: no Qt4: no Cairo: no OPTIONAL DATE/TIMEZONE DEPENDENCIES datetime: present, version unknown dateutil: matplotlib will provide pytz: matplotlib will provide adding pytz OPTIONAL USETEX DEPENDENCIES dvipng: no ghostscript: 5.50 latex: no pdftops: 1.00 [Edit setup.cfg to suppress the above messages] ============================================================================ pymods ['pylab'] packages ['matplotlib', 'matplotlib.backends', 'matplotlib.backends.qt4_editor', 'matplotlib.projections', 'matplotlib.testing', 'matplotlib.testing.jpl_units', 'matplotlib.tests', 'mpl_toolkits', 'mpl_toolkits.mplot3d', 'mpl_toolkits.axes_grid', 'mpl_toolkits.axes_grid1', 'mpl_toolkits.axisartist', 'matplotlib.sphinxext', 'matplotlib.numerix', 'matplotlib.numerix.mlab', 'matplotlib.numerix.ma', 'matplotlib.numerix.linear_algebra', 'matplotlib.numerix.random_array', 'matplotlib.numerix.fft', 'matplotlib.tri', 'matplotlib.delaunay', 'pytz', 'dateutil', 'dateutil/zoneinfo'] running build running build_py copying lib/matplotlib/mpl-data/matplotlibrc -> build/lib.aix-5.3-2.6/matplotlib/mpl-data copying lib/matplotlib/mpl-data/matplotlib.conf -> build/lib.aix-5.3-2.6/matplotlib/mpl-data running build_ext building 'matplotlib.ft2font' extension xlC_r xlC_r -bI:/usr/local/python/python-2.6.3/lib/python2.6/config/python.exp build/temp.aix-5.3-2.6/src/ft2font.o build/temp.aix-5.3-2.6/src/mplutils.o build/temp.aix-5.3-2.6/CXX/cxx_extensions.o build/temp.aix-5.3-2.6/CXX/IndirectPythonInterface.o build/temp.aix-5.3-2.6/CXX/cxxsupport.o build/temp.aix-5.3-2.6/CXX/cxxextensions.o -L/opt/freeware/lib -L/usr/local/lib -lfreetype -lz -lstdc++ -lm -o build/lib.aix-5.3-2.6/matplotlib/ft2font.so /usr/vacpp/bin/xlC_r: 1501-228 (W) input file xlC_r not found error: command 'xlC_r' failed with exit status 252 M.Sc. John Floan, NTNU. IT Division, HPC E-Mail: joh...@nt... Hogskoleringen 7i Mobile: +47 918 97646 N-7034 Trondheim Norway FAX: +47 735 98098 |
From: Åke K. <ake...@gm...> - 2010-12-15 14:13:57
|
I am using matplotlib in a wxpython application where series are added dynamically to subplots in a figure. I added the very handy option to toggle series' visibility (by calling set_visible(False). The catch is however that the invisible series are included in the rescaling of the artists (Line2D all of them). Is there any way to fix that? The behavior I'm after is for rescaling to be based on visible artists only. The way I am doing the rescaling currently is simply by calling these two methods from the event handler: event.inaxes.relim() event.inaxes.autoscale_view(tight=None, scalex=False, scaley=True) |
From: Skip M. <sk...@po...> - 2010-12-15 12:50:20
|
> Skip,You can call figlegend() and build a legend for the figure, > irrespectively of any axes. Thanks. Sounds like exactly what I need. Skip |
From: Teng L. <lew...@gm...> - 2010-12-15 12:25:58
|
Linux 2.6.32-25-generic #45-Ubuntu SMP Sat Oct 16 19:48:22 UTC 2010 i686 GNU/Linux matplotlib 0.99.1.1 The script below is copied from http://matplotlib.sourceforge.net/examples/pylab_examples/hatch_demo.html It works. But it can not be saved as an eps file. I have a lot of histogram plots using "hatch" needed to be saved as eps, is it possible to fix this bug? Thanks. """ Hatching (pattern filled polygons) is supported currently in the PS, PDF, SVG and Agg backends only. """ import matplotlib.pyplot as plt from matplotlib.patches import Ellipse, Polygon fig = plt.figure() ax1 = fig.add_subplot(131) ax1.bar(range(1,5), range(1,5), color='red', edgecolor='black', hatch="/") ax1.bar(range(1,5), [6] * 4, bottom=range(1,5), color='blue', edgecolor='black', hatch='//') ax1.set_xticks([1.5,2.5,3.5,4.5]) ax2 = fig.add_subplot(132) bars = ax2.bar(range(1,5), range(1,5), color='yellow', ecolor='black') + \ ax2.bar(range(1, 5), [6] * 4, bottom=range(1,5), color='green', ecolor='black') ax2.set_xticks([1.5,2.5,3.5,4.5]) patterns = ('-', '+', 'x', '\\', '*', 'o', 'O', '.') for bar, pattern in zip(bars, patterns): bar.set_hatch(pattern) ax3 = fig.add_subplot(133) ax3.fill([1,3,3,1],[1,1,2,2], fill=False, hatch='\\') ax3.add_patch(Ellipse((4,1.5), 4, 0.5, fill=False, hatch='*')) ax3.add_patch(Polygon([[0,0],[4,1.1],[6,2.5],[2,1.4]], closed=True, fill=False, hatch='/')) ax3.set_xlim((0,6)) ax3.set_ylim((0,2.5)) plt.show() |
From: Bob L. <bo...@tr...> - 2010-12-15 04:15:09
|
Can anyone help me figure out how to identify arrow and function key events with matplotlib? I can get normal alphanumeric KeyEvents, but arrow and function keys arrive with their "key" attribute set to "None". I'm using matplotlib 0.99.1.1 with PyQt4. Thanks. - Bob Lewis |
From: Jason G. <jas...@cr...> - 2010-12-15 03:24:20
|
On 10/28/10 1:18 PM, Will Grover wrote: > Hello matplotlib-users, > > I'm using subplots to make an array of plots, but because some of the plots > have wider y-axis tick labels than others, some of the subplots end up > looking too close to each other. Here's an image that shows what I mean: > > http://web.mit.edu/wgrover/www/spacing.png > > I'm currently using pylab.subplots_adjust(hspace = __, vspace = __) to > adjust the subplot spacing, but since that applies to all subplots, no one > setting looks right for the entire array of plots. Is there any way to set > the spacing so that the subplots *plus tick labels* are evenly distributed? > Or can I manually specify the spacing between each subplot? Thanks, (to those more knowledgeable than me...) Is this something that ImageGrid would solve? http://matplotlib.sourceforge.net/mpl_toolkits/axes_grid/users/overview.html#axes-grid1 Also, could you use subplotpar to adjust spacing in each subplot? http://matplotlib.sourceforge.net/users/gridspec.html#adjust-gridspec-layout Thanks, Jason |
From: Uri L. <las...@mi...> - 2010-12-14 22:16:31
|
Strangely, it appears to find the correct numpy. More strangely, I picked a random order of doing things and suddenly it all works. I think what I ended up doing is this: Following builds using default setting without changing anything except: MACOSX_DEPLOYMENT_TARGET=10.6 python 2.7 numpy 1.5.1 with the flag --fcompiler=gnu95 mpl from github, setting the flags as I have posted earlier then set these flags: export MACOSX_DEPLOYMENT_TARGET=10.6 export CFLAGS="-arch i386 -arch x86_64" export FFLAGS="-m32 -m64" export LDFLAGS="-Wall -undefined dynamic_lookup -bundle -arch i386 -arch x86_64 -framework Accelerate" then build scipy 0.8.0 with --fcompiler=gnu95 Then it all worked. Honestly, I don't understand why it should work because of this voodoo, but I am happily making figures now... Also of note, supposedly scipy 0.8 has problems with python 2.7. Version 0.9 should solve these problems (currently in beta). Thanks for the help! Uri ................................................................................... Uri Laserson Graduate Student, Biomedical Engineering Harvard-MIT Division of Health Sciences and Technology M +1 917 742 8019 las...@mi... On Tue, Dec 14, 2010 at 17:03, Benjamin Root <ben...@ou...> wrote: > On Mon, Dec 13, 2010 at 5:54 PM, Uri Laserson <las...@mi...> wrote: > >> >>> Well, on my Linux system, when I get that error, it happens when I do >>> an update of numpy, but fail to rebuild mpl. Here is the order how I >>> build things: numpy, scipy, matplotlib. I would imagine ipython goes >>> last. >>> >>> >> That has been my order as well. How can I track down why the import of >> numpy.core.multiarray is causing the problem? And why would it cause a >> problem only when MPL is being imported, but not if I import it manually? >> >> Originally, I tried to build the GitHub trunk version of numpy, but then >> abandoned that. Since MPL is saying that it was built against the 20000... >> ABI rather than the 10000... ABI, is it possible the MPL is finding some >> other version of numpy lying around? However, I'm pretty sure I deleted >> everything from the git numpy build. How could I pinpoint which numpy >> libraries are being linked against in the MPL build? >> >> Uri >> > > Uri, > > > "is it possible the MPL is finding some other version of numpy lying > around?" > > Yes, this is really the only remaining explanation. To find out which > numpy is being used for the build process, I think if you save the output of > the build process for mpl, I am fairly sure that that information is > somewhere near the beginning of the build log. > > Ben Root > |
From: Benjamin R. <ben...@ou...> - 2010-12-14 22:04:26
|
On Mon, Dec 13, 2010 at 5:54 PM, Uri Laserson <las...@mi...> wrote: > >> Well, on my Linux system, when I get that error, it happens when I do >> an update of numpy, but fail to rebuild mpl. Here is the order how I >> build things: numpy, scipy, matplotlib. I would imagine ipython goes >> last. >> >> > That has been my order as well. How can I track down why the import of > numpy.core.multiarray is causing the problem? And why would it cause a > problem only when MPL is being imported, but not if I import it manually? > > Originally, I tried to build the GitHub trunk version of numpy, but then > abandoned that. Since MPL is saying that it was built against the 20000... > ABI rather than the 10000... ABI, is it possible the MPL is finding some > other version of numpy lying around? However, I'm pretty sure I deleted > everything from the git numpy build. How could I pinpoint which numpy > libraries are being linked against in the MPL build? > > Uri > Uri, "is it possible the MPL is finding some other version of numpy lying around?" Yes, this is really the only remaining explanation. To find out which numpy is being used for the build process, I think if you save the output of the build process for mpl, I am fairly sure that that information is somewhere near the beginning of the build log. Ben Root |
From: Benjamin R. <ben...@ou...> - 2010-12-14 21:46:34
|
On Tue, Dec 14, 2010 at 2:29 PM, Skip Montanaro <sk...@po...> wrote: > I am plotting a time series, a handful of moving averages and the > standard deviation of one of the moving averages. The first crop of > data are all in an overlapping range so are plotted using the > left-hand y axis. The standard deviation range falls way outside the > ranges of the other data streams, so I plot it on the right- hand > axis. > > Since legends are associated with an axis how do I create one legend > which covers all lines in the graph? I keep getting a complaint from > mpl about the number of labels not matching the number of arrays being > plotted (one v. five if I get the legend associated with the > right-hand axis, four v. five if I get the legend associated with the > left-hand axis). > > Thanks, > > Skip Montanaro > sk...@po... > > > Skip, You can call figlegend() and build a legend for the figure, irrespectively of any axes. With this function, you can explicitly pass it a list of the line objects and the labels. http://matplotlib.sourceforge.net/api/pyplot_api.html?highlight=legend#matplotlib.pyplot.figlegend I don't think it can automatically know about all of the lines in your graph (then again, I haven't tried and maybe it does). I hope this helps! Ben Root |
From: Skip M. <sk...@po...> - 2010-12-14 20:29:57
|
I am plotting a time series, a handful of moving averages and the standard deviation of one of the moving averages. The first crop of data are all in an overlapping range so are plotted using the left-hand y axis. The standard deviation range falls way outside the ranges of the other data streams, so I plot it on the right- hand axis. Since legends are associated with an axis how do I create one legend which covers all lines in the graph? I keep getting a complaint from mpl about the number of labels not matching the number of arrays being plotted (one v. five if I get the legend associated with the right-hand axis, four v. five if I get the legend associated with the left-hand axis). Thanks, Skip Montanaro sk...@po... |
From: vt603800 <vt6...@ba...> - 2010-12-14 20:29:37
|
I tried to upgrade to version 1.0 but without success. Could anybody tell where it went wrong? I downloaded the package matplotlib-1.0.0.tar.gz from http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.0/ First I tried a easy install, doing easy_install -m matplotlib-1.0.0.tar.gz from the command line but after this I checked the current version in Idle and it still was 0.99 So I manually removed all the matplotlib files from /usr/lib/pymodules/ and did the easy install again from the command line but now I can't import matplotlib anymore in Idle. This was the installation report: install_dir /usr/local/lib/python2.6/dist-packages/ Processing matplotlib-1.0.0.tar.gz Running matplotlib-1.0.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-dWh4_f/matplotlib-1.0.0/egg-dist-tmp-ohZvCJ basedirlist is: ['/usr/local', '/usr'] ============================================================================ BUILDING MATPLOTLIB matplotlib: 1.0.0 python: 2.6.6 (r266:84292, Sep 15 2010, 16:22:56) [GCC 4.4.5] platform: linux2 REQUIRED DEPENDENCIES numpy: 1.3.0 freetype2: found, but unknown version (no pkg-config) * WARNING: Could not find 'freetype2' headers in any * of '/usr/local/include', '/usr/include', '.', * '/usr/local/include/freetype2', * '/usr/include/freetype2', './freetype2'. OPTIONAL BACKEND DEPENDENCIES libpng: found, but unknown version (no pkg-config) * Could not find 'libpng' headers in any of * '/usr/local/include', '/usr/include', '.' Tkinter: no * Using default library and include directories for * Tcl and Tk because a Tk window failed to open. * You may need to define DISPLAY for Tk to work so * that setup can determine where your libraries are * located. Tkinter present, but header files are not * found. You may need to install development * packages. wxPython: 2.8.11.0 * WxAgg extension not required for wxPython >= 2.8 pkg-config: looking for pygtk-2.0 gtk+-2.0 * Package pygtk-2.0 was not found in the pkg-config * search path. Perhaps you should add the directory * containing `pygtk-2.0.pc' to the PKG_CONFIG_PATH * environment variable No package 'pygtk-2.0' found * Package gtk+-2.0 was not found in the pkg-config * search path. Perhaps you should add the directory * containing `gtk+-2.0.pc' to the PKG_CONFIG_PATH * environment variable No package 'gtk+-2.0' found * You may need to install 'dev' package(s) to * provide header files. Gtk+: no * Could not find Gtk+ headers in any of * '/usr/local/include', '/usr/include', '.' Mac OS X native: no Qt: no Qt4: no Cairo: 1.8.8 OPTIONAL DATE/TIMEZONE DEPENDENCIES datetime: present, version unknown dateutil: 1.4.1 pytz: 2010b OPTIONAL USETEX DEPENDENCIES dvipng: no ghostscript: 8.71 latex: no pdftops: 0.14.3 [Edit setup.cfg to suppress the above messages] ============================================================================ pymods ['pylab'] packages ['matplotlib', 'matplotlib.backends', 'matplotlib.backends.qt4_editor', 'matplotlib.projections', 'matplotlib.testing', 'matplotlib.testing.jpl_units', 'matplotlib.tests', 'mpl_toolkits', 'mpl_toolkits.mplot3d', 'mpl_toolkits.axes_grid', 'mpl_toolkits.axes_grid1', 'mpl_toolkits.axisartist', 'matplotlib.sphinxext', 'matplotlib.numerix', 'matplotlib.numerix.mlab', 'matplotlib.numerix.ma', 'matplotlib.numerix.linear_algebra', 'matplotlib.numerix.random_array', 'matplotlib.numerix.fft', 'matplotlib.tri', 'matplotlib.delaunay'] warning: no files found matching 'MANIFEST' warning: no files found matching 'examples/data/*' warning: no files found matching 'lib/mpl_toolkits' gcc: error trying to exec 'cc1plus': execvp: No such file or directory error: Setup script exited with error: command 'gcc' failed with exit status 1 Hans R On Mon, 13 Dec 2010 14:13:32 -0600, Ryan May <rm...@gm...> wrote: > On Mon, Dec 13, 2010 at 2:07 PM, vt603800 <vt6...@ba...> wrote: >> I get this error: >> AttributeError: 'module' object has no attribute 'subplot2grid' >> >> Are some modules not installed? or is there another problem, I'm a newby >> in >> matplotlib, it might be something very obvious... >> >> Running Matplotlib version 0.99.3 (python 2.6.6) on Ubuntu 10.10 > > I'm 90% certain that the subplot2grid feature was added in 1.0. You > could build and install from source: > > https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.0/ > > Ryan |
From: Daniel H. <dh...@gm...> - 2010-12-14 19:24:55
|
I'm using it too, with excellent results. Thanks JJ! On Tue, Dec 14, 2010 at 2:13 PM, C M <cmp...@gm...> wrote: > >> >> >> On Thu, Sep 30, 2010 at 7:55 AM, Jae-Joon Lee <lee...@gm...>wrote: >> >>> On Thu, Sep 23, 2010 at 10:31 AM, C M <cmp...@gm...> wrote: >>> > Until a more permanent solution is figured out, can anyone recommend >>> > any workarounds, even if they are a little clunky? I'm embedding mpl >>> > plots in wxPython and am also finding this issue suboptimal. >>> > >>> > Che >>> > >>> >>> A (partial) workaround is possible using the axes_grid1 toolkit (i.e., >>> you need matplotlib 1.0). >>> Attached is a module I just cooked up (based on my previous attempt @ >>> >>> http://www.mail-archive.com/mat...@li.../msg18129.html >>> ), >>> and it seems to work quite well. >>> The usage is simple. >>> >>> >>> ax = plt.axes([0,0,1,1]) >>> >>> ax.set_yticks([0.5]) >>> ax.set_yticklabels(["very long label"]) >>> >>> make_axes_area_auto_adjustable(ax) # This is where axes_grid1 >>> comes in >>> >>> Then, the axes area(including ticklabels and axis label) will be >>> automatically adjusted to fit in the given extent ([0, 0, 1, 1] in the >>> above case). >>> >>> While this is mainly for a single axes plot, you may use it with >>> multi-axes plot (but somewhat trickier to use). A few examples are >>> included in the module. >>> >>> Regards, >>> >>> -JJ >>> >> >> This thread is a few months old now, but I just wanted to mention that I >> am using JJ's workaround (thanks!) in my app--with either one or two y >> axes--and it is just excellent. >> >> This should definitely be at least an option for matplotlib users--the >> quality of the appearance of the plots now is like night and day, because, >> to me, seeing a plot without its axes labels (I'm talking about in a >> resizable plot embedded in an application, not a static graph for inclusion >> in a publication) is a *major* look and feel demerit. >> >> Che >> >> >> >> >> ------------------------------------------------------------------------------ >> Lotusphere 2011 >> Register now for Lotusphere 2011 and learn how >> to connect the dots, take your collaborative environment >> to the next level, and enter the era of Social Business. >> http://p.sf.net/sfu/lotusphere-d2d >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> > > > -- > Daniel Hyams > dh...@gm... > -- Daniel Hyams dh...@gm... |
From: C M <cmp...@gm...> - 2010-12-14 19:13:40
|
On Thu, Sep 30, 2010 at 7:55 AM, Jae-Joon Lee <lee...@gm...> wrote: > On Thu, Sep 23, 2010 at 10:31 AM, C M <cmp...@gm...> wrote: > > Until a more permanent solution is figured out, can anyone recommend > > any workarounds, even if they are a little clunky? I'm embedding mpl > > plots in wxPython and am also finding this issue suboptimal. > > > > Che > > > > A (partial) workaround is possible using the axes_grid1 toolkit (i.e., > you need matplotlib 1.0). > Attached is a module I just cooked up (based on my previous attempt @ > > http://www.mail-archive.com/mat...@li.../msg18129.html > ), > and it seems to work quite well. > The usage is simple. > > > ax = plt.axes([0,0,1,1]) > > ax.set_yticks([0.5]) > ax.set_yticklabels(["very long label"]) > > make_axes_area_auto_adjustable(ax) # This is where axes_grid1 comes > in > > Then, the axes area(including ticklabels and axis label) will be > automatically adjusted to fit in the given extent ([0, 0, 1, 1] in the > above case). > > While this is mainly for a single axes plot, you may use it with > multi-axes plot (but somewhat trickier to use). A few examples are > included in the module. > > Regards, > > -JJ > This thread is a few months old now, but I just wanted to mention that I am using JJ's workaround (thanks!) in my app--with either one or two y axes--and it is just excellent. This should definitely be at least an option for matplotlib users--the quality of the appearance of the plots now is like night and day, because, to me, seeing a plot without its axes labels (I'm talking about in a resizable plot embedded in an application, not a static graph for inclusion in a publication) is a *major* look and feel demerit. Che |
From: C M <cmp...@gm...> - 2010-12-14 19:07:52
|
> It will work if you explicitly set its transform. > > star, = ax.plot([xdata[ind]], [ydata[ind]], '*', > ms=40, mfc='y', mec='b', > transform=thisline.get_transform()) > > JJ, thank you, this worked in my app as well. > > I also use the identity of the picked line in my code, since I provide > > additional information about that data series to the user based on which > > line (and point) they picked. So if reparenting the line loses that > > information, that's going to be a problem. > > > > I believe that reparenting only changes the "axes" attribute of the > line, so it might not be a problem. > Yes, it turns out it doesn't seem to cause any problem, which is great. > > When I was using matplotlib 0.98.5.2, I had the same code as I have now, > > with two different axes, and pick events were picked up on lines > belonging > > to either of the axes. Unless I'm misunderstanding, something has > changed > > and this used to be possible. Is that correct? > > Yes, I believe this used to be possible. While I'm not sure why it > changed, I'm also not sure if we need to revert this change as I > personally prefer the current simple behavior (although there could be > a room for improvement). And I want to hear what others think. You may > file a new feature request (or a bug if you want) issue regarding > this. > I don't know if the other developers have weighed in on this in some other forum or in personal communication, but as a user my vote is to keep the old behavior. I don't know how much of a simplicity benefit the developer team gets, but as a user I doubt I would have been able to figure out your suggestions based on Matplotlib documentation alone, unless maybe I am missing something. The previous way it worked strikes me as the user-intuitive way; this new way requires you to move a line to an axis that it doesn't match but then use its transform to "decode" what it really should be (if I understand it about right). And then one has to do that for every line. That seems complex from the user's perspective. Now that it is all in place it is no problem, but getting here was tough and un-doable without help. I guess I will file a feature request or bug report about it. So thank you very much, JJ, for all your help on at least three key details that massively improve the user experience of the app I am trying to put together. And thanks to John and the rest of the developers for Matplotlib! Che |
From: Michael D. <md...@st...> - 2010-12-14 17:28:59
|
You can create an class to store these values with a method to handle the callback, eg. (untested code): class KeyHandler: def __init__(self): self.ImageNumber = 0 def OnKeyPress(self, event): self.ImageNumber += 1 key_handler = KeyHandler() plt.connect('key_press_event', key_handler.OnKeyPress) Mike On 12/11/2010 07:24 PM, John wrote: > Hi all, > I have set up an event handler and function to perform actions when a > user presses certain keys in the plot window. The function needs access > to variables that are in the main function. How do I pass these > variables to the function. > > In OnKeyPress, ImageNumber and Li are objects in the main program. Any > ideas on how to pass them? Thanks > > plt.connect('key_press_event',OnKeyPress) > > def OnKeyPress(self,event): > print 'button= ',event.key, event.xdata, event.ydata > if event.key == 'm': > ImageNumber = ImageNumber + 1 > if event.key == 'n': > ImageNumber = ImageNumber - 1 > > rawimage = Li.GetImage(ImageNumber) > plt.imshow(rawimage) > plt.title("Image number %3d" % (ImageNumber)) > plt.draw() > > > ------------------------------------------------------------------------------ > Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL, > new data types, scalar functions, improved concurrency, built-in packages, > OCI, SQL*Plus, data movement tools, best practices and more. > http://p.sf.net/sfu/oracle-sfdev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Michael Droettboom Science Software Branch Space Telescope Science Institute Baltimore, Maryland, USA |
From: Michael D. <md...@st...> - 2010-12-14 16:19:19
|
Only nearest and bilinear are supported for NonUniformImage. As you suggested, due to a small bug, an exception was not being raised when the interpolation is not one of those two options. This has now been fixed in SVN. Mike On 12/13/2010 01:47 PM, Nicolas Bigaouette wrote: > Hi all, > > I'm using matplotlib.image.NonUniformImage() to plot a 2D rectilinear > grid (non uniform spacing between points): > > im = matplotlib.image.NonUniformImage(grid, extent=extent, > origin='lower', cmap = matplotlib.cm.jet, interpolation = "nearest") > > im.set_data(x, y, z) > > ax.images.append(im) > > ax.set_xlim(extent_x) > > ax.set_ylim(extent_z) > > I have tried using a different interpolation value as in imshow(), but > only "nearest" and "bilinear" gives expected results. All others > ('bicubic', 'spline16', 'spline36', 'hanning', 'hamming', 'hermite', > 'kaiser', 'quadric', 'catrom', 'gaussian', 'bessel', 'mitchell', > 'sinc' and 'lanczos') show garbage instead of my data. > > If the other interpolations are not implemented, there should be at > least an assert somewhere... > > Thanx > > > ------------------------------------------------------------------------------ > Lotusphere 2011 > Register now for Lotusphere 2011 and learn how > to connect the dots, take your collaborative environment > to the next level, and enter the era of Social Business. > http://p.sf.net/sfu/lotusphere-d2d > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Michael Droettboom Science Software Branch Space Telescope Science Institute Baltimore, Maryland, USA |
From: gary r. <gr...@bi...> - 2010-12-14 05:40:52
|
Thanks for the workaround JJ. I've filed a feature request, Gary On Mon, Dec 13, 2010 at 9:54 PM, Jae-Joon Lee <lee...@gm...> wrote: > It seems that there is no option to change join and cap style for > patches (only lines have them). > While there could be other ways, one workaround is to use patheffect. > > Below is a modified version of your example. > > Meanwhile, I think the situation needs to be fixed, i.e., Patches > should implement set_capstyle and set_joinstyle. Can you file a > feature request on the tracker? > > Regards, > > -JJ > > > > import matplotlib.pyplot as plt > from mpl_toolkits.axes_grid1.anchored_artists import AnchoredSizeBar > > from matplotlib.patheffects import Stroke > > def add_sizebar(ax, size): > asb = AnchoredSizeBar(ax.transData, > size, > str(size), > loc=8, > pad=0.1, borderpad=0.5, sep=5, > frameon=False) > ax.add_artist(asb) > > mypatch = asb.size_bar.get_children()[0] > mypatch.set_path_effects([Stroke(joinstyle='miter', > capstyle='butt')]) # override > joinstyle and capstyle > > add_sizebar(plt.gca(), 0.5) > > > plt.draw() > plt.show() > > > > > On Mon, Dec 13, 2010 at 9:16 AM, gary ruben <gr...@bi...> wrote: >> Is it possible to control the join and cap styles of lines and >> patches? Is there an example for this? I'm trying to add a scale >> marker to a plot, but lines have rounded ends by default, so I'm >> currently changing these manually in Inkscape to miter join and butt >> cap. Here is a minimal example, based on the code here: >> >> import matplotlib.pyplot as plt >> from mpl_toolkits.axes_grid1.anchored_artists import AnchoredSizeBar >> >> def add_sizebar(ax, size): >> asb = AnchoredSizeBar(ax.transData, >> size, >> str(size), >> loc=8, >> pad=0.1, borderpad=0.5, sep=5, >> frameon=False) >> ax.add_artist(asb) >> >> add_sizebar(plt.gca(), 0.5) >> >> plt.draw() >> plt.show() >> >> >> What I'd like is a 2pt wide line with butt-style cap ends, >> >> thanks, >> Gary >> >> ------------------------------------------------------------------------------ >> Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL, >> new data types, scalar functions, improved concurrency, built-in packages, >> OCI, SQL*Plus, data movement tools, best practices and more. >> http://p.sf.net/sfu/oracle-sfdev2dev >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > |
From: Xunchen L. <xun...@gm...> - 2010-12-14 03:10:42
|
Hello, I'm plotting some experimental data and found my x axis variable are displayed like 1, 2, 3, +1000. It seems depend on how you set a stopper or something. I'm wondering how to make it display just 1001, 1002, 1003? thanks! |
From: Xunchen L. <xun...@gm...> - 2010-12-14 02:58:53
|
Hello, I'm plotting some experimental data and found my x axis variable are displayed like 1, 2, 3, +1000. It seems depend on how you set a stopper or something. I'm wondering how to make it display just 1001, 1002, 1003? thanks! |
From: Uri L. <las...@mi...> - 2010-12-13 23:57:43
|
> > > Well, on my Linux system, when I get that error, it happens when I do > an update of numpy, but fail to rebuild mpl. Here is the order how I > build things: numpy, scipy, matplotlib. I would imagine ipython goes > last. > > That has been my order as well. How can I track down why the import of numpy.core.multiarray is causing the problem? And why would it cause a problem only when MPL is being imported, but not if I import it manually? Originally, I tried to build the GitHub trunk version of numpy, but then abandoned that. Since MPL is saying that it was built against the 20000... ABI rather than the 10000... ABI, is it possible the MPL is finding some other version of numpy lying around? However, I'm pretty sure I deleted everything from the git numpy build. How could I pinpoint which numpy libraries are being linked against in the MPL build? Uri |
From: Benjamin R. <ben...@ou...> - 2010-12-13 23:37:24
|
On Monday, December 13, 2010, Uri Laserson <las...@mi...> wrote: > > Can you try importing pyplot from a regular python prompt? If that > works, then the issue is with ipython messing up the import process of > mpl. > > I get exactly the same problem... > > > laserson@hobbes:~$ pythonPython 2.7.1 (r271:86832, Dec 13 2010, 14:21:05) [GCC 4.2.1 (Apple Inc. build 5664)] on darwinType "help", "copyright", "credits" or "license" for more information. > >>>> import matplotlib>>> import matplotlib.pyplotRuntimeError: module compiled against ABI version 2000000 but this version of numpy is 1000009Traceback (most recent call last): > > File "<stdin>", line 1, in <module> File "/Users/laserson/matplotlib/lib/python2.7/site-packages/matplotlib/pyplot.py", line 23, in <module> from matplotlib.figure import Figure, figaspect > > File "/Users/laserson/matplotlib/lib/python2.7/site-packages/matplotlib/figure.py", line 16, in <module> import artist File "/Users/laserson/matplotlib/lib/python2.7/site-packages/matplotlib/artist.py", line 6, in <module> > > from transforms import Bbox, IdentityTransform, TransformedBbox, TransformedPath File "/Users/laserson/matplotlib/lib/python2.7/site-packages/matplotlib/transforms.py", line 34, in <module> > > from matplotlib._path import affine_transformImportError: numpy.core.multiarray failed to import>>> > Well, on my Linux system, when I get that error, it happens when I do an update of numpy, but fail to rebuild mpl. Here is the order how I build things: numpy, scipy, matplotlib. I would imagine ipython goes last. Ben Root |
From: Uri L. <las...@mi...> - 2010-12-13 22:40:02
|
> > > Can you try importing pyplot from a regular python prompt? If that > works, then the issue is with ipython messing up the import process of > mpl. > > I get exactly the same problem... laserson@hobbes:~$ python Python 2.7.1 (r271:86832, Dec 13 2010, 14:21:05) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import matplotlib >>> import matplotlib.pyplot RuntimeError: module compiled against ABI version 2000000 but this version of numpy is 1000009 Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/laserson/matplotlib/lib/python2.7/site-packages/matplotlib/pyplot.py", line 23, in <module> from matplotlib.figure import Figure, figaspect File "/Users/laserson/matplotlib/lib/python2.7/site-packages/matplotlib/figure.py", line 16, in <module> import artist File "/Users/laserson/matplotlib/lib/python2.7/site-packages/matplotlib/artist.py", line 6, in <module> from transforms import Bbox, IdentityTransform, TransformedBbox, TransformedPath File "/Users/laserson/matplotlib/lib/python2.7/site-packages/matplotlib/transforms.py", line 34, in <module> from matplotlib._path import affine_transform ImportError: numpy.core.multiarray failed to import >>> |