Eric Firing wrote: >> >> I'm pretty new to this stuff, so what belongs where is sometimes >> unclear. I'll check out the sourceforge tip. I didn't write the >> program. I'm just trying to add some features. Changing the import >> for matplotlib got the graphics window up. >> import matplotlib.pyplot as plt >> >> When I ran it, it was followed by this traceback: >> ------------start >> Exception in Tkinter callback >> Traceback (most recent call last): >> File "C:\Python25\lib\lib-tk\Tkinter.py", line 1403, in __call__ >> return self.func(*args) >> File >> "C:\Sandia_Meteors\Sentinel_Development\Development_Sentuser+Utilities\sentuser\sentuser_20090103+hist.py", >> >> line 508, in ShowHistogram >> plt.histogram(v, bins=linspace(0,256,nplt_bins+1), normed=1)# >> matplotlib version (plot) >> AttributeError: 'module' object has no attribute 'histogram' >> ---------------end >> 508 line is the histogram. Who's complaining? ShowHistogram? I don't >> believe I should be using hist here instead of histogram. > > histogram is a numpy function, not a pyplot function. Pyplot has a > hist which uses numpy.histogram to do the calculation, and then plots > it. It does look like plt.hist is what was intended in your code. > > For tracking down such things, there is no substitute for working > interactively with ipython. If you are not already familiar with it, > taking a little time to get it running and learn the basics (like tab > completion and appending ? or ?? to function names to get docstrings + > origins, and source code, respectively) will pay big dividends. > > Eric These dependencies sure are tricky. I changed it to plt:hist, and that got me a histogram plot. I think some of my parameters need work, but it's close to what I expected. When I closed the graph and finally the program, the shell (IDLE) did not provide a >> prompt, nor did it produce my print of "End of Histogram" that followed plt.hist. Closing the shell revealed something was still running. I may have to go to the console for execution to see what that's about.
I've heard of ipython. It looks like I should give it a try. Examples for matplotlib abound, but not much about how MATLAB concepts like figure shows up anywhere. Is that all in pylab docs? -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time) Obz Site: 39° 15' 7" N, 121° 2' 32" W, 2700 feet The popular press and many authorities believe the number of pedifiles that prowl the web is 50,00. There are no figures that support this. The number of children below 18 years of age kidnapped by strangers is 1 in 600,00, or 115 per year. -- The Science of Fear by D. Gardner Web Page: <www.speckledwithstars.net/> ------------------------------------------------------------------------------ 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