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
(7) |
2
(5) |
3
(18) |
4
(9) |
5
(13) |
6
(14) |
7
(8) |
8
(7) |
9
(6) |
10
(6) |
11
(24) |
12
(14) |
13
(9) |
14
(21) |
15
(6) |
16
(1) |
17
(20) |
18
(42) |
19
(16) |
20
(21) |
21
(41) |
22
(13) |
23
(11) |
24
(15) |
25
(32) |
26
(27) |
27
(29) |
28
(10) |
29
(3) |
30
(1) |
31
(5) |
|
|
|
|
|
On Fri, Mar 21, 2008 at 4:18 PM, Simson Garfinkel <si...@ac...> wrote: > Is there an easy way to label bars with the value of the bar at that > point? I am doing log bars and it would be nice to have them labeled. > > I guess I can do this manually using text() and the values returned by > bar(); is there an automatic way to do it? There is nothing built in (though it would be a nice feature). Here is a simple example: import numpy as np import matplotlib.pyplot as plt N = 5 menMeans = (20, 35, 30, 35, 27) menStd = (2, 3, 4, 1, 2) ind = np.arange(N) # the x locations for the groups width = 0.35 # the width of the bars fig = plt.figure() ax = fig.add_subplot(111) rects1 = ax.bar(ind, menMeans, width, color='r', yerr=menStd) womenMeans = (25, 32, 34, 20, 25) womenStd = (3, 5, 2, 3, 3) rects2 = ax.bar(ind+width, womenMeans, width, color='y', yerr=womenStd) # add some ax.set_ylabel('Scores') ax.set_title('Scores by group and gender') ax.set_xticks(ind+width, ('G1', 'G2', 'G3', 'G4', 'G5') ) ax.legend( (rects1[0], rects2[0]), ('Men', 'Women') ) def autolabel(rects): # attach some text labels for rect in rects: height = rect.get_height() ax.text(rect.get_x()+rect.get_width()/2., 1.05*height, '%d'%int(height), ha='center', va='bottom') autolabel(rects1) autolabel(rects2) #fig.savefig('barchart_demo') plt.show()
I'm trying to use some matplotlib-generated pdfs in a pdflatex document, and seeing some extremely weird and disruptive size effects. The resulting pdfs can be seen at http://research.janelia.org/coventry/paper.pdf http://research.janelia.org/coventry/paper-small.pdf The first results from the code \begin{figure} \centering \subfigure[Prior distribution]{\label{fig:prior-graph} \includegraphics[width=6in]{prior-example} } \subfigure[Posterior distribution]{\label{fig:posterior-graph} \includegraphics[width=6in]{posterior-example} } \end{figure} and the second from the same code with "width=5cm". The two pdfs I'm trying to include are at http://research.janelia.org/coventry/prior-example.pdf and http://research.janelia.org/coventry/posterior-example.pdf It doesn't matter what order I include them in, I get the same size effects. If I generate postscript files with matplotlib and convert them to pdfs, I don't get this problem. So I have a workaround, but I would like to know how to create usable pdfs directly, and thought reporting this might be useful to matplotlib development. Best, Alex
Einar M. Einarsson wrote: > Hi all, > > I'm trying to find ways to make the file-size of my PNG images smaller. > > When I generate my 660*440px image I get a big 168kb file. > (8bit RGB color model, has an alpha channel (need that) but no > interlacing scheme) > > Here it is: > http://metphys.org/eme/T05.png > > I'm using the savefig method of-course. > > > To see how much I could compress it I used pngcrush (the best tool > according to the interwebs) and got it down to 128kb. > > But thats still way to large for my intended use. (plotting results > from an operational weather model, see. www.belgingur.is > We are currently using IDL.) > > From what I've read about PNG files, which is supposed to be rather > compact image format, it seems to me that the most effective way is > to have an indexed color table. > > So to cut it short: > > Is there any way to save a PNG file with an indexed color table? Perhaps this should be supported natively in mpl; but until it is, you can do the conversion after the fact using pngquant or pngnq. Presumably, if you don't in fact have more than 256 colors, this conversion will be lossless. I have not tried this; my suggestion is based on the descriptions of pngquant and pngnq packages in Ubuntu feisty. Here is the latter: -------------------------------- tool for optimizing PNG (Portable Network Graphics) images Pngnq is a tool for quantizing 32-bit RGBA PNG images to 8-bit RGBA pallete PNG. It's is an adaptation by Stuart Coyle of Greg Roelf's pnqquant. While pngquant uses a median cut algorithm, Pngnq uses Anthony Dekker's neuquant algorithm (http://members.ozemail.com.au/~dekker/NEUQUANT.HTML), generally resulting in better looking results than pngquant. Optimizers (like pngcrush and optipng) optimize the compression, usually losslessly. pngnq quantizes colors down to 256 (or fewer) distinct RGBA combinations, which is quite lossy. Optimized PNGs are usually two to four times smaller than the 32-bit versions. Homepage: http://www.cybertherial.com/pngnq/pngnq.html ----------------------------------------------- > > Or do you see any other way to shrink the files? > > > Best regards. > Einar M. Einarsson > www.belgingur.is > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Is there an easy way to label bars with the value of the bar at that point? I am doing log bars and it would be nice to have them labeled. I guess I can do this manually using text() and the values returned by bar(); is there an automatic way to do it? Thanks!
1. Moving to matplotlib-0.91.2 solved the problem with PDF generation on log axes. 2. Installing matplotlib-0.91.2 on Linux required installing these packages first: * freetype-devel * libpng-devel (Those packages were NOT installed automatically by easy_install)
On 2008年3月01日, Francesco Biscani apparently wrote: > I'm currently working mostly in C++ and exploring > integration with Python through Boost.Python+IPython+MPL. > I enjoy working in Python, but I'm afraid of making a more > consistent switch mainly for fear of losing the static > type checking that C++ gives me. I have the horrifying > feeling that if I were to write much code in Python > I could break it in so many ways just because of this, and > I'd have the constant perception of not having my back > covered by the compiler, at least for this kind of errors. I suspect there is no answer to this fear except trying it. If you want to hear your fear ridiculed, you can post this query on comp.lang.python. If you want to hear your fear lauded for its sensibility, post it to comp.lang.c++. That said, note that Python supports properties (getters and setters) that can do runtime checking. Also Python 3 supports function annotations, which someone will certainly exploit to provide type checking. I guess you might find PEP 3119 (ABCs) relevant as well. Cheers, Alan Isaac
On Fri, Mar 21, 2008 at 2:00 AM, Eric Firing <ef...@ha...> wrote: > Charlie Moad does the Windows releases. I don't know what compiler he uses. > > It would be nice if some people who have successfully built on Windows > could collectively assemble a step-by-step account of how to go from a > bare Win box to a working mpl (preferably compiled with mingw); but > maybe this would take more effort than it is worth. I am on shaky > ground suggesting it, because it is not something I can help with at > all, and I don't even have a clear picture of what it would require. I > gather a similar account would be useful for OS X. I made fairly detailed notes when I build numpy, scipy and mpl on a pristine powerbook: http://ipython.scipy.org/moin/Py4Science/InstallationOSX Unfortunately, I am having the same compiler error that Zachary and others are discussing in another thread (on the trunk but not the branch) JDH
On Tue, Feb 26, 2008 at 3:23 AM, Michaël Douchin <mic...@la...> wrote: > What is the good way to do what I reach for ? > I have much trouble to know how to define the c parameter of scatter. I > saw the "arrange" thing somewhere in internet, but don't understand what > it is for. Have you tried the scatter demos? See for example http://matplotlib.sf.net/examples/scatter_demo2.py JDH
On Fri, Mar 21, 2008 at 2:34 PM, Kenneth Miller <xke...@gm...> wrote: > So i've experimented with pcolor, and it's not really what I'm looking > for. What I'm attempting to do is plot some XY coordinates, just a > simple function, with the line being colored differently depending on > the value of that function. So if perhaps you were plotting > temperature vs time, you'd see the line change to red when it > approached higher temperatures and blue when it approached lower > temperatures. The "multi-colored line" recipe should be enough to get you started: http://www.scipy.org/Cookbook/Matplotlib/MulticoloredLine JDH
On Sat, Feb 23, 2008 at 3:25 AM, pmarsh <pm...@ha...> wrote: > Hello List, > > I am using python-matplotlib version 0.87.7-0.3ubuntu1(feisty) and > having some problems with a script that uses it. I get this import error > and am not sure how to debug it further, any assistance would be greatly > appreciated. It looks like the basemap version you are using is assuming a more recent version of matplotlib. You will probably either need to upgrade to more recent matplotlib (0.91.2 is the most recent) or downgrade to an older basemap. JDH
On Thu, Mar 20, 2008 at 7:32 PM, carlwenrich <car...@ya...> wrote: > > I've searched the user manual (and this forum) but I don't see anything that > helps. Assuming you mean what we call the tick labels: import matplotlib matplotlib.rcParams['xtick.labelsize'] = 14 matplotlib.rcParams['ytick.labelsize'] = 14 These can also be changed in your matplotlibrc file -- see http://matplotlib.sf.net/matplotlibrc JDH
All, A quick question.... So i've experimented with pcolor, and it's not really what I'm looking for. What I'm attempting to do is plot some XY coordinates, just a simple function, with the line being colored differently depending on the value of that function. So if perhaps you were plotting temperature vs time, you'd see the line change to red when it approached higher temperatures and blue when it approached lower temperatures. Any advice as to how to do this? Regards, Ken
On Mar 21, 2008, at 6:12 AM, Michael Droettboom wrote: > I vaguely recall a bug whereby mathtext on PDF was upside down > (because the direction of the y-axis was not being inverted)... but > I can't find the bug report. > > It does seem to work in 0.90.1 and 0.91.2 (on Linux at least). Are > you able to upgrade? Hm. On my Linux box, Well, easy_install should upgrade me to 91.2, but won't build because ft2build.h is missing...? Apparently that's part of freetype v2, which I have installed... On my Mac, easy_install says that matplotlib 0.87.7 is the active version and the best version. I guess I can't easy install... 02:46 PM t:/home/simsong# easy_install matplotlib Searching for matplotlib Reading http://pypi.python.org/simple/matplotlib/ Reading http://matplotlib.sourceforge.net Reading http://sourceforge.net/project/showfiles.php?group_id=80706&package_id=82474 Reading http://sourceforge.net/project/showfiles.php?group_id=80706 Best match: matplotlib 0.91.2 Downloading http://downloads.sourceforge.net/matplotlib/matplotlib-0.91.2.tar.gz?modtime=1199627250&big_mirror=0 Processing matplotlib-0.91.2.tar.gz Running matplotlib-0.91.2/setup.py -q bdist_egg --dist-dir /tmp/ easy_install-YMu8YK/matplotlib-0.91.2/egg-dist-tmp-AOR3hR = = = = ======================================================================== BUILDING MATPLOTLIB matplotlib: 0.91.2 python: 2.4.4 (#1, Oct 23 2006, 13:58:18) [GCC 4.1.1 20061011 (Red Hat 4.1.1-30)] platform: linux2 REQUIRED DEPENDENCIES numpy: 1.0.3 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 * Tkinter present, but header files are not found. * You may need to install development packages. wxPython: no * WXAgg's accelerator requires `wx-config'. The * `wx-config' executable could not be located in any * directory of the PATH environment variable. If you * want to build WXAgg, and wx-config is in some * other location or has some other name, set the * WX_CONFIG environment variable to the full path of * the executable like so: export WX_CONFIG=/ usr/lib * /wxPython-2.6.1.0-gtk2-unicode/bin/wx-config Gtk+: no * pygtk present but import failed Qt: Qt: 3.3.7, PyQt: 3.17 Qt4: no Cairo: 1.2.6 OPTIONAL DATE/TIMEZONE DEPENDENCIES datetime: present, version unknown dateutil: present, version unknown pytz: 2006p OPTIONAL USETEX DEPENDENCIES dvipng: 1.5 ghostscript: 8.15.4 latex: 3.141592 pdftops: 3.00 EXPERIMENTAL CONFIG PACKAGE DEPENDENCIES configobj: matplotlib will provide enthought.traits: matplotlib will provide [Edit setup.cfg to suppress the above messages] = = = = ======================================================================== warning: no files found matching 'NUMARRAY_ISSUES' warning: no files found matching 'MANIFEST' warning: no files found matching 'matplotlibrc' warning: no files found matching 'lib/matplotlib/toolkits' no previously-included directories found matching 'examples/_tmp_*' In file included from src/ft2font.cpp:2: src/ft2font.h:11:22: error: ft2build.h: No such file or directory src/ft2font.h:12:10: error: #include expects "FILENAME" or <FILENAME> src/ft2font.h:13:10: error: #include expects "FILENAME" or <FILENAME> src/ft2font.h:14:10: error: #include expects "FILENAME" or <FILENAME> src/ft2font.h:15:10: error: #include expects "FILENAME" or <FILENAME> src/ft2font.h:16:10: error: #include expects "FILENAME" or <FILENAME> src/ft2font.h:31: error: ‘FT_Bitmap’ has not been declared src/ft2font.h:31: error: ‘FT_Int’ has not been declared src/ft2font.h:31: error: ‘FT_Int’ has not been declared src/ft2font.h:75: error: expected ‘,’ or ‘...’ before ‘&’ token src/ft2font.h:75: error: ISO C++ forbids declaration of ‘FT_Face’ with no type src/ft2font.h:81: error: expected ‘,’ or ‘...’ before ‘&’ token src/ft2font.h:81: error: ISO C++ forbids declaration of ‘FT_Face’ with no type src/ft2font.h:121: error: ‘FT_Face’ does not name a type src/ft2font.h:122: error: ‘FT_Matrix’ does not name a type src/ft2font.h:123: error: ‘FT_Vector’ does not name a type src/ft2font.h:124: error: ‘FT_Error’ does not name a type src/ft2font.h:125: error: ‘FT_Glyph’ was not declared in this scope src/ft2font.h:125: error: template argument 1 is invalid src/ft2font.h:125: error: template argument 2 is invalid src/ft2font.h:126: error: ‘FT_Vector’ was not declared in this scope src/ft2font.h:126: error: template argument 1 is invalid src/ft2font.h:126: error: template argument 2 is invalid src/ft2font.h:133: error: ‘FT_BBox’ does not name a type src/ft2font.cpp:43: error: ‘FT_Library’ does not name a type src/ft2font.cpp:92: error: variable or field ‘draw_bitmap’ declared void src/ft2font.cpp:92: error: ‘int FT2Image::draw_bitmap’ is not a static member of ‘class FT2Image’ src/ft2font.cpp:92: error: ‘FT_Bitmap’ was not declared in this scope src/ft2font.cpp:92: error: ‘bitmap’ was not declared in this scope src/ft2font.cpp:93: error: ‘FT_Int’ was not declared in this scope src/ft2font.cpp:94: error: ‘FT_Int’ was not declared in this scope src/ft2font.cpp:94: error: initializer expression list treated as compound expression src/ft2font.cpp:94: error: expected ‘,’ or ‘;’ before ‘{’ token error: Setup script exited with error: command 'gcc' failed with exit status 1 Exception exceptions.OSError: (2, 'No such file or directory', 'src/ image.cpp') in <bound method CleanUpFile.__del__ of <setupext.CleanUpFile instance at 0xb806c8>> ignored Exception exceptions.OSError: (2, 'No such file or directory', 'src/ transforms.cpp') in <bound method CleanUpFile.__del__ of <setupext.CleanUpFile instance at 0xb7fb00>> ignored Exception exceptions.OSError: (2, 'No such file or directory', 'src/ backend_agg.cpp') in <bound method CleanUpFile.__del__ of <setupext.CleanUpFile instance at 0xb80560>> ignored 02:46 PM t:/home/simsong# 02:49 PM t:/home/simsong# yum list | grep -i freetype freetype.i386 2.2.1-17.fc6 installed freetype.x86_64 2.2.1-17.fc6 installed freetype-demos.x86_64 2.2.1-17.fc6 updates freetype-devel.i386 2.2.1-17.fc6 updates freetype-devel.x86_64 2.2.1-17.fc6 updates freetype1.x86_64 1.4-0.2.pre.fc6 extras freetype1-devel.x86_64 1.4-0.2.pre.fc6 extras freetype1-utils.x86_64 1.4-0.2.pre.fc6 extras 02:49 PM t:/home/simsong#
I'd guess PNG won't get much smaller because you have a lot of different colored pixels. PNG compresses most when you have a sparser plot. I'd suggest that you try using JPG. It will compress the multi-colored portion of your plot way down. You may see a few artifacts if you look carefully at the axes: instead of pixels white,black,white you might get white,grey,black,grey,white. > -----Original Message----- > From: mat...@li... > [mailto:mat...@li...] On Behalf Of > Einar M. Einarsson > Sent: Monday, March 17, 2008 5:08 AM > To: mat...@li... > Subject: [Matplotlib-users] PNG filesize > > > Hi all, > > I'm trying to find ways to make the file-size of my PNG images smaller. > > When I generate my 660*440px image I get a big 168kb file. > (8bit RGB color model, has an alpha channel (need that) but no > interlacing scheme) > > Here it is: > http://metphys.org/eme/T05.png > > I'm using the savefig method of-course. > > > To see how much I could compress it I used pngcrush (the best tool > according to the interwebs) and got it down to 128kb. > > But thats still way to large for my intended use. (plotting results > from an operational weather model, see. www.belgingur.is > We are currently using IDL.) > > From what I've read about PNG files, which is supposed to be rather > compact image format, it seems to me that the most effective way is > to have an indexed color table. > > So to cut it short: > > Is there any way to save a PNG file with an indexed color table? > > Or do you see any other way to shrink the files? > > > Best regards. > Einar M. Einarsson > www.belgingur.is > > ----------------------------------------------------------------------- > -- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Last Thursday I did a tutorial on matplotlib for PyCon, and prepared a couple of new tutorials for the workshop. I've attached these here in their ReST source as in PDF for those of you interested in learning a little more about the matplotlib API. The source and accompanying code that generates the figures are found in the "doc" subdirectory of the svn trunk, so feel free to make changes, bugfixes and submit patches or new tutorials. The first tutorial is an overview of the matplotlib Artist API and the second is on event handling and object picking. JDH
Chris Withers wrote: > Michael Droettboom wrote: >> The "backend_driver.py" example runs a number of other examples using >> a number of different backends. That's been a reasonably successful >> set of regression and coverage tests. It's not perfect, but it's a >> start. There are also some lower-level unit tests for >> frequently-reoccurring bugs in the unit directory. > > Indeed, is there any kind of "full unit test" suite that a developer > can run when changing things ot make sure they haven't fubarred anything? > backend_driver.py is, AFAIK, the closest thing to that. I recently did a coverage analysis of it (with coverage.py), and it hits something like 98% of the non-error case code, so it's pretty good. What we don't have is an automated regression test framework to see if the results remain correct. There are a number of reasons why this is a non-trivial task -- there was a thread about that on this list a few months ago. Unfortunately, I can't find it... Maybe someone else remembers the subject line? Mike -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA
Kenneth Miller wrote: > > back in time. When i pass plot_dates timestamps for the y axis, and > integers for the x axis it simply displays the y-axis as floats. did you try: plot_dates(x,dates,ydate=True) ? Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
On Mar 21, 2008, at 11:56 AM, Chris Withers wrote: > Kenneth Miller wrote: >> Is it possible to plot dates on the Y-axis? I'd like to have >> dates on the y axis descending or ascending versus my values on the >> x - axis. Is it possible to do this or simply switch the axis? > > Not sure what you mean, have you just tried it with plot or > plot_dates? A common type of graph in my work is to see the value (from 0 to something) represented on the x axis, and instead of the y representing a value, it represents time. The closer the Y value gets to the x-axis, the closer it is to the current time, and the further away the further back in time. When i pass plot_dates timestamps for the y axis, and integers for the x axis it simply displays the y-axis as floats. Regards, Kenneth Miller > > > What problems are you experiencing? > > cheers, > > Chris > > -- > Simplistix - Content Management, Zope & Python Consulting > - http://www.simplistix.co.uk
On Fri, Mar 21, 2008 at 11:27 AM, Kenneth Miller <xke...@gm...> wrote: > All, > > Is it possible to plot dates on the Y-axis? I'd like to have > dates on the y axis descending or ascending versus my values on the x > - axis. Is it possible to do this or simply switch the axis? Not a problem -- with recent versions of mpl, you can simply pass a sequence of date objects directly. Use Axes.invert_yaxis to change the order from ascending to descending. Here is an example loading some data from a CSV file and plotting floats on the x axis and dates on the y axis In [7]: import matplotlib.mlab as mlab In [8]: r = mlab.csv2rec('aapl.csv') In [9]: r.sort() In [10]: r[-5:] Out[10]: recarray([ (datetime.date(2008, 2, 11), 128.00999999999999, 129.97999999999999, 127.2, 129.44999999999999, 42886900, 129.44999999999999), (datetime.date(2008, 2, 12), 130.69999999999999, 131.0, 123.62, 124.86, 43749900, 124.86), (datetime.date(2008, 2, 13), 126.68000000000001, 129.78, 125.63, 129.40000000000001, 34542300, 129.40000000000001), (datetime.date(2008, 2, 14), 129.40000000000001, 130.80000000000001, 127.01000000000001, 127.45999999999999, 34074900, 127.45999999999999), (datetime.date(2008, 2, 15), 126.27, 127.08, 124.06, 124.63, 32163400, 124.63)], dtype=[('date', '|O4'), ('open', '<f8'), ('high', '<f8'), ('low', '<f8'), ('close', '<f8'), ('volume', '<i4'), ('adj_close', '<f8')]) In [11]: fig = figure() In [12]: ax = fig.add_subplot(111) In [13]: ax.plot(r.close, r.date, 'o') Out[13]: [<matplotlib.lines.Line2D instance at 0x237fc10>] In [14]: draw() In [15]: ax.invert_yaxis() In [16]: draw()
Andrew Charles wrote: > Looking back over the easy_install output it looks as if it does > download another tarball and try to build it. I read another thread > where this was happening to someone else. What did you try to install? was it this: matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg which I think should work, so if it doesn't, maybe we can figure out why not. It worked for me with MacPython2.5 on OS-X 10.4 Charlie, am I right that that should work? > I'll look at other libJPEGs - if that doesn't make it fly I might need > to take your other advice and nuke macpython. I'm a little hesitant > about over-writing the system installed numpy though. I agree. MacPython is a good way to go, and we should have a binary for it, so maybe we can solve this. I don't have Leopard, so I'm not sure I can help much though. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no...
Michael Droettboom wrote: > The "backend_driver.py" example runs a number of other examples using a > number of different backends. That's been a reasonably successful set > of regression and coverage tests. It's not perfect, but it's a start. > There are also some lower-level unit tests for frequently-reoccurring > bugs in the unit directory. Indeed, is there any kind of "full unit test" suite that a developer can run when changing things ot make sure they haven't fubarred anything? cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
Pierre GM wrote: > Your data is indexed in time, right ? Your x-axis is a date object ? Then use > scikits.timeseries > http://scipy.org/scipy/scikits/wiki/TimeSeries I'm not sure what this is giving me. The dates are all python datetimes in a list already. The missing values started off as '', I turned those into nan and then created a ma with the nan's masked. What more would TimeSeries give me? > the link above. I must admit we didn't implement poly_between for timeseries. > Most likely, we'd have to implement it for regular masked arrays first, as > mentioned by Eric. OK. > What you could do is to fill your array with some kind of baseline, such as 0, > or your minimum data, or wtvr. That's just a quick trick and no fix. Indeed, that's what I had to do. I have to admit, I see some interesting things while scanning that wiki page, but nothing that would have helped me... cheers, Chris (who might well be missing something...) -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
Eric Firing wrote: > It would be nice if some people who have successfully built on Windows > could collectively assemble a step-by-step account of how to go from a > bare Win box to a working mpl (preferably compiled with mingw); but > maybe this would take more effort than it is worth. I don't think so -- that would be great! > I gather a similar account would be useful for OS X. It would, and it's been done at various times by various people (myself included, a good while back). I don't know if there is a recent one out there. both of these should be in an easy-to-find place on the Wiki. As for OS-X: OS-X is a pain in the &^%^ because Apple doesn't include all the libs MPL needs (I'm not up to date on this, but I think libpng, libjpeg and libfreetype). On Windows, this is also the case, but I understand that the MPL distro includes them. On OS-X, it is just easy enough to get them elsewhere that there isn't the motivation to get them included in MPL. However, the problem comes in that there are way too many ways to get these libs on OS-X: - compile from a tarball - fink - macports - various binary installers. Also, even with these methods, there are issues of how they compiled: Intel, PPC, or Universal. Ideally, we'd all use the same Universal libs, but the fact is that it it easier to get it running on your own machine by using fink or macport or the tarball, and building just for your system, but then you dont' get something fully redistributable. Further complicating all this is that there are way too many versions of Python for OS-X: Framework, fink, macports, activestate, Apple's, "MacPython", etc. Personally, I'd really like there to be a decision about what is supported by MPL, and I think that should be: MacPython2.5 (for OS-X 10.3.9 to 10.5) Universal Builds Extra libs statically linked in. Most recent numpy release. Tk and wx back-ends Cocoa? (is that functional?) It's a bit of pain to get set up to build this, but once you're set up, it's easy to do and distribute it an everyone can use it. Also, I THINK it's possible to build a binary distro (egg?) that will work with both MacPython2.5 and Apple's 25 (which comes with OS-X 10.5). Can anyone confirm this? Either easy_install or *.dmgs (build with bdist_mpkg) that can be downloaded and clicked on would be fine. The wxPython project supports OS-X builds like this, and it works great. fink and macports can do their own thing. Is there currently an appropriate place in the Wiki for "How to install on OS-X" ? After all that writting, I see: matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg on the sourceforge download site -- this looks like it's just what I'm suggesting. If that didn't work for the OP, we should figure out why not. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no...
Kenneth Miller wrote: > Is it possible to plot dates on the Y-axis? I'd like to have > dates on the y axis descending or ascending versus my values on the x > - axis. Is it possible to do this or simply switch the axis? Not sure what you mean, have you just tried it with plot or plot_dates? What problems are you experiencing? cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
All, Is it possible to plot dates on the Y-axis? I'd like to have dates on the y axis descending or ascending versus my values on the x - axis. Is it possible to do this or simply switch the axis? Thanks! Regards, Ken