How to combine in one plot a plot and a circle.

Hello , i wanted to ask how can i do what i am saying in title.

I have a plot with some points and i have a circle.
I want to combine both data in one plot.(a circle and point data)

I can't do it because ( i think) for the circle i use pylab.show() but for plot ,just show().
Is there another way to make the circle?

from scitools.std import *
import pylab

npoints=10

vectorpoint=random.uniform(-1,1,[1,2])
experiment=random.uniform(-1,1,[npoints,2])

#plot(experiment[:,0],experiment[:,1],'ro')
#show()

plot(experiment[:,0],experiment[:,1],'ro')
hold('on')
circ = pylab.Circle((0., 0.), 1.0,alpha=0.1)
pylab.gca().add_patch(circ)
pylab.axis('scaled')
pylab.show()

Thanks!

Hello , i wanted to ask how can i do what i am saying in title.

I have a plot with some points and i have a circle.

I want to combine both data in one plot.(a circle and point data)

I can’t do it because ( i think) for the circle i use pylab.show() but

for plot ,just show().

Is there another way to make the circle?

from scitools.std import *

import pylab

npoints=10

vectorpoint=random.uniform(-1,1,[1,2])

experiment=random.uniform(-1,1,[npoints,2])

#plot(experiment[:,0],experiment[:,1],‘ro’)

#show()

plot(experiment[:,0],experiment[:,1],‘ro’)

hold(‘on’)

circ = pylab.Circle((0., 0.), 1.0,alpha=0.1)

pylab.gca().add_patch(circ)

pylab.axis(‘scaled’)

pylab.show()

Thanks!

try this:

pylab.plot(experiment[:, 0], experiment[:, 1], ‘ro’)
circ = pylab.Circle((0., 0.), 1.0, alpha=0.1)
pylab.gca().add_patch(circ)
pylab.axis(‘scaled’)
pylab.show()

Cheers!
Ben Root

···

On Fri, Oct 28, 2011 at 11:47 AM, Gousios George <ggeo1@…3830…> wrote:


The demand for IT networking professionals continues to grow, and the

demand for specialized networking skills is growing even more rapidly.

Take a complimentary Learning@…3826… Self-Assessment and learn

about Cisco certifications, training, and career opportunities.

http://p.sf.net/sfu/cisco-dev2dev


Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-users