Re: [Matplotlib-users] display data in histogram
Hi ankita, On Wednesday 04 November 2009 06:04:55 ankita dutta wrote: hi all, I am working on some graph stuffs and stuck at a point. I am trying to plot a histogram using simple : *import matplotlib.pyplot as plt . . plt.hist(x,bins=10,histtype='bar') plt.show() * but i want to know 1) what is the value of a particular bar in histogram and also want to print in on output image along with the bars ( either at top of bar or at bottom)* n, bins, patches = plt.hist(...) gives you the bin-egdes 'bins' the corresponding frequency / number of values per bin 'n' and the mpl-objects of the shown bars # e.g. for top of the bar: n, bins, patches = plt.hist(x0, bins=10, histtype='bar') for index in xrange(len(bins)-1): plt.text(bins[index], n[index], %i % (n[index])) *2) How to give input of 2 types of dataset in single hist() command , so that i can compare 2 different dataset side by side on my output image. ( i dont want it on top of each other as given by the command *histtype*: [ ‘barstacked’]and also i read some example in matplotlib site, but they are for random numbers : something like this: x0 = mu + sigma*P.randn(1) x1 = mu + sigma*P.randn(7000) x2 = mu + sigma*P.randn(3000) P.figure() n, bins, patches = P.hist( [x0,x1,x2], 10, histtype='bar') but i need this comparision for some dataset. I can't see any problems with placing dataset instead of x0 and x1 into this call. Please notice: in that case n is a tuple and each tuple-element corresponds to the number of values per bin of one dataset. Kind regards Matthias -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] basemap: Mask the ocean [SEC=UNCLASSIFIED]
Maybe using path clipping you can plot only over land like this : -- import numpy as np from mpl_toolkits.basemap import Basemap import pylab as plt import matplotlib.patches as patches import matplotlib.transforms as transforms ll_lat = -38.10 # extent of area of interest ll_lon = 145.06 ur_lat = -38.00 ur_lon = 145.16 # create data points all on land fudge = ((ll_lon+0.05, ur_lat-0.00, 1000), (ll_lon+0.05, ur_lat-0.01, 2000), (ll_lon+0.05, ur_lat-0.02, 3000), (ll_lon+0.05, ur_lat-0.03, 4000), (ll_lon+0.04, ur_lat-0.025, 1000), (ll_lon+0.043, ur_lat-0.036, 1), (ll_lon+0.047, ur_lat-0.041, 2), (ll_lon+0.07, ur_lat-0.07, 4000), (ll_lon+0.08, ur_lat-0.08, 3000), (ll_lon+0.09, ur_lat-0.09, 2000), (ll_lon+0.10, ur_lat-0.10, 1000)) data = np.ones((3, len(fudge))) for (i, (lon, lat, val)) in enumerate(fudge): data[0,i] = lon data[1,i] = lat data[2,i] = val # plot the data fig = plt.figure() m = Basemap(projection='cyl', llcrnrlat=ll_lat, urcrnrlat=ur_lat, llcrnrlon=ll_lon, urcrnrlon=ur_lon, resolution='f') # +CHANGES coll = plt.hexbin(data[0,:], data[1,:], data[2,:], gridsize=5) ax = plt.gca() for n, poly in enumerate(m.coastpolygons): type = m.coastpolygontypes[n] if type in [1,3]: p = patches.Polygon(np.asarray(poly).T) p.set_color('none') ax.add_patch(p) m.set_axes_limits(ax=ax) coll.set_clip_path(p) # -CHANGES plt.show() -- On Wed, Nov 4, 2009 at 1:17 AM, ross.wil...@ga.gov.au wrote: -Original Message- From: Jeff Whitaker [mailto:jsw...@fastmail.fm] Sent: Tuesday, 3 November 2009 02:53 To: Stephane Raynaud Cc: Wilson Ross; matplotlib-users@lists.sourceforge.net Subject: Re: [Matplotlib-users] basemap: Mask the ocean [SEC=UNCLASSIFIED] Stephane Raynaud wrote: Ross, one way is to mask (or remove) ocean points using the _geoslib module provided with basemap. When you create a Basemap instance, you can retrieve all its polygons land (continents and islands) with mymap.coastpolygons. Thay are stored as numpy arrays, and you can convert them to _geoslib.Polygon objects : poly = _geoslib.Polygon(N.asarray(coastalpoly).T) Then you loop over all Polygons and all (x,y) points and test : good_point = _geoslib.Point((x,y)).within(poly) Thanks to this method, you can choose you optimal resolution. You can even compute the intersection of you hexagons with coastal polygons using .intersection() and .area (instead of simply checking if the center is inside) and then reject points depending the fraction of the cell covered by land (or ocean). Following Stephane's excellent suggestion, here's a prototype Basemap method that checks to see if a point is on land or over water. Ross - if you find it useful I'll include it in the next release. Note that it will be slow for lots of points or large map regions. -Jeff -- Yes, Stephane's approach is nice and Jeff has nicely encapsulated the approach. I'll put that into my bag of tricks! However it doesn't quite do what I want. My data does not have any points in the ocean; the hex binning creates hexagonal patches that extend out into the ocean. As a physicist I say that's a representation artifact and leave it at that, but my end-users want that 'bleed' into the ocean removed. My argument that they are losing data falls on deaf ears. Here's an even more contrived example that improves on my poor previous attempt to explain the problem: import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.basemap import Basemap ll_lat = -38.10 # extent of area of interest ll_lon = 145.06 ur_lat = -38.00 ur_lon = 145.16 # create data points all on land fudge = ((ll_lon+0.05, ur_lat-0.00, 1000), (ll_lon+0.05, ur_lat-0.01, 2000), (ll_lon+0.05, ur_lat-0.02, 3000), (ll_lon+0.05, ur_lat-0.03, 4000), (ll_lon+0.04, ur_lat-0.025, 1000), (ll_lon+0.043, ur_lat-0.036, 1), (ll_lon+0.047, ur_lat-0.041, 2), (ll_lon+0.07, ur_lat-0.07, 4000), (ll_lon+0.08, ur_lat-0.08, 3000), (ll_lon+0.09, ur_lat-0.09, 2000), (ll_lon+0.10, ur_lat-0.10, 1000)) data = np.ones((3, len(fudge))) for (i, (lon, lat, val)) in enumerate(fudge): data[0,i] = lon data[1,i] = lat data[2,i] = val # plot the data fig = plt.figure() m = Basemap(projection='cyl', llcrnrlat=ll_lat, urcrnrlat=ur_lat, llcrnrlon=ll_lon, urcrnrlon=ur_lon, resolution='f') plt.hexbin(data[0,:], data[1,:], data[2,:], gridsize=5) m.drawcoastlines(linewidth=0.5,
[Matplotlib-users] Install problem on Mac OS 10.5
Hi When I try installing matplotlib version 99.1.1 on my Mac OS 10.5 using the DMG I receive the following error: You cannot install matplotlib 0.99.1.1-r7813 on this volume. matplotlib requires System Python 2.5 to install. But I am using System Python 2.5: Python 2.5.1 (r251:54863, Feb 6 2009, 19:02:12) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type help, copyright, credits or license for more information. Why is it not recognizing Python? Thanks! PS. I also tried installing from source, but got the lipo error: src/ft2font.cpp:941: warning: control reaches end of non-void function lipo: can't open input file: /var/folders/eh/eh0fgkpOHKahCYCtazTUzTI/-Tmp-//ccYdEGvu.out (No such file or directory) error: command 'gcc' failed with exit status 1 -- View this message in context: http://old.nabble.com/Install-problem-on-Mac-OS-10.5-tp26164460p26164460.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Legend fails to make sample symbols for legends outside of the plot area
On Wed, Nov 4, 2009 at 12:00 AM, Greg Novak no...@ucolick.org wrote: Is this the intended behavior? How can I get complete sample lines when the legend lies outside the plot area? No, this is not intended. It seems to me that wrong clip path is set for those legend handles. However, your code works fine with the svn version of mpl and also with the 0.99.1. So, maybe this is an old bug that has been fixed. Can you check your matplotlib version and, if possible, update to newer version? Or, if you report your version of mpl, I'll see if I can find any workaround. -JJ -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Legend fails to make sample symbols for legends outside of the plot area
Indeed, my version is 98.3. I'll update. Thanks! Greg On Wed, Nov 4, 2009 at 9:03 AM, Jae-Joon Lee lee.j.j...@gmail.com wrote: On Wed, Nov 4, 2009 at 12:00 AM, Greg Novak no...@ucolick.org wrote: Is this the intended behavior? How can I get complete sample lines when the legend lies outside the plot area? No, this is not intended. It seems to me that wrong clip path is set for those legend handles. However, your code works fine with the svn version of mpl and also with the 0.99.1. So, maybe this is an old bug that has been fixed. Can you check your matplotlib version and, if possible, update to newer version? Or, if you report your version of mpl, I'll see if I can find any workaround. -JJ -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] cone plots
Are you running svn version of mpl? Also, as I said, the example is based on the patch yet to be submitted. So, I can send you the example, but it will take me sometime to commit the patch. I'll give you a notice when this happen. As far as rotating the ticks, if you're using markers, than I guess you need a custom artist class. So, I recommend you to just use simple lines. Whatever path you take (even with my example), it will not be easy. So, again, finding other plotting tool that support cone plots may be more practical (unless someone comes up with a working example). Regards, -JJ On Wed, Nov 4, 2009 at 2:44 AM, ifriad ifr...@gmail.com wrote: Hi, Thanks, I think the attached sample is good enough for me, In fact I got something similar except for the ticks I didn't know how to make them slanted, so If I can get the code for you plot this will be really great. I can then fine tune it to my needs. Thanks Ihab Jae-Joon Lee wrote: Unfortunately, I don't think something like cone plots can be easily done with current matplotlib. I guess you can define custom projection and such, as in the example below http://matplotlib.sourceforge.net/examples/api/custom_projection_example.html but this will involve some (maybe a lot) coding + some knowledge of mpl internals. With the experimental curvelinear coordinate support in axes_grid toolkit (and with yet-to-be-committed patch), one can draw very basic cone plot (see the attached). However, the current support is far from complete. I'm willing to make it better, but I'm afraid that this may not happen in a near future (likely not in this year). Of course, you can try to plot everything (axes boundary, ticks, ticklabels etc.) manually if you want, and maybe this is the best way currently available. Regards, -JJ On Sat, Oct 31, 2009 at 4:15 AM, ifriad ifr...@gmail.com wrote: Hi, Does any one knows how to do those cone plots, I am attaching a sample plot. Thanks Ihab http://old.nabble.com/file/p26140834/cone.png cone.png -- View this message in context: http://old.nabble.com/cone-plots-tp26140834p26140834.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- View this message in context: http://old.nabble.com/cone-plots-tp26140834p26192193.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Location matplotlibrc file on my Mac
-Original Message- From: Tony S Yu [mailto:ton...@mit.edu] Sent: Tuesday, November 03, 2009 1:11 PM To: Paul Hobson Cc: Matplotlib Users Subject: Re: [Matplotlib-users] Location matplotlibrc file on my Mac (Paul, I hope you don't mind if I bring this bump this back to the list). Apparently I skimmed your original email and didn't see that you tried putting the file in your working directory. That should work. (My original response is still appropriate for a global rc file.) As suggested on the mpl website (specifically: http://matplotlib.sourceforge.net/users/customizing.html ), you can try printing out the path of the rc file being used by adding the following to your script: import matplotlib print matplotlib.matplotlib_fname() Also, you may want to check that the working directory is where you think it is. For example, if you run a script from the terminal as: $ python ~/path/to/file.py Your working directory is '~' and not '~/path/to/'---so matplotlibrc file located in the same directory as file.py would not be in the working directory. Otherwise, I have no idea why the matplotlibrc is not being found in the working directory. Best, -Tony I won't mention how long it had been so I had done this, but I had to move the file to /Users/paul/.matplotlib in Terminal since Mac OSX won't let you do that in Finder (sigh). This made everything work splendidly. I even got it to work in the present working directory (not sure how I was messing that up earlier). Thanks so much, Tony. Paul M. Hobson Senior Staff Engineer -- Geosyntec Consultants 55 SW Yamhill St, Ste 200 Portland, OR 97204 Phone: (503) 222-9518 Web: www.geosyntec.com -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Drawing a single contour line
Ah, I was a little confused by what you wrote John (I though I had to access contour through the axes object and the meaning of R, F, dR was a little unclear..) however using the 'levels' keyword now works. i.e. plt.contour(x, y, z, levels=[0]) Incidentally, this keyword (levels) is not documented at http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.contour and in fact the documentation implies that contour(kx, ky, z, [0]) should work when it does not. Perhaps the docs could be updated to reflect this? Brendan On Tue, Nov 3, 2009 at 2:19 PM, Brendan Arnold brendanarn...@gmail.com wrote: Hi again, Thanks for the responses, however neither work, the error still persists. Here are more details... Traceback (most recent call last): File C:\Program Files\Python\2.5\lib\lib-tk\Tkinter.py, line 1403, in __call__ return self.func(*args) File C:\Program Files\Python\2.5\lib\site-packages\matplotlib\backends\backend_tkagg.py, line 212, in resize self.show() File C:\Program Files\Python\2.5\lib\site-packages\matplotlib\backends\backend_tkagg.py, line 215, in draw FigureCanvasAgg.draw(self) File C:\Program Files\Python\2.5\lib\site-packages\matplotlib\backends\backend_agg.py, line 314, in draw self.figure.draw(self.renderer) File C:\Program Files\Python\2.5\lib\site-packages\matplotlib\artist.py, line 46, in draw_wrapper draw(artist, renderer, *kl) File C:\Program Files\Python\2.5\lib\site-packages\matplotlib\figure.py, line 773, in draw for a in self.axes: a.draw(renderer) File C:\Program Files\Python\2.5\lib\site-packages\matplotlib\artist.py, line 46, in draw_wrapper draw(artist, renderer, *kl) File C:\Program Files\Python\2.5\lib\site-packages\matplotlib\axes.py, line 1735, in draw a.draw(renderer) File C:\Program Files\Python\2.5\lib\site-packages\matplotlib\text.py, line 515, in draw bbox, info = self._get_layout(renderer) File C:\Program Files\Python\2.5\lib\site-packages\matplotlib\text.py, line 257, in _get_layout if key in self.cached: return self.cached[key] TypeError: unhashable type: 'numpy.ndarray' matplotlib.__version__ '0.99.1' numpy.__version__ '1.3.0' Python version 2.5 the code in full is as follows, import matplotlib import numpy as np import matplotlib.cm as cm import matplotlib.mlab as mlab import matplotlib.pyplot as plt # Set some model parameters model_points = 1 t0 = 0.38 t1 = 0.32*t0 t2 = 0.5*t1 def energy(kx, ky): '''Energy function, evetually this will be provided by raw data from WIEN2k''' return -2*t0*(np.cos(kx)+np.cos(ky)) \ + 4*t1*np.cos(kx)*np.cos(ky) \ - 2*t2*(np.cos(2*kx)+np.cos(2*ky)) def shift_energy_up(energy_val, dE): '''Shifts the energy according to a gap''' return energy_val + np.sqrt(energy_val**2 + dE**2) def shift_energy_dn(energy_val, dE): '''Shifts the energy down according to an energy''' return energy_val - np.sqrt(energy_val**2 + dE**2) kx = np.arange(0, 2*np.pi, 2*np.pi/np.sqrt(model_points)) ky = np.arange(0, 2*np.pi, 2*np.pi/np.sqrt(model_points)) mgx, mgy = np.meshgrid(kx, ky) z = energy(mgx, mgy) # Set the ticks to go outwards matplotlib.rcParams['xtick.direction'] = 'out' matplotlib.rcParams['ytick.direction'] = 'out' plt.figure() CS = plt.contour(kx, ky, z, [0, 0]) plt.clabel(CS, inline=1, fontsize=10) plt.title('Simplest default with labels') plt.show() kind regards, Brendan On Mon, Nov 2, 2009 at 9:33 PM, Pierre de Buyl pdeb...@ulb.ac.be wrote: From memory, you just need to make a length one list contour(z, [i]) Pierre Le 2 nov. 09 à 22:19, Brendan Arnold a écrit : Hi there, I can draw a single contour line in MATLAB using contour(z, [i i]) however, contour(z, [i, i]) using matplotlib gives an error. In fact any plot that plots a single line (i.e. contour(z, 1)) also gives an error as follows, TypeError: unhashable type: 'numpy.ndarray' How do I draw a single contour line using matplotlib? regards, Brendan -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now.
[Matplotlib-users] How do I change where MPL looks for Latex?
I know support for the usetex feature is limited, but I think (*hope*) that this is purely an MPL question and not out of the scope and annoying to the members of the group. I like to use the fourier.sty package since I like the Utopia font and it's math font is particularly nice. But MPL is using this Latex installation: /sw/share/texmf-dist/tex/latex/ which has no fourier package, and raises predictable errors when I set text.latex.preamble : \usepackage{fourier} But I only use and maintain this one: /usr/local/texlive/2008/texmf-dist/tex/latex/ (fourier and many other packages I like) Is there a way to tell MPL to use my preferred Latex directory, or should I update and maintain the one it currently searches? Mac OS 10.5 MPL 0.99.1 Many thanks, Paul M. Hobson Senior Staff Engineer -- Geosyntec Consultants 55 SW Yamhill St, Ste 200 Portland, OR 97204 Phone: (503) 222-9518 Web: www.geosyntec.com -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] How do I change where MPL looks for Latex?
On Wed, Nov 4, 2009 at 11:25 AM, phob...@geosyntec.com wrote: I know support for the usetex feature is limited, but I think (*hope*) that this is purely an MPL question and not out of the scope and annoying to the members of the group. I like to use the fourier.sty package since I like the Utopia font and it's math font is particularly nice. But MPL is using this Latex installation: /sw/share/texmf-dist/tex/latex/ which has no fourier package, and raises predictable errors when I set text.latex.preamble : \usepackage{fourier} But I only use and maintain this one: /usr/local/texlive/2008/texmf-dist/tex/latex/ (fourier and many other packages I like) This looks like a UNIX PATH issue -- mpl will use the version of latex it finds first in your PATH, so if you want it to find /usr/local/texlive/2008/texmf-dist/tex/latex/, put the directory containing that latex ahead of the fink one (/sw) -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] How do I change where MPL looks for Latex?
On Wed, Nov 4, 2009 at 11:25 AM, phob...@geosyntec.com wrote: I know support for the usetex feature is limited, but I think (*hope*) that this is purely an MPL question and not out of the scope and annoying to the members of the group. I like to use the fourier.sty package since I like the Utopia font and it's math font is particularly nice. But MPL is using this Latex installation: /sw/share/texmf-dist/tex/latex/ which has no fourier package, and raises predictable errors when I set text.latex.preamble : \usepackage{fourier} But I only use and maintain this one: /usr/local/texlive/2008/texmf-dist/tex/latex/ (fourier and many other packages I like) From: John Hunter [mailto:jdh2...@gmail.com] Sent: Wednesday, November 04, 2009 9:33 AM This looks like a UNIX PATH issue -- mpl will use the version of latex it finds first in your PATH, so if you want it to find /usr/local/texlive/2008/texmf-dist/tex/latex/, put the directory containing that latex ahead of the fink one (/sw) Thanks, John. Looks like I can take from here. I'll add my Texlive directory to near the top of the path. -paul -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] mplot3d: bar3d + colormap somehow?
Greetings. I would like to make a mplot3d.bar3d plot where the colour indicates the value of the element. Like: negative values blue, positive red, zero green. From what i see i can only give all bars the same color ... Is there a way around it? I know that this is currently done in mayavi, but mayavi also seems to be tons slower. thanks for any help with best regards, q -- The king who needs to remind his people of his rank, is no king. To gain that which is worth having, it may be necessary to lose everything else. -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Drawing a single contour line
John Hunter wrote: On Wed, Nov 4, 2009 at 11:16 AM, Brendan Arnold brendanarn...@gmail.com wrote: Ah, I was a little confused by what you wrote John (I though I had to access contour through the axes object and the meaning of R, F, dR was a little unclear..) however using the 'levels' keyword now works. i.e. plt.contour(x, y, z, levels=[0]) Incidentally, this keyword (levels) is not documented at http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.contour and in fact the documentation implies that contour(kx, ky, z, [0]) should work when it does not. But it does work, as it should: x = arange(5) y = arange(7) X, Y = meshgrid(x,y) z = X+Y contour(X, Y, z, [5]) Drop the above into ipython -pylab. Eric Perhaps the docs could be updated to reflect this? Thanks for the heads up -- I updated the docstring in svn HEAD Sorry the original example was confusing -- I cut and pasted from some code I was working on, and forgot to import the mindreading module JDH -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users