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
(14) |
2
(22) |
3
(8) |
4
(10) |
5
(1) |
6
|
7
(11) |
8
(4) |
9
(14) |
10
(18) |
11
(18) |
12
(2) |
13
(8) |
14
(14) |
15
(6) |
16
(8) |
17
(9) |
18
(9) |
19
(7) |
20
(8) |
21
(8) |
22
(14) |
23
(10) |
24
(11) |
25
(17) |
26
(1) |
27
(3) |
28
(12) |
|
|
|
|
|
Hi all, I just got matplotlib working on my box, so I thought I'd post this, so that it will be in the archives, and because I'd like others to try it and let me know if it doesn't work for you. One question for the knowledgeable folks here: I have /usr/include/zlib.h on my system, but I have no idea where I got it. I do know that it isn't on other systems in my office without the dev tools. Did it come with the dev tools, or something else I installed? Anyway, here's what worked for me: Installing matplotlib on OS-X (10.3.7) Here are my notes as to what it took to get matplotlib (0.71) installed and working on OS-X. I have so far kept a fink-free system, so that's what I've done here as well. I use it with the AGG back end for generating images for a web site, and hopefully with the wx backend for interactive use and embedding in wx Applications. 1) Requirements: ------------------------------------------- According to the matplotlib install docs (http://matplotlib.sourceforge.net/installing.html), you need the following: freetype (>= 2.1.7) libpng zlib Personally, I've been avoiding Fink, as it doesn't seem to play well with the rest of OS-X, including the Apple supplied Python, so I've looked elsewhere for these libs. a) Freetype: I seem to have it in: /usr/X11R6/include/freetype2 I don't think I installed it myself, so it probably came with Apple's X11, Which I did install. However, I seemed to be having problems with that version, so I looked, and it seems to be: libfreetype.6.3.dylib Given that freetype2 is currently at version 2.1.9, I have no idea what to make of that! So off to sourceforge to get a new freetype: http://freetype.sourceforge.net/index2.html where I got: freetype-2.1.9.tar.gz Following the instructions in docs/INSTALL.UNX: $ ./configure $ make $ sudo make install That puts it in /usr/local/..., which is a good place for it. b) zlib: I have: /usr/include/zlib.h I don't know where I might have gotten it, but there it is. NOTE: I checked on another system in my office, and it doesn't have zlib. It also doesn't have any developer tools installed, so you couldn't build anything on it anyway. If zlib comes with XCode tools, anyone who can build should have it. It also may have come with some other package I've installed, but I have no idea what. Let me know if you know. c) libpng: This, I didn't have on my system, except inside the wxWidgets source tree, so I went looking for it. Note that you need zlib to compile libpng, so make sure you have that first. I did a google search for "libpng OS-X". I found: http://www.libpng.org/pub/png/pngcode.html Which led me to the libpng sourceforge site. From there I downloaded: libpng-1.2.8.tar.gz unpacked it, and opened a terminal in the libpng-1.2.8 directory, and did: $ cp scripts/makefile.darwin ./makefile (note that according to the INSTALL, there is supposed to be a makefile.macosx, but it wasn't there) I took a look in the makefile, and found: ZLIBLIB=/usr/local/lib ZLIBINC=/usr/local/include Which is not where zlib is on my system. However, while I can find zlib.h, I couldn't fine the actual lib, so I tried make without changing anything. $ make Which seemed to work fine. zlib must be installed in a standard location, and gcc found it. $ sudo make install to install the lib into /usr/local/ (this was specified in the makefile, and it's a good place for it) $ make test and $ ./pngtest pngnow.png Which both seemed to pass. d) Numeric or numarray: I already have Numeric installed, from Bob Ippolito's PIMP (MacPython Package Manager) repostitory. (www.undefined.org/python) 2) Building matplotlib --------------------------------------------------------- First, I took a look at the matplotlib setup.py. It had "auto" for the back-end flags, so I thought I would give it a try that way: $python setup.py build That worked! $ sudo python setup.py install 4) And now to test! $python >>> import pylab Could not open font file /Library/Fonts/NISC18030.ttf No module named pygtk PyGTK version 1.99.16 or greater is required to run the GTK Matplotlib backends This turns out to be because the matlabrc file sets the GTKAgg back end as the default. You have two choices. 1) you can set the back end before importing pylab. >>> import matplotlib >>> matplotlib.use('Agg') >>> import pylab This works fine 2) Edit the matplotlibrc file. I found it in: /System/Library/Frameworks/Python.framework/Versions/2.3/share/matplotlib/.matplotlibrc Change the line: backend : GTKAgg # the default backend to backend : Agg # the default backend And you're all set to make images for the web, etc. I'm going to leave getting it to work with wxPython for another day. -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no...
John Hunter wrote: > Chris> How do I save an AGG figure with the OO interface? > The distinction between the figure and > the canvas was made to fully separate the front end from the backend. Which is a good idea. > here the pure OO way: > from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas > from matplotlib.figure import Figure > > fig = Figure() > canvas = FigureCanvas(fig) So this is really the only extra call. not bad. > ax = fig.add_subplot(111) > ax.plot([1,2,3]) > ax.set_title('hi mom') > ax.grid(True) > ax.set_xlabel('time') > ax.set_ylabel('volts') > canvas.print_figure('test') > Hmm, I don't see the logic of being willing to use some pylab commands > (pylab.figure) but not others (pylab.savefig). Well, the figure constructor has to be in some namespace. pylab.savefig, however, bothers me for two reasons: 1) It seems to me that it belongs as a figure (or canvas, I suppose) method. 2) Most critically, it uses the "current figure". I can see where this makes sense with Matlab style interactive use, but in a program, I may be building more than one figure at a time, and it makes more sense to me to do something like: fig1.save("plot1") fig2.save("plot2") than: set_current_figure(1) pylab.savefig("plot1") set_current_figure(2) pylab.savefig("plot2") > But, if you really > hate savefig, you can call print_figure by getting your hands on the > current canvas > manager = pylab.get_current_fig_manager() Ah, the "current" concept again! > As we discussed earlier, it might be useful for the figure to store a > ref to it's canvas, then we could define fig.savefig which forwards > the call to canvas.print_figure. Would make for a cleaner interface > for folks who love '.' Yes, I confess, I love ".". That does sound like a good idea to me. Sorry to come off as being critical. I am very impressed with your work on matplotlib. There are been many promising starts to a python plotting package, and NONE of them have come even close to what you've done with matplotlib. That's why I'm using it. I also was a big fan and user of Matlab for years, I never would have gotten my dissertation done without it. However, I like Python as a language far more than Matlab, and with SciPy and matplotlib, we're getting close to having Matlab's wealth of functionality in Python. My ideal is that I have a plotting package that really feels Pythonesque. Matplotlib is actually pretty close. I think adding a few things, and making more docs and examples, and we'll have just what I've been wanting. I hope as I get more familiar with matplotlib, I'll start to contribute code, rather than just questions and criticism. John, do you want patches that add-to/improve the OO interface? -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no...
Hi, when I'm trying to play with the different sample script, I saw a bug with the polar plot. The zoom function provide by matplotlib is not working. When you are trying to zoom at a certain place, the result is in another place of the plot, probably not random but it seems at first. Nicolas
>>>>> "Chris" == Chris Barker <Chr...@no...> writes: Chris> Thanks John and Andrew. Now I've changed my matplotlibrc Chris> to use the Agg backend by default. It would be nice if the Chris> default could be set appropriately on install, but I have Chris> no idea how one would do that. However, I doubt that GTKAgg Chris> is the default on Windows, so maybe there is a way! I just change the default .matplotlibrc value when I build the windows installer to tkagg. There's nothing automatic. It would be nice if the setup.py script were smarter, and provided a custom rc file depending on what it finds at build time (numeric vs numarray, default backend) but there has been enough work to do just getting core plotting functionality going (most recently contour and polar) that configuration issues have been on the back burner. JDH
>>>>> "Chris" == Chris Barker <Chr...@no...> writes: Chris> Hi all, There has been some recent discussion about perhaps Chris> improving the OO interface. So Here's a question: Chris> How do I save an AGG figure with the OO interface? Hi Chris, Here is a canonical script to create an Agg canvas/figure and save it using the pure OO interface. The distinction between the figure and the canvas was made to fully separate the front end from the backend. The Figure is the abstract object that stores all the information about the figure, the canvas is where the ink goes. I agree there could be some changes to the interface to make this easier, but here the pure OO way: from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas from matplotlib.figure import Figure fig = Figure() canvas = FigureCanvas(fig) ax = fig.add_subplot(111) ax.plot([1,2,3]) ax.set_title('hi mom') ax.grid(True) ax.set_xlabel('time') ax.set_ylabel('volts') canvas.print_figure('test') Chris> For example: >>>> fig = pylab.figure() ax = fig.add_subplot(1,1,1) >>>> ax.plot(range(10), pylab.sin(range(10))) Chris> Now how do I save it as a PNG? I can do: >>>> pylab.savefig("test.png") Chris> But then that is the interface I'm trying to get away from. Hmm, I don't see the logic of being willing to use some pylab commands (pylab.figure) but not others (pylab.savefig). But, if you really hate savefig, you can call print_figure by getting your hands on the current canvas import matplotlib matplotlib.use('Agg') import pylab fig = pylab.figure() ax = fig.add_subplot(111) ax.plot([1,2,3]) manager = pylab.get_current_fig_manager() manager.canvas.print_figure('test') Kind of awkward. This is basically what savefig does. Chris> Another option would be: >>>> fig.savefig Chris> But that's not there either. As we discussed earlier, it might be useful for the figure to store a ref to it's canvas, then we could define fig.savefig which forwards the call to canvas.print_figure. Would make for a cleaner interface for folks who love '.' JDH
Thanks John and Andrew. Now I've changed my matplotlibrc to use the Agg backend by default. It would be nice if the default could be set appropriately on install, but I have no idea how one would do that. However, I doubt that GTKAgg is the default on Windows, so maybe there is a way! -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no...
Pressing "send" too soon... To partially answer my own question, I looked in matplotlib.pylab.py, and found: manager = get_current_fig_manager() manager.canvas.print_figure(*args, **kwargs) However, I can't see how to get the canvas from a figure instance. This looks like one place the OO interface could be improved. -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no...
Hi all, There has been some recent discussion about perhaps improving the OO interface. So Here's a question: How do I save an AGG figure with the OO interface? For example: >>> fig = pylab.figure() >>> ax = fig.add_subplot(1,1,1) >>> ax.plot(range(10), pylab.sin(range(10))) Now how do I save it as a PNG? I can do: >>> pylab.savefig("test.png") But then that is the interface I'm trying to get away from. Looking at the docs, it looks like the agg back-end should have: >>> fig.print_figure("Test.png") Traceback (most recent call last): File "<stdin>", line 1, in ? AttributeError: Figure instance has no attribute 'print_figure' But no such luck. Another option would be: >>> fig.savefig But that's not there either. Thanks, -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no...
>>>>> "Andrew" == Andrew Straw <str...@as...> writes: Andrew> What does your .matplotlibrc say on the "backend" line? To flesh out Andrew's answer a bit, see http://matplotlib.sourceforge.net/faq.html#MATPLOTLIBRC and http://matplotlib.sourceforge.net/backends.html Cheers, JDH
Chris Barker wrote: > Hi all, > > I'm working on installing matplotlib on a fink-free OS-X. When I have > it all working, I'll post the methodology here. > > I've got it all compiled and installed, but when I run it, I get: > > Python 2.3 (#1, Sep 13 2003, 00:49:11) > [GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> import pylab > Could not open font file /Library/Fonts/NISC18030.ttf > No module named pygtk > PyGTK version 1.99.16 or greater is required to run the GTK Matplotlib > backends > > This makes sense, as I don't have PyGTK, However, I would have thought > that setup.py would have figured that out, and not tried to build it. > At this point, all I need is to generate images with the AGG back-end, > so why is it trying to run PyGTK on import? What does your .matplotlibrc say on the "backend" line?
Hi all, I'm working on installing matplotlib on a fink-free OS-X. When I have it all working, I'll post the methodology here. I've got it all compiled and installed, but when I run it, I get: Python 2.3 (#1, Sep 13 2003, 00:49:11) [GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import pylab Could not open font file /Library/Fonts/NISC18030.ttf No module named pygtk PyGTK version 1.99.16 or greater is required to run the GTK Matplotlib backends This makes sense, as I don't have PyGTK, However, I would have thought that setup.py would have figured that out, and not tried to build it. At this point, all I need is to generate images with the AGG back-end, so why is it trying to run PyGTK on import? If I do: >>> import matplotlib >>> matplotlib.use('Agg') >>> import pylab Then it works OK. It would be nice to just do an "import pylab", however. -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no...
John Hunter wrote: > Well, there are two exceptions to this: set operates on sequences or > instances, and can handle multiple key/val pairs. So you can do > > set(labels, rotation=45, fontsize=14, color='red') > > in place of > > for label in labels: > label.set_rotation(45) > label.set_fontsize(14) > label.set_color('red') > > I prefer the former, particularly when working from the python shell. > But it's a matter of taste... That is handy. Actually, I really like it when you can work with sets of objects, rather than doing the explicit looping all the time. It just goes to show you that OO design is not always the best answer. Now the question is: What namespace should set() live in? pylab.set() works for me. I'm now working on a Fink-free OS-X install, which is proving to be quite a chore. I'll report here when I'm done. -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no...
>>>>> "Delbert" == Delbert D Franz <dd...@lk...> writes: Delbert> I have made great progress with my GUI to plot Delbert> time-series files from my unsteady-flow modeling Delbert> software. It works when I have one subplot per figure Delbert> but I have not been able to get two subplots (211 and Delbert> 212) to work. Only the lower subplot appears and the Delbert> trace or line assigned to the upper subplot (211) appears Delbert> in the lower subplot. The space for the upper subplot Delbert> appears as blank space in the figure. You code looks correct on first glance (except did you mean tht title to be in the loop?) . My guess is your data structure has a bug in it. Add a print statement and make sure the loc code is as you think it is. print fg.fgs[ifg].sp[isp].loc_code ax = f.add_subplot(fg.fgs[ifg].sp[isp].loc_code) If they are correct, you need to compose a minimum, free standing script that replicates your problem and I can take a look. Hope this helps, JDH
I have made great progress with my GUI to plot time-series files from my unsteady-flow modeling software. It works when I have one subplot per figure but I have not been able to get two subplots (211 and 212) to work. Only the lower subplot appears and the trace or line assigned to the upper subplot (211) appears in the lower subplot. The space for the upper subplot appears as blank space in the figure. I'm a little unsure of how to embed multiple subplots using Tk. I based what I did on examples using pylab and tried to translate them to my case. Here's the code that does the work. The fg.fgs..., is a data structure that holds various descriptive items for the figure, subplot, and the various traces. The case that fails has 2 subplots with one trace per subplot. file_list holds various file-related objects that get the data from one or more files when it is needed. ifg = 0 win = Toplevel(bd=5, relief=RIDGE) win.title(fg.fgs[ifg].name) # Try to setup useful time-series axis days = DayLocator(range(1,32)) hours = HourLocator((6,12,18)) timeformat = DateFormatter('%d %b %y') w = int(fg.fgs[ifg].width) h = int(fg.fgs[ifg].height) f = Figure(figsize=(w, h), dpi=120) nsp = len(fg.fgs[ifg].sp) # ax = [] for isp in xrange(nsp): ax = f.add_subplot(fg.fgs[ifg].sp[isp].loc_code) ntr = len(fg.fgs[ifg].sp[isp].tr) for itr in xrange(ntr): i = fg.fgs[ifg].sp[isp].tr[itr].file_index jt_0, f_0 = file_list[i].get_ts_segment() jt_0 += 678576.0 ax.plot_date(jt_0, f_0, fg.fgs[ifg].sp[isp].tr[itr].plot_code) ax.xaxis.set_major_locator(days) ax.xaxis.set_minor_locator(hours) ax.autoscale_view() labels = ax.get_xticklabels() ax.xaxis.set_major_formatter(timeformat) set(labels, rotation=85) ax.set_xlabel(fg.fgs[ifg].sp[isp].xlabel) ax.set_ylabel(fg.fgs[ifg].sp[isp].ylabel) ax.grid(True) ax.set_title(fg.fgs[ifg].title) canvas = FigureCanvasTkAgg(f, master=win) canvas.show() canvas.get_tk_widget().pack(side=TOP, fill=BOTH, expand=1) toolbar = NavigationToolbar( canvas, win ) toolbar.update() canvas._tkcanvas.pack(side=TOP, fill=BOTH, expand=1) canvas._tkcanvas.pack(side=TOP, expand=1) canvas.print_figure('test.ps', dpi=300, orientation='landscape') I'm finding that Python and matplotlib are fun to use but I'm still low on the learning curve. However, I already have a usable package and can now start adding refinements and extensions. Thanks, Delbert Franz