[Matplotlib-users] histogram bin widths

2010-05-06 Thread Michael Hoenig
Hi All, I am having trouble converting some histogram (hist) code written for an earlier version of matplotlib. It uses the "width" keyword to set up fixed-width bins. However, I can't seem to recreate the exact plots, which is what I am trying to do - and the new rwidth parameter appears to be

Re: [Matplotlib-users] MatplotLib Displayed Plot Error

2010-05-06 Thread David Grudoski
Thanks Michael It was odd that in all the matplotlib rc files the path.simplify was set to False but when running the program the state toggled True so I had to manually set it in the program. Strange but that did the trick! thanks again for your help! On May 6, 2010, at 12:22 PM, Michael Droe

Re: [Matplotlib-users] MatplotLib Displayed Plot Error

2010-05-06 Thread Michael Droettboom
It looks like you're hitting the well-known bug in the path simplification algorithm. You can turn it off be setting the "path.simplify" rcParam to False. (Or you can upgrade to SVN where this has been fixed...) Mike da...@wemeasureit.com wrote: > I'm plotting 50,000 data point signal as a

[Matplotlib-users] SciPy 2010: Bioinformatic & Parallel/cloud talks announced...& register now!

2010-05-06 Thread Amenity Applewhite
Hello! Things are moving quickly in preparation for SciPy 2010: Last week we announced the General Conference schedule (http://conference.scipy.org/scipy2010/schedule.html ), Tuesday we announced our student sponsorship recipients (http://conference.scipy.org/scipy2010/student.html ) and now

Re: [Matplotlib-users] imshow seems to fail on some (int16?) arrays

2010-05-06 Thread Jae-Joon Lee
On Thu, May 6, 2010 at 10:18 AM, Antony Lee wrote: > asarray (and there's no copy) works too, so my question now is rather, why > does imshow cast (I suppose that's what it does) 32bit arrays but not 16bit > ones? > Thanks for your help. > Antony It turns out that this is not a 16bit-32bit issue.

Re: [Matplotlib-users] imshow seems to fail on some (int16?) arrays

2010-05-06 Thread Antony Lee
asarray (and there's no copy) works too, so my question now is rather, why does imshow cast (I suppose that's what it does) 32bit arrays but not 16bit ones? Thanks for your help. Antony -- just to put my previous message on the list in case someone is interested: Save the data below to a file "d

Re: [Matplotlib-users] imshow seems to fail on some (int16?) arrays

2010-05-06 Thread Jon Olav Vik
Jon Olav Vik writes: > Antony Lee writes: > It happens that this array has dtype=int16, and imshow's doc says that > it only accepts float arrays Having looked at the example you sent me, I think what you want is .astype(): a = np.array([[24695, 19052, 0], [24565, 23793, -17393],

Re: [Matplotlib-users] Some questions about mplot3D

2010-05-06 Thread Jon Olav Vik
Pau writes: > I am trying to generate a 3d-plot > I have two functions that depend on two free parameters, > T_g = (5./512.) * Light_c**5 * a**4 / (Grav_G**3 * m**3) > T_d = 3.e4 * sqrt(a**3/ (Grav_G * m**2.)) > These are given in units of time, so that I would like axis y to be > "time", runni

Re: [Matplotlib-users] Logscale on polar plot and alpha as an array

2010-05-06 Thread Michael Droettboom
Pim Schellart wrote: > Dear Michael, > > thank you for the tips. > The color solution works fine but the logarithmic scale has some issues. > It is displayed once but I get the following warning: > > /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/axes.py:10

Re: [Matplotlib-users] Logscale on polar plot and alpha as an array

2010-05-06 Thread Pim Schellart
Dear Michael, thank you for the tips. The color solution works fine but the logarithmic scale has some issues. It is displayed once but I get the following warning: /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/axes.py:1091: UserWarning: aspect is not su

Re: [Matplotlib-users] imshow seems to fail on some (int16?) arrays

2010-05-06 Thread Jon Olav Vik
Antony Lee writes: > I'm trying to plot a grayscale (nonzero) array as an image -- so it's basically plt.imshow(array).  However, this pops up (after plt.show()) a completely black image.  It happens that this array has dtype=int16, and imshow's doc says that it only accepts float arrays, th

Re: [Matplotlib-users] Building matplotlib 0.99.1.2 with freetype2 2.3.12 and libpng 1.4.1 on Snow Leopard

2010-05-06 Thread Friedrich Romstedt
Ok adding: #define png_infopp_NULL (png_infopp)NULL #define int_p_NULL (int*)NULL to the beginning of src/_png.cpp fixes the problem. At least now the build succedes. Maybe this could be enclosed in an #ifndef-#endif branch? Friedrich 2010/5/5 Friedrich Romstedt : > Trying to build matplotlib

[Matplotlib-users] imshow seems to fail on some (int16?) arrays

2010-05-06 Thread Antony Lee
Hello, I have a rather weird problem with imshow: I'm trying to plot a grayscale (nonzero) array as an image -- so it's basically plt.imshow(array). However, this pops up (after plt.show()) a completely black image. It happens that this array has dtype=int16, and imshow's doc says that it only ac

Re: [Matplotlib-users] Bar graph performance

2010-05-06 Thread Kun Hong
Eric Firing wrote: > On 05/03/2010 11:45 PM, Kun Hong wrote: >> >> I have also tried step, but it doesn't seem to be able >> to fill the rectangular area. Am I missing something? >> >> > > Given that you want filled regions, step won't help. It might make > sense to make the step logic a