[Matplotlib-users] interactive graphs
Greetings. I have a colleague who I have worked hard to convert from matlab to matplotlib. One issue that has come up is clickable graphs. He would like to be able to click on the graphs that matplotlib produces and actually have things happen. For example: * Display information about a histogram, like the values that went into the bin. * Have a callback called with information about where the click took place. Is there any way to do this? -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] matplotlib and PyQt
Why do you want to use PyQt and not wxwidgets? On Jan 14, 2009, at 8:19 AM, projet...@club-internet.fr wrote: Hello, I'm searching for informations about using matplotlib interactively with PyQt. I would like for example to move line with the mouse. -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] plotting collections on an X date axes
Hi, Eric. Ah. Just my luck. I always push this stuff in new and unexpected ways. Here's what I'm trying to do --- I want to plot a graph of circles where the size of the circle and color are determined by the data, where the X axis is year/month/day, and the Y axis is just day. (So a lot of 1 values would be a lot of slightly diagonal lines.) Any idea how to do this within the current matplotlib, or should I just hack it by hand? Simson, The scatter function or Axes method is designed for exactly this, but units support was broken in two places. I have fixed it in 6781 on the 98.5 maintenance branch, merged to the trunk in 6782. So, please update to one of these and try scatter(). (Watch out for the odd definition of the s kwarg for size: area in points squared.) Eric Hm. So this means I need to switch from the .tar.gz releases to the subversion releases? Thanks. -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] plotting collections on an X date axes
Hi. It's me again, asking about dates again. is there any easy way to a collection using dates on the X axes? I've taken the collection example from the website and adopted it so that there is a use_dates flag. Set it to False and spirals demo appears. Set it to True and I get this error: Traceback (most recent call last): File mpl_collection2.py, line 51, in module ax.add_collection(col, autolim=True) File /Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/matplotlib/axes.py, line 1312, in add_collection self.update_datalim(collection.get_datalim(self.transData)) File /Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/matplotlib/collections.py, line 144, in get_datalim offsets = transOffset.transform_non_affine(offsets) File /Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/matplotlib/transforms.py, line 1914, in transform_non_affine self._a.transform(points)) File /Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/matplotlib/transforms.py, line 1408, in transform return affine_transform(points, mtx) ValueError: Invalid vertices array. The code is below. Thanks! = import matplotlib import matplotlib.pyplot from matplotlib import collections, transforms from matplotlib.colors import colorConverter import numpy as N import datetime use_dates = False nverts = 50 npts = 100 # Make some spirals r = N.array(range(nverts)) theta = N.array(range(nverts)) * (2*N.pi)/(nverts-1) xx = r * N.sin(theta) yy = r * N.cos(theta) spiral = zip(xx,yy) # Make some offsets rs = N.random.RandomState([12345678]) if not use_dates: xo = [i for i in range(0,100)] else: xo = [datetime.date(1990,1,1)+datetime.timedelta(10)*i for i in range(0,100)] # new version yo = rs.randn(npts) xyo = zip(xo, yo) colors = [colorConverter.to_rgba(c) for c in ('r','g','b','c','y','m','k')] fig = matplotlib.pyplot.figure() ax = fig.add_subplot(1,1,1) if use_dates: import matplotlib.dates as mdates years= mdates.YearLocator() # every year months = mdates.MonthLocator() # every month yearsFmt = mdates.DateFormatter('%Y') ax.xaxis.set_major_locator(years) ax.xaxis.set_major_formatter(yearsFmt) ax.set_xlim(datetime.date(1990,1,1),datetime.date(1992,12,31)) col = collections.LineCollection([spiral], offsets=xyo, transOffset=ax.transData) trans = fig.dpi_scale_trans + transforms.Affine2D().scale(1.0/72.0) col.set_transform(trans) # the points to pixels transform ax.add_collection(col, autolim=True) col.set_color(colors) ax.autoscale_view() ax.set_title('LineCollection using offsets') matplotlib.pyplot.show() -- Check out the new SourceForge.net Marketplace. It is the best place to buy or sell services for just about anything Open Source. http://p.sf.net/sfu/Xq1LFB ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Two bugs when plotting date/time histograms
Wow, Eric. That's a lot of stuff! Thanks for looking into this to me. It would probably be useful to have a warning message or something if there are 0 values for the log axes. What do you think? On Jan 8, 2009, at 11:03 PM, Eric Firing wrote: Simson Garfinkel wrote: Thanks, Eric. Any idea for a work-around on the bar graphs? There appear to be three problems, each with a workaround or solution: 1) You need to set the log scale *before* calling bar. The bar method checks for log scaling, and if found, it sets the bottom of the bars to a positive value (1e-100) instead of to zero. If you set the log scale *after* calling bar, the zero bottom value gets masked out as invalid. 2) The unit support for datetime objects doesn't quite know what to do with the bar width parameter; it tries to convert it, and I haven't tried to track down exactly what it ends up with. What I have found is that if you use a value of width=20 as a kwarg in bar, you will get close enough that you can make more adjustments to taste. This is an ugly hack. 3) The datetime objects want full years, e.g. 1990, not just the last two digits. I haven't tried to figure out why, but the x- limits don't get calculated sensibly if you use 90 instead of 1990. It presumably has to do with the ticker that is invoked for datetime. So I think you need to either make your own modification of the ticker (or formatter), or use all 4 year digits. As far as the Mac goes, I'm happy to get you a log-in on one, if you want. Thanks, but I really don't want to try to delve into the brand-new mac native backend. Eric -Simson On Jan 8, 2009, at 2:31 PM, Eric Firing wrote: Simson Garfinkel wrote: Hi! Below is a sample program. It demonstrates two bugs when plotting date/ time histograms. 1. When the y scale is made log, the histogram points plot as lines, but when the y scale is not log, they histogram plots as bars. I do not think that the look of the bars should change depending on whether or not the Y scale is logarithmic. Simson, I verified the strange behavior with log and/or date, but looking at the code did not yield any understanding of what the problems are. I hope someone who has worked on the bar code recently will sort this one out. Definitely, there is at least one major bug that needs to be fixed. 2. When the agg.pdf is removed, specifying log for the yscale produces a TypeError on the mac (see below) This is mac-specific, and I don't have a mac, so I can't help with this, either. -- Check out the new SourceForge.net Marketplace. It is the best place to buy or sell services for just about anything Open Source. http://p.sf.net/sfu/Xq1LFB ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Two bugs when plotting date/time histograms
Thanks, Eric. Any idea for a work-around on the bar graphs? As far as the Mac goes, I'm happy to get you a log-in on one, if you want. -Simson On Jan 8, 2009, at 2:31 PM, Eric Firing wrote: Simson Garfinkel wrote: Hi! Below is a sample program. It demonstrates two bugs when plotting date/ time histograms. 1. When the y scale is made log, the histogram points plot as lines, but when the y scale is not log, they histogram plots as bars. I do not think that the look of the bars should change depending on whether or not the Y scale is logarithmic. Simson, I verified the strange behavior with log and/or date, but looking at the code did not yield any understanding of what the problems are. I hope someone who has worked on the bar code recently will sort this one out. Definitely, there is at least one major bug that needs to be fixed. 2. When the agg.pdf is removed, specifying log for the yscale produces a TypeError on the mac (see below) This is mac-specific, and I don't have a mac, so I can't help with this, either. -- Check out the new SourceForge.net Marketplace. It is the best place to buy or sell services for just about anything Open Source. http://p.sf.net/sfu/Xq1LFB ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Two bugs when plotting date/time histograms
Hi! Below is a sample program. It demonstrates two bugs when plotting date/ time histograms. 1. When the y scale is made log, the histogram points plot as lines, but when the y scale is not log, they histogram plots as bars. I do not think that the look of the bars should change depending on whether or not the Y scale is logarithmic. 2. When the agg.pdf is removed, specifying log for the yscale produces a TypeError on the mac (see below) I would really like to know how to plot a histogram with real bars ,rather than little lines. Thanks! import matplotlib matplotlib.use('agg.pdf') if __name__==__main__: import datetime import numpy as np import matplotlib import matplotlib.pyplot as pyplot import matplotlib.dates as mdates import matplotlib.mlab as mlab dates_and_counts = [[datetime.datetime(90,i,1), i*10] for i in range(1,13)] dates, counts = zip(*dates_and_counts) years= mdates.YearLocator() # every year months = mdates.MonthLocator() # every month yearsFmt = mdates.DateFormatter('%Y') fig = pyplot.figure() ax = fig.add_subplot(111) ax.bar(dates,counts) ax.set_ylabel('file count') ax.set_xlabel('file modification time (mtime)') ax.set_yscale('log') ax.xaxis.set_major_locator(years) ax.xaxis.set_major_formatter(yearsFmt) datemin = datetime.date(min(dates).year, 1, 1) datemax = datetime.date(max(dates).year, 1, 1) ax.set_xlim(datemin, datemax) ax.set_ylim(0,max(counts)) # format the coords message box def price(x): return '$%1.2f'%x ax.format_xdata = mdates.DateFormatter('%Y-%m-%d') ax.format_ydata = price ax.grid(True) # rotates and right aligns the x labels, and moves the bottom of the # axes up to make room for them fig.autofmt_xdate() pyplot.savefig(hist.pdf,format='pdf') 12:12 PM m:~$ python f.py Traceback (most recent call last): File /Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/matplotlib/figure.py, line 772, in draw for a in self.axes: a.draw(renderer) File /Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/matplotlib/axes.py, line 1601, in draw a.draw(renderer) File /Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/matplotlib/axis.py, line 710, in draw tick.draw(renderer) File /Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/matplotlib/axis.py, line 193, in draw self.label1.draw(renderer) File /Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/matplotlib/text.py, line 502, in draw ismath=ismath) File /Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/matplotlib/backends/backend_macosx.py, line 120, in draw_text self._draw_mathtext(gc, x, y, s, prop, angle) File /Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/matplotlib/backends/backend_macosx.py, line 112, in _draw_mathtext gc.draw_mathtext(x, y, angle, 255 - image.as_array()) TypeError: image has incorrect type (should be uint8) 12:12 PM m:~$ % V/r, Simson Garfinkel -- Check out the new SourceForge.net Marketplace. It is the best place to buy or sell services for just about anything Open Source. http://p.sf.net/sfu/Xq1LFB ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Two bugs when plotting date/time histograms
Eric, Thanks for addressing the side-issue. If there were a simple way to list all of the backends, that might help? Any idea about the main point? On Jan 7, 2009, at 12:52 PM, Eric Firing wrote: Simson Garfinkel wrote: import matplotlib matplotlib.use('agg.pdf') Simson, Sorry to be addressing a side point, not your real questions, but your example shows up a bug in matplotlib.use, which I will fix shortly. There is an agg backend, and there is a pdf backend, but there is no agg.pdf. You are simply getting the agg backend, and when you save the figure you are using the pdf backend, which is fine. Only the cairo backend has sub-backends or versions, like cairo.pdf or cairo.png or cairo.ps or cairo.svg. Eric -- Check out the new SourceForge.net Marketplace. It is the best place to buy or sell services for just about anything Open Source. http://p.sf.net/sfu/Xq1LFB ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] TypeError: image has incorrect type (should be uint8)
Hi. I found a bug in the macos backend. I get this error when I turn on log plotting on the Y axes; it doesn't happen when I turn off log plotting. It also doesn't happen when I use agg.pdf driver. Is this a well-known problem, or should I put together a little demo that demonstrates it? Traceback (most recent call last): File /Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/matplotlib/figure.py, line 772, in draw for a in self.axes: a.draw(renderer) File /Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/matplotlib/axes.py, line 1601, in draw a.draw(renderer) File /Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/matplotlib/axis.py, line 710, in draw tick.draw(renderer) File /Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/matplotlib/axis.py, line 193, in draw self.label1.draw(renderer) File /Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/matplotlib/text.py, line 502, in draw ismath=ismath) File /Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/matplotlib/backends/backend_macosx.py, line 120, in draw_text self._draw_mathtext(gc, x, y, s, prop, angle) File /Librrks/Python.framework/Versions/2.6/lib/python2.6/site- packages/matplotlib/backends/backend_macosx.py, line 112, in _draw_mathtext gc.draw_mathtext(x, y, angle, 255 - image.as_array()) TypeError: image has incorrect type (should be uint8) -- ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] PNG filesize
Jpeg. On Mar 25, 2008, at 8:12 AM, 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? 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/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Install problem on Leopard
Hi. I've seen this problem before. I think that you need to install freetype developer. The easiest way to install this is with macports and then type port install freetype On Mar 21, 2008, at 9:50 PM, Andrew Charles wrote: Yes it was the matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg I tried to install. I've posted the entire easy_install output below. I'll let the list know if i resolve the problem. Andrew --- Processing matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg creating /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg Extracting matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg to /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site- packages Adding matplotlib 0.91.2 to easy-install.pth file Installed /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg Processing dependencies for matplotlib==0.91.2 Searching for matplotlib==0.91.2 Reading http://pypi.python.org/simple/matplotlib/ Reading http://matplotlib.sourceforge.net Reading http://sourceforge.net/project/showfiles.php?group_id=80706package_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=1199627250big_mirror=0 Processing matplotlib-0.91.2.tar.gz Running matplotlib-0.91.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-QGmbAu/matplotlib-0.91.2/egg-dist-tmp-hsIe8R = = = = = = == BUILDING MATPLOTLIB matplotlib: 0.91.2 python: 2.5.2 (r252:60911, Feb 22 2008, 07:57:53) [GCC 4.0.1 (Apple Computer, Inc. build 5363)] platform: darwin REQUIRED DEPENDENCIES numpy: 1.0.5.dev4897 freetype2: 9.16.3 OPTIONAL BACKEND DEPENDENCIES libpng: 1.2.24 Tkinter: Tkinter: 50704, 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 Qt: no Qt4: no Cairo: no OPTIONAL DATE/TIMEZONE DEPENDENCIES datetime: present, version unknown dateutil: matplotlib will provide pytz: matplotlib will provide OPTIONAL USETEX DEPENDENCIES dvipng: no ghostscript: 8.57 latex: no 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 /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/ Python.h:8, from ./CXX/WrapPython.h:47, from ./CXX/Extensions.hxx:48, from src/ft2font.h:18, from src/ft2font.cpp:2: /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/ pyconfig.h:814:1: warning: SIZEOF_LONG redefined In file included from /usr/X11/include/freetype2/freetype/freetype.h: 41, from src/ft2font.h:12, from src/ft2font.cpp:2: /usr/X11/include/freetype2/freetype/config/ftconfig.h:65:1: warning: this is the location of the previous definition In file included from /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/ Python.h:8, from ./CXX/WrapPython.h:47, from ./CXX/Extensions.hxx:48, from src/ft2font.h:18, from src/ft2font.cpp:2: /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/ pyconfig.h:814:1: warning: SIZEOF_LONG redefined In file included from /usr/X11/include/freetype2/freetype/freetype.h: 41, from src/ft2font.h:12, from src/ft2font.cpp:2: /usr/X11/include/freetype2/freetype/config/ftconfig.h:65:1: warning: this is the location of the previous definition In file included from /usr/include/math.h:26, from /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/ pyport.h:231, from /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/ Python.h:57,
Re: [Matplotlib-users] BUG: Log axes are upside down with PDF output...
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=80706package_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=1199627250big_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:
[Matplotlib-users] update: BUG - axes problem update
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) - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] question #2 - labeled bar graphs
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! - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Plotting in C++
Dear Francesco, I'm sorry --- it is hard not to read your message and laugh. You really think that the static type checking of C++ is protecting you? Well, it may be, but C++ is unsafe in so many other ways that you are not doing yourself a favor by working in it. If you want to use a typesafe language, you really should be using Java or Python. Java will give you both static and dynamic type checking. Python will give you runtime type checking. C++ gives you a good feeling until something goes wrong and it crashes. On Feb 29, 2008, at 5:29 PM, Francesco Biscani wrote: Hi all, Christopher Barker wrote: The only difference that my users see between an app written in Python and C++ is that the Python one has more features...and fewer bugs. 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. It's true that probably I'd get the software up and running in less time with Python, but I think that I would spend much more time making sure it behaves as expected and fortifying it, so to speak. Am I totally offset here? Francesco. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] problems building/installing
I'm embarrassed to ask that I'm having trouble building/installing matplotlib on an intel Mac. The version at http://matplotlib.sourceforge.net/ wants to give me an .egg file for my Mac, and I have yet to figure out how to load and install .egg files. (How come python is such a mess?) So I tried to install with darwinports. Darwinports proceeded to upgrade my python from 2.4 to 2.5 (thanks!) and then gave me an error installing numeric because the fortran compiler wouldn't build or something. So I manually installed numeric (I don't need fortran support) and manually downloaded matplotlib to install with setup.py. But I'm getting this error: building 'matplotlib.backends._tkagg' extension g++ -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g -bundle -undefined dynamic_lookup build/temp.macosx-10.3-fat-2.5/src/ _tkagg.o build/temp.macosx-10.3-fat-2.5/CXX/cxx_extensions.o build/ temp.macosx-10.3-fat-2.5/CXX/cxxsupport.o build/temp.macosx-10.3- fat-2.5/CXX/IndirectPythonInterface.o build/temp.macosx-10.3-fat-2.5/ CXX/cxxextensions.o -L/usr/local/lib -L/usr/lib -L/usr/local/lib -L/ usr/lib -lpng -lz -lstdc++ -lm -lfreetype -lz -lstdc++ -lm -o build/ lib.macosx-10.3-fat-2.5/matplotlib/backends/_tkagg.so -framework Tcl - framework Tk /usr/bin/ld: for/usr/bin/ld: for architecture ppc /usr/bin/ld: can't locate file for: -lpng collect2: ld returned 1 exit status architecture i386 /usr/bin/ld: can't locate file for: -lpng collect2: ld returned 1 exit status lipo: can't open input file: /var/tmp//ccl92wxW.out (No such file or directory) error: command 'g++' failed with exit status 1 Computer:/Users/simsong/Desktop/matplotlib-0.90.0 root# This basically says that it can't build the universal version on my mac because I only have intel binaries for libpng, and not universal binaries. I don't need universal binaries; I'm only running on intel. I'd rather not go down this path, it turns out. It would be a lot easier for me just to download binaries. What I would like to know is: 1. What is the preferred way for installing matplotlib on Mac at this point? 2. How do I install an EGG file? Thanks! - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] problems building/installing
Alas, tried the easy_install matplotlib. It downloaded and installed matplotlib, but didn't install wx, so I got this error: from pylab import *; Traceback (most recent call last): File stdin, line 1, in module File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/matplotlib-0.90.0-py2.5-macosx-10.4-fat.egg/ pylab.py, line 1, in module from matplotlib.pylab import * File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/matplotlib-0.90.0-py2.5-macosx-10.4-fat.egg/ matplotlib/pylab.py, line 222, in module new_figure_manager, draw_if_interactive, show = pylab_setup() File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/matplotlib-0.90.0-py2.5-macosx-10.4-fat.egg/ matplotlib/backends/__init__.py, line 24, in pylab_setup globals(),locals(),[backend_name]) File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/matplotlib-0.90.0-py2.5-macosx-10.4-fat.egg/ matplotlib/backends/backend_wxagg.py, line 19, in module import wx ImportError: No module named wx When I tried to use easy_install to install wxPython, I got this: Computer:/Users/simsong root# easy_install wxPython Searching for wxPython Reading http://cheeseshop.python.org/pypi/wxPython/ Reading http://wxPython.org/ Reading http://wxPython.org/download.php Reading http://cheeseshop.python.org/pypi/wxPython/2.6.3.2 Best match: wxPython src-2.8.3.0 Downloading http://prdownloads.sourceforge.net/wxpython/wxPython- src-2.8.3.0.tar.bz2 Processing wxPython-src-2.8.3.0.tar.bz2 error: Couldn't find a setup script in /tmp/easy_install-UB-WlK/ wxPython-src-2.8.3.0.tar.bz2 Computer:/Users/simsong root# Why do we make this so hard? The wyPython page for Mac says: Mac OS X wxPython needs a special Mac OS X-specific build of Python, called a Framework build, in order to work. Panther and Tiger include a Framework build of Python 2.3, but on Jaguar you'll need to get the MacPython installer from Jack's MacPython page. (I really can't keep track of all these cat names. ) Then I need to choose one of 8 different versions to install, dependin gon whether I am using py2.3, 2.4 or 2.5, and whether I want unicode or ansi, and whether I want PPC or Universal. But I finally got it installed. Thanks. On Apr 4, 2007, at 7:38 AM, Edin Salkovic wrote: On 4/4/07, Simson Garfinkel [EMAIL PROTECTED] wrote: 2. How do I install an EGG file? For detailed instructions about eggs see: http://peak.telecommunity.com/DevCenter/EasyInstall Quick instructions: Download: http://peak.telecommunity.com/dist/ez_setup.py and run it. then run easy_install matplotlib or easy_install /path/to/matplotlib-xxx.egg HTH, Edin - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] cumulative distribution function
On Mar 18, 2007, at 12:41 PM, John Hunter wrote: On 3/17/07, Simson Garfinkel [EMAIL PROTECTED] wrote: Hi. I haven't been active for a while, but now I have another paper that I need to get out... Glad to have you back... Thanks. I've taken a new job, moved to california, and have been flying between the two coasts every week. It doesn't leave much time for mailing lists... Anyway, I need to draw a cumulative distribution function, as the reviewers of my last paper really nailed me to the wall for including histograms instead of CDFs. Is there any way to plot a CDF with matplotlib? For analytic cdfs, see scipy.stats. I assume you need an empirical cdf. You can use matplotlib.mlab.hist to compute the empirical pdf (use normed=True to return a PDF rather than a frequency count). Then use numpy.cumsum to do the cumulative sum of the pdf, multiplying by the binsize so it approximates the integral. import matplotlib.mlab from pylab import figure, show, nx x = nx.mlab.randn(1) p,bins = matplotlib.mlab.hist(x, 50, normed=True) db = bins[1]-bins[0] cdf = nx.cumsum(p*db) fig = figure() ax = fig.add_subplot(111) ax.bar(bins, cdf, width=0.8*db) show() Thanks! I'll try it out and see what happens. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] cumulative distribution function
Hi. I haven't been active for a while, but now I have another paper that I need to get out... Anyway, I need to draw a cumulative distribution function, as the reviewers of my last paper really nailed me to the wall for including histograms instead of CDFs. Is there any way to plot a CDF with matplotlib? - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] matplotlib-0.87.7 Build Failure
Perhaps you have a second installation that you are not aware of. On Jan 11, 2007, at 12:18 PM, Rich Shepard wrote: On Thu, 11 Jan 2007, John Hunter wrote: sudo rm -rf your build dir and site-packages/matplotlib and rebuild/reinstall. John, Rats! That did not change the result. Is matplotlib-0.87.7 dependent on specific versions of gcc or glibc? Rich -- Richard B. Shepard, Ph.D. |The Environmental Permitting Applied Ecosystem Services, Inc.| Accelerator(TM) http://www.appl-ecosys.com Voice: 503-667-4517 Fax: 503-667-8863 -- --- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php? page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] pylatex
On Dec 16, 2006, at 1:58 PM, Pierre GM wrote: I've also written a neat pre-processor that allows you to embed python and matplotlib code in LaTeX, so you don't need to have it all spread out. And you can populate the results from SQL queries, right there in the LaTeX. It makes paper writing much easier. Oh, that sounds great ! Could you post it somewhere ? I'm sure it'd be quite useful (I do have a need for it myself...) I've made an initial release at http://www.simson.net/pylatex.tar.gz It's very preliminary, and you'll need to figure out the latex stuff yourself. I had wanted to put in some more examples, but haven't figure out a good way to do it easily - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] boxplot
Now, how do I get two boxplots on the same plot? Well, just draw two axes. Simson, now that you're more experienced with matplotlib, you should really start speaking python to it. I'd love to speak python to it. But it's harder when all of the examples are in matlab... fig = figure() ax1 = fig.add_subplot(121) ax2=fig.add_subplot(122) Hm. I'll need to figure out why these two subplots appear on the same axis. BTW, this whole subplot(ijk) instead of subplot(i,j,k) notation is really, really confusing to me... ax1.boxplot([set1, set2],positions=[732659,732660]) ax2.boxplot([set2, set1],positions=[732659,732660]) ax1.set_xticklabels([num2date(x).strftime(timefmt) for x in ax1.get_xticks()]) ax2.set_xticklabels([num2date(x).strftime(timefmt) for x in ax2.get_xticks()]) - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] wiki
On Dec 16, 2006, at 11:58 AM, Pierre GM wrote: I'm very confused by the wiki in general. I click on wiki and it takes me to something that doesn't obviously have anything to do with matplotlib... Well, it does say: matplotlib cookbook. Like, what's scipy.org? Is it a company? Who is EnThought? Oh. What are you using to manipulate arrays ? numarray, Numeric, or numpy ? Assuming that you use numpy, then you must know what scipy is, right ? If not, well, br scipy.org is just a central site for numpy/scipy-related information. Enthought is a private company that works extensively with Python and numpy in particular, and that hosts the site. Hi, Pierre. There's a lot of assumptions here. I do most of my own manipulations in SQL and with custom-written programs in C, C++, and Python. I sort of know what numarray, Numeric and numpy are, but I don't care all that much. I'm just interested in matplotlib for the plotting. The point of my email (and the questions below) is that the entire scipy.org website is written for people who already know what's going on. If you want to expand the user community (and simultaneously cut down on questions) you need to make things dramatically more understandable than they currently are. A related problem is the MoinMoin wiki. It is not a widely used wiki and it has many usability problems. It is dramatically harder to use than, say, mediawiki. Amy I allowed to contribute to the wiki? It doesn't look like it. The whole thing is not very friendly. It's a wiki, so yes, you can contribute. No, it's not especially friendly, in the sense that nobody's here to hold your hand. And what is this whole MoinMoin thing? MoinMoin is a Python WikiClone, based on PikiPiki. This converstaion is really becoming surrealistic. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] boxplot
I agree. It may be common in matlab, but it really doesn't belong in python. On Dec 16, 2006, at 12:50 PM, Eric Firing wrote: BTW, this whole subplot(ijk) instead of subplot(i,j,k) notation is really, really confusing to me... Don't get overwhelmed. ijk is a shortcut for (i, j, k), that works well if you're working with less than 10 plots in either direction. It is a holdover from the early days of Matlab. It makes mpl more Matlab-like (for better or worse) and saves 2-4 keystrokes. Personally, I don't like it and would be inclined to discourage it in mpl. Eric - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Fwd: boxplot
I apologize if I offended anyone, this was really not my intention at all. Oh, I was never offended. My point was that after only a few hours, it is indeed possible to get impressive results and become a real MPL pro. I think that it's possible to get impressive results in a few hours, but not become a pro. I've been using matplotlib for something like 20-40 hours right now. I've done some neat things, but have had some problems. I've also written a neat pre-processor that allows you to embed python and matplotlib code in LaTeX, so you don't need to have it all spread out. And you can populate the results from SQL queries, right there in the LaTeX. It makes paper writing much easier. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] dateformatter doesn't
On Dec 16, 2006, at 10:25 PM, John Hunter wrote: Simson == Simson Garfinkel [EMAIL PROTECTED] writes: Simson Greetings. I've been having lots of luck with my date Simson plots. But I've been having a problem getting the Simson dateformatter to work. I'm using the code below. The dates Simson keep getting formatted with the default, Sep 28 2006 Simson instead of what I want, Sep 28 This is an order of opertations problem. The call to plot_date sets the DateFormatter, overriding your choices. You need to set your custom formatter after the call to plot_date: That's odd. I would think that it makes more sense to set the format *before* the data is plot, not after. ax.plot_date(dates, vals, 'bo') ax.xaxis.set_major_formatter(DateFormatter('%b %d')) ax.yaxis.set_major_formatter(FormatStrFormatter('%3.0f KBps')) This is an annoyance that we can fix by setting the date formatter only if the current formatter is *not* a date formatter instance. Probably a good thing for people like me who have never used Matlab. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] histograms
I'm plotting some histograms with hist() --- well, actually with ax.hist(), where ax is an axis --- and the normed=1 isn't working the way I would expect. from pylab import * data = sin(arange(0.0,100,.01)) fig = figure() ax = fig.add_subplot(111) ax.hist(data,bins=50,normed=1,align='center') show() If I do not include normed=1, then the Y scale is an actual count inside each bin. (The scale goes from 1-1000). If I include normed=1, the Y scale goes from 1 - 7. What does that mean? normed is supposed to make the first result from ax.hist be a normalized probability distribution. But I would think that it would change the Y axis to be a probability as well, and it doesn't do that. The docstrings do not give any insight, so I looked at the source code. It certainly *looks* like it's plotting the probability distribution. But why does the above example give a Y scale going from 1 to 7? Perhaps I'm showing my lack of statistics here, but I would think that a strict probability distribution would have the value of all of the bars adding to 1, Sorry to send out so many messages today. I really am trying to figure this out on my own... - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Usability with matplotlib
Simson 3. If I was going to make a major change to the API at Simson this point, it would be to make it so that you don't have Simson a class/function/ identifier called axes and another one Simson called axis. I frequently get confused between these two Simson words; I imagine that non-native English speakers get Simson confused even more frequently. Irregular noun plurals in Simson English are confusing, and it probably isn't necessary to Simson use both. One approach would be to never allow axis, to Simson only allow xaxis and yaxis and perhaps something Simson (either_axis?) for the abstract super-class, but this may Simson be a bigger change than you wish to consider at the Simson present time. Yes, this is a confusing and poor nomenclature. We're probably stuck with it at this point, since it fairly deeply ingrained. It's never to late to change something. For any successful project, there will always be more users in the future than in the past. The key thing is to make the change without breaking backwards compatibility. But that's not hard: you can accept the old value while nevertheless standardizing on the new one. Simson Ah, the matplotlibrc file. It seems that you are trying Simson to do too much with this file. Is the point of the file Simson to have default graphing behavior, or to have site-wide Simson configuration information? You may wish to split the file Simson into two parts --- a config part and a graphing Simson preferences part --- because it seems that sometimes Simson people wish to change one without changing the other. Or Simson you may want to have explicit inheritance --- like an Simson -include feature so that a local file can just shadow Simson some variables and then include the master file. I Simson understand that this can be done with a few lines of Simson python at the top of a program. Of course, given that Simson option, you may wish to do away with the local files Simson entirely. I'm not sure. The rc file is meant to support local customization, and directory specific files are meant to support project specific customizations. The idea here is: you may want a general configuration for most plots, interactive plotting, etc, but you may want something entirely different for a directory which contains a figure for a journal article: PS backend, latex text, larger fontsizes, thicker lines... The problem with the RC file this way, though, is that I can give you a pice of python code and it will plot differently on your computer than on mine because of a change in your rc file. If you think that's okay, then it's okay. You're the designer, not me! But it is clearly a concern that I would have. The current implementation certainly has some limitations: we'd prefer the file to be python rather than our own yet-another-rc-file-markup and yes, we'd like to support includes and overrides with a basic inheritance and namespace support, which we would get for free by simply making the rc file python. This is an idea waiting to be implemented. We'd probably borrow some work from recent changes to ipython which were implemented to solve some of the same problems. Simson Have the matplotlib developers put together a roadmap of Simson their directions that they want to take this project? http://matplotlib.sf.net/goals.html Thanks! though it is not updated as often as it should be and is not entirely current. JDH - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Horizontal grid lines?
Looks like I need to read *all* of the docstrings. I wish there was an easy way to search them On Dec 15, 2006, at 2:49 AM, Eric Firing wrote: Simson Garfinkel wrote: HI. I wand to have just horizontal grid lines. Is there any way to do this? Thanks! gca().yaxis.grid(True) gca().xaxis.grid(False) Here is the grid method docstring: def grid(self, b=None, which='major', **kwargs): Set the axis grid on or off; b is a boolean use which = 'major' | 'minor' to set the grid for major or minor ticks if b is None and len(kwargs)==0, toggle the grid state. If kwargs are supplied, it is assumed you want the grid on and b will be set to True kwargs are used to set the line properties of the grids, eg, xax.grid(color='r', linestyle='-', linewidth=2) Eric - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] boxplot
I've discovered that matplotlib does boxplots, and apparently this is what I should be using for one of the big graphs in my paper. Two problems: 1. I need to put 45 boxplots on a single date plot. Each of the boxes has a different amount of data that goes in it. Since the boxplot() function wants to calculate its own means, rather than have me provide them, I need to either create a single 45xN Numeric array (and I can't), or else I need to call it 45 times. But each time I call it, the last box obscures the previous one. That is, this code only shows one box: === #!/usr/bin/python from pylab import * # fake up some data set1 = (rand(50)+1) * 100 set2 = (rand(50)+2) * 100 boxplot(set1,positions=[1]) boxplot(set2,positions=[2]) show() = The boxplot function returns a list of lines that it adds, but when I capture the lines from set1 and add them manually to the axes object, it fails. What should I do? 2. I need to have the X axis of the boxplot be dates. There doesn't seem to be an easy way to do that. Suggestions? Thanks! - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] boxplot
Hm. thanks for the info. But it's not perfect... I get times in my formats, but not the dates. Here is the sample code: #!/usr/bin/python # # Example boxplot code # from pylab import * from matplotlib.dates import MonthLocator, WeekdayLocator, DateFormatter from matplotlib.dates import MONDAY,SATURDAY # fake up some data set1 = (rand(50)+1) * 100 set2 = (rand(50)+2) * 100 boxplot(set1,positions=[732659]) boxplot(set2,positions=[732660]) ax = gca() ax.xaxis.set_major_locator(MonthLocator()) ax.xaxis.set_major_formatter(DateFormatter('%D')) ax.xaxis.set_minor_locator(WeekdayLocator(MONDAY)) ax.yaxis.set_major_formatter(FormatStrFormatter('%3.0f KB/s')) ax.xaxis_date(None) setp(ax.get_xticklabels(),'rotation',90,fontsize=8) show() == And yes, thanks for telling me about the timezone problem. I have been doing all of my work in GMT, only to be confounded. We really need a manual that explains all of the axis stuff. Now, how do I get two boxplots on the same plot? (This would be SO MUCH EASIER if boxplot would take a list of objects that listed where the various thingies when...) On Dec 15, 2006, at 8:56 PM, Pierre GM wrote: 2. I need to have the X axis of the boxplot be dates. There doesn't seem to be an easy way to do that. Use the position keyword, as a list of date ordinals (output of date2num). Then, use gca().xaxis_date(tz) where tz is your current timezone (you can use None, that's easier). Et voila. You probably gonna have to play with tick rotation and date formatting, but that's another story Using the boxplot_demo #... # multiple box plots on one figure figure() positions = [732659, 732660] boxplot(data, positions=positions) gca().xaxis_date(None) - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] error bars, plot_date, and connected line
I've been able to figure out how to easily do error bars on a plot_date. Here is how I do it: The variables coming in are dates which is an array of my dates (in days since 0001-01-01), averages, p10 (which is the bottom of my error bars), and p90 (which is the top of my error bars) plot_date(dates, averages, 'bo') # Draw the tops of the error bars ax.vlines(dates,averages,p90) ax.hlines(p90,dates-.25,dates+.25) # Draw the bottom part of the error bars ax.vlines(dates,averages,p10) ax.hlines(p10,dates-.25,dates+.25) It's pretty sweet. I'm having other problems which I will post separately, but this is working well. On Dec 3, 2006, at 12:02 PM, Pierre GM wrote: On Saturday 02 December 2006 17:39, Simson Garfinkel wrote: Hi. I'm interested in creating a date plot showing bandwidth along a link. I want to have a dot in the center of each date with the average bandwidth and use the error bars to show the 25th and 75th percentiles. I've been trying to figure out how to do this and am having problems. My 2c: Don't bother yet about dates: first get the plot as you want it, assuming that your x data are floats (use date2num if needed). Then you can tackle the problem of displaying dates. If you poke around the sources (axes.py). you'll find that 'plot_date' is only 'plot', where a couple of extra parameters are set: if xdate: self.xaxis_date(tz) 'xdate' is a flag indicating whether the data on the x axis are dates (True) or not (False), 'tz' is the timezone flag (default to None), and 'self' is your current axes object (you can get its handle by gca() if you haven't specified it otherwise). Combining these pieces of information should to the trick (or most of it). Let us know how it goes anyway. P. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] dateformatter doesn't
Greetings. I've been having lots of luck with my date plots. But I've been having a problem getting the dateformatter to work. I'm using the code below. The dates keep getting formatted with the default, Sep 28 2006 instead of what I want, Sep 28 Any thoughts? from datetime import date,timedelta from matplotlib.dates import MonthLocator, WeekdayLocator, DateFormatter,MONDAY,SATURDAY from pylab import * def dateplot(): dates = drange(date(2006,10,1),date(2006,12,1),timedelta(days=1)) vals = 500*(randn(len(dates))+2) figure(num=1, figsize=(6.5,4)) axes([.15,.3,.8,.5]) ax = gca() # get the current graphics region title(rAverage daily bandwidth) ax.xaxis.set_major_formatter(DateFormatter('%b %d')) ax.yaxis.set_major_formatter(FormatStrFormatter('%3.0f KBps')) plot_date(dates, vals, 'bo') # Rotate the labels labels = ax.get_xticklabels() setp(labels,'rotation',90,fontsize=8) grid(True) savefig(x.pdf,format='pdf') if(__name__=='__main__'): dateplot() - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Horizontal grid lines?
HI. I wand to have just horizontal grid lines. Is there any way to do this? Thanks! - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] broken images on tutorial
When I look at http://matplotlib.sourceforge.net/tutorial.html with Safari, I see a lot of broken images. Any ideas? smime.p7s Description: S/MIME cryptographic signature - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] error bars, plot_date, and connected line
Hi. I'm interested in creating a date plot showing bandwidth along a link. I want to have a dot in the center of each date with the average bandwidth and use the error bars to show the 25th and 75th percentiles. I've been trying to figure out how to do this and am having problems. From my reading, errorbar() is a plot type, just like plot() and plot_date(). So there doesn't seem to be any obvious way to combine them. Am I missing something ? Do I need to manually build this? smime.p7s Description: S/MIME cryptographic signature - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] pytz not installed on Mac
I'm using matplotlib on a Mac. I tried to do a date plot but got an error message that pytz is not installed. According to the using matplotlib tutorial pytz it is supposed to be installed automatically... Traceback (most recent call last): File make_stats.py, line 184, in ? do_plot(hosts['ec2']) File make_stats.py, line 80, in do_plot from matplotlib.dates import MonthLocator, WeekdayLocator, DateFormatter File /Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/matplotlib/dates.py, line 89, in ? from pytz import timezone ImportError: No module named pytz [EMAIL PROTECTED] s3bandwidth] % Any cue? smime.p7s Description: S/MIME cryptographic signature - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] New to matplotlib; documentation errors
I'm new to matplotlib; I was using PyX but matplotlib seems further developed for what I want to do. One of the problems that I'm having is simply getting started. I've discovered that there are a whole bunch of dependencies that weren't obvious in the manual: * You need PyNum (documented) * You need wxPython (not documented that I've found) Nevertheless, I'm still having problems. The example in the beginning of the manual doesn't work for me; array() is undefined: % python Python 2.4.3 (#1, Mar 30 2006, 11:02:16) [GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin Type help, copyright, credits or license for more information. from pylab import * dt = 0.01 t = arrange(0,10,dt) Traceback (most recent call last): File stdin, line 1, in ? NameError: name 'arrange' is not defined I'm using a MacOS machine running 10.4. Any suggestions? - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users