D White wrote:
> I'm having no luck getting the "bins" option to pylab.hist() to work.
> Here's an example:
>
> fish_data=[random() for i in range(100)]
> import pylab
> import numpy
>
> divats = numpy.arange(0.0,1.0,0.1)
> pylab.hist(fish_data, bins=divats)
> pylab.savefig('sage.png')
>
You
On Thu, Jul 23, 2009 at 8:16 PM, D White wrote:
>
> I'm having no luck getting the "bins" option to pylab.hist() to work.
> Here's an example:
>
> fish_data=[random() for i in range(100)]
> import pylab
> import numpy
>
> divats = numpy.arange(0.0,1.0,0.1)
> pylab.hist(fish_data, bins=divats)
> py
The pylab version would be something like this:
import pylab
pylab.close()
y = random.standard_normal((1,))
n, bins, patches = pylab.hist(y, 100)
pylab.setp(patches, 'facecolor', 'g')
pylab.savefig('histogram',dpi=72)
pylab.close()
Here is a bit more elaborate version for combining two diffe
On Tuesday 25 March 2008, William Stein wrote:
> On Tue, Mar 25, 2008 at 6:44 AM, Martin Albrecht
>
> <[EMAIL PROTECTED]> wrote:
> > This should be R's home base:
> >
> > # first we compute some data
> > b = 10
> > st = []
> > for i in range(500):
> > A = random_matrix(ZZ,160,160, x=-2**b,
On Tue, Mar 25, 2008 at 6:44 AM, Martin Albrecht
<[EMAIL PROTECTED]> wrote:
>
> This should be R's home base:
>
> # first we compute some data
> b = 10
> st = []
> for i in range(500):
> A = random_matrix(ZZ,160,160, x=-2**b, y=2**b)
> t = cputime()
> E = A.echelon_form()
> st.append(
This should be R's home base:
# first we compute some data
b = 10
st = []
for i in range(500):
A = random_matrix(ZZ,160,160, x=-2**b, y=2**b)
t = cputime()
E = A.echelon_form()
st.append(cputime(t))
#now we plot a histogram using R
from rpy import r
r.png('histogram.png',width=640,heig
One way is, for example,
sage: J = range(3)
sage: A = [ZZ(i^2)+1 for i in J]
sage: s = IndexedSequence(A,J)
sage: s.plot_histogram()
using http://www.sagemath.org/hg/sage-main/file/211b127eab5d/sage/gsl/dft.py
I think there is another way but I don't remember the details. I think
this question
h