Hi Oğuz,

Oğuz Yarımtepe, on 2011-04-13 23:09,  wrote:
> I didn't understand why i can not see 20 dots with the below command,
> but i just see 3 dots at the graph.

> a1 = N.ndarray(shape=(10,2))*2

When you allocate an array this way - you're just allocating
space for it without initializing it to anything - there are no
guarantees about what values that array will take on - and on
most operating systems it will vary from one run to another.  

If you're trying to get a random number, changes the a1 and a2
lines to:

a1 = N.random.rand(10,2)*2
a2 = N.random.rand(10,2)+10

> P.xlim(xmin=n_x.min()*10, xmax=n_x.max()*10)
> P.ylim(ymin=n_y.min()*10, ymax=n_y.max()*10)

I don't think you want to do n_x.min()*10 - multiplying the min
and max values has a different effect on the limits depending on
the sign of those values. You probably want to find the
difference between min and max and then use that to extend and
limits, instead.
 
> Normally i have 20 different points to be plotted but because they are
> so close values it just plots three of them. Any idea how i can fix
> it?

The fact that you weren't initializing your arrays with anything
affects how many unique combinations of x and y you'll have.
len(set(zip(n_x,n_y))) will tell you how many points you should
see.

best,
-- 
Paul Ivanov
314 address only used for lists,  off-list direct email at:
http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 

Attachment: signature.asc
Description: Digital signature

------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to