Hi All,
I would like to know if there is a way to have the bin sizes change by
integer values. For example the bin size would be
10-20
20-30
not
10.3-20.5
20.3-30.5
and have it adjust as the number of bins changes.
Thanks
--
View this message in context:
surfcast23 wrote:
In the documentation it says that Axes3D.plot_wireframe(X, Y, Z, *args,
**kwargs) takes 2D arrays as the first two arguments. Do the arrays have
to have the same size dimensions?
Any one know?
--
View this message in context:
http://old.nabble.com/Size-of-array
?
Benjamin Root-2 wrote:
On Thursday, August 2, 2012, surfcast23 wrote:
surfcast23 wrote:
In the documentation it says that Axes3D.plot_wireframe(X, Y, Z, *args,
**kwargs) takes 2D arrays as the first two arguments. Do the arrays
have
to have the same size dimensions?
Any one
Wouldn't
X= np.ones((1, 45))
Y= np.zeros((32, 1))
change the existing values of the elements to ones and zeros?
Benjamin Root-2 wrote:
On Thursday, August 2, 2012, surfcast23 wrote:
Okay thank you! The Matlab code I am basing this on takes arrays of
different
shapes with different
sorry misssed this line Which produces x and y with the same shapes, and
their values duplicated in
the direction the array was expanded.
surfcast23 wrote:
Wouldn't
X= np.ones((1, 45))
Y= np.zeros((32, 1))
change the existing values of the elements to ones and zeros?
Benjamin
I tested it out and it does change all the values to ones and zeros. Is there
a way to broadcast and keep the original values that were in the arrays?
Thanks for the help
Benjamin Root-2 wrote:
On Thursday, August 2, 2012, surfcast23 wrote:
Okay thank you! The Matlab code I am basing
Gotcha ya working perfectly now thank you for the help!
Benjamin Root-2 wrote:
On Thursday, August 2, 2012, surfcast23 wrote:
Wouldn't
X= np.ones((1, 45))
Y= np.zeros((32, 1))
change the existing values of the elements to ones and zeros?
I was just demonstrating what
In the documentation it says that Axes3D.plot_wireframe(X, Y, Z, *args,
**kwargs) takes 2D arrays as the first two arguments. Do the arrays have to
have the same size dimensions?
--
View this message in context:
[0,:]
tdata = vstack([tdata, t])
But I still get the same error as in my original post.
Khary
surfcast23 wrote:
I will try initializing starting at 0
Benjamin Root-2 wrote:
On Sun, Jul 1, 2012 at 12:50 PM, surfcast23 surfcas...@gmail.com wrote:
Hi,
I am translating
=np.genfromtxt(F, delimiter=' ')
C=data[:,3]
Much easier, and way faster.
Regards,
David.
On Fri, Jul 27, 2012 at 4:13 AM, surfcast23 surfcas...@gmail.com wrote:
Hi
I have a code to plot a histogram and I am trying to add a best fit line
following this example
http
Just tried it with nbins set to 216 and I still get the error
surfcast23 wrote:
Hi David,
I tried your fix
nbins = 20
n, bins, patches = plt.hist(C, nbins, range=None, normed=False,
weights=None, cumulative=False, bottom=None, histtype='bar', align='mid',
orientation='vertical
, surfcast23 surfcas...@gmail.com wrote:
y = mlab.normpdf( nbins, avg, sigma)
l = plt.plot(nbins, y, 'r--', linewidth=1)
plt.show()
You should not change bins there, as you are evaluating the gaussian
function at different values.
Also, sigma is a vector, but it should be an scalar:
sigma
to make both
areas fit:
plt.plot(bins, N* N*(bins[1]-bins[0])**y, 'r--', linewidth=1)
And you will get a nice gaussian fitting your data.
On Fri, Jul 27, 2012 at 11:12 PM, surfcast23 surfcas...@gmail.com wrote:
Thanks for catching that sigma was still a vector! I am no longer getting
Thank you for the help!
Daπid wrote:
On Sat, Jul 28, 2012 at 12:22 AM, surfcast23 surfcas...@gmail.com wrote:
Am I reading (bins[1]-bins[0]) correctly as taking the difference
between
what is in the second and first bin?
Yes. I am multipliying the width of the bins by their total
Hi
I have a code to plot a histogram and I am trying to add a best fit line
following this example
http://matplotlib.sourceforge.net/examples/pylab_examples/histogram_demo.html
but run into this error
Traceback (most recent call last):
File /home/Astro/count_Histogram.py, line 54, in module
I will try initializing starting at 0
Benjamin Root-2 wrote:
On Sun, Jul 1, 2012 at 12:50 PM, surfcast23 surfcas...@gmail.com wrote:
Hi,
I am translating a Matlab code to python and get the following error
when
the codes reaches the plotting section
Warning (from warnings module
Hi,
I am translating a Matlab code to python and get the following error when
the codes reaches the plotting section
Warning (from warnings module):
File C:\Documents and Settings\My Documents\PHYSICS\Wave-eqn.py, line 40
w = (D*v)
RuntimeWarning: overflow encountered in multiply
Thanks Ben I will check it out
Benjamin Root-2 wrote:
Khary,
On Sun, Jun 10, 2012 at 3:30 PM, surfcast23 surfcas...@gmail.com wrote:
to matplotlib-use.
Hi,
I have a data set that is composed of x,y,z coordinates of the center of
cells and counts of objects in each contained
to matplotlib-use.
Hi,
I have a data set that is composed of x,y,z coordinates of the center of
cells and counts of objects in each contained in cell. I am using the
following code to do a scatter plot of the counts per cell.
ax = fig.add_subplot(111, projection='3d')
ax.scatter(Xa, Ya, Za,
Hi I wrote the following script, but it hangs right after plt.show(). I would
really appreciate it if someone could take a look and let me know where I'm
messing up. Thanks in advance
from numpy import *
import matplotlib.pyplot as plt
#H=p^2/2-cosq
#p=dp=-dH/dq
#q=dq=dH/dp
t = 0
h = 0.5
pfa =
Benjamin Root-2 wrote:
On Tue, Sep 6, 2011 at 12:01 PM, surfcast23 surfcas...@gmail.com wrote:
Thanks for everyone responses and help
Che,
You are correct on what I have to do. The problem is that I have a data
set
with ~1250 so I cant' do the sorting or finding the mean by hand
what you want to do? So you now want a histogram?
surfcast23 wrote:
Sorry everyone I totally missed something very important. What I need to
do is first bin the masses(which I don't know how to do).
Chelonian wrote:
On Thu, Aug 25, 2011 at 10:01 PM, surfcast23 surfcas...@gmail.com
Hi Martin,
Thank for the relpy. What I have is a script that reads the data from
a large file then prints out the values listed in a particular column. What
I now need to do is have the information in that column plotted as the
number of rows vs. the mean value of all of the rows. What I
Hi,
I apologize if my explanation was less than clear. What I have is data in
a column that runs from row 1 to row 1268. In each each row there is a
number. For example
1
3
5
6
7
8
9
so I want the y axis to run from 1 to 7 ( the number of rows) and the x
axis to be the average of the
()
Ryan
Message: 5
Date: Thu, 25 Aug 2011 11:15:57 -0700 (PDT)
From: surfcast23 surfcas...@gmail.com
Subject: Re: [Matplotlib-users] How do you Plot data generated by a
python script?
To: matplotlib-users@lists.sourceforge.net
Message-ID: 32336570.p...@talk.nabble.com
Content-Type
, but really don't think this is what
you mean as it seems a strange thing to want to do.
sorry i couldn't be of more help
surfcast23 wrote:
Hi,
there is only one column. so I want a plot of y and x. With y taking
values running from 0 to n or 7 in my example and x as the average
Sorry everyone I totally missed something very important. What I need to do
is first bin the masses(which I don't know how to do).
Chelonian wrote:
On Thu, Aug 25, 2011 at 10:01 PM, surfcast23 surfcas...@gmail.com wrote:
Hi,
there is only one column. so I want a plot of y and x. With y
I am fairly new to programing and have a question regarding matplotlib. I
wrote a python script that reads in data from the outfile of another program
then prints out the data from one column.
f = open( 'myfile.txt','r')
for line in f:
if line != ' ':
line = line.strip() # Strips end of
to programming, you may struggle, so I'd
suggest reading first going to scipy.org and reading up on numpy. When
you understand the basics of numpy, matplotlib's documentation should
make a lot more sense.
Gary
On Thu, Aug 25, 2011 at 6:48 AM, surfcast23 surfcas...@gmail.com wrote:
I am
29 matches
Mail list logo