Plotting histograms
Robert Kern
robert.kern at gmail.com
Thu Oct 19 00:43:03 EDT 2006
amitsoni.1984 at gmail.com wrote:
> Thanks for the replies ... its perfect now ... but just one more thing
> ... how can I plot another function(a semi circle) in the same
> histogram?
Just call the appropriate plotting function after you plot the histogram. By
default, the second plot will go into the same figure as the first. Something
like the following should suffice:
x = numpy.linspace(-1.0, 1.0, 201)
y = numpy.sqrt(1.0 - x*x)
pylab.plot(x, y, 'k-')
Look at the matplotlib documentation for more information. You will probably
also want to ask future questions on the matplotlib-users mailing list instead
of here.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
More information about the Python-list
mailing list