As far as I know, the 'arrow' function is not recommended. The 'annotate'
function has a lot more features. Here's your code with the annotate
function:

import pylab
from scipy import optimize
import numpy
x1=numpy.arange(-4000,1000,0.1)
x2=numpy.arange(-1000,4000,0.1)
y1=100*numpy.square(x1+1500)
y2=100*numpy.square(x2-1500)-0.1e9
pylab.figure()
pylab.plot(x1,y1,x2,y2)
pylab.grid(True)
pylab.annotate('',(-3000,0),(-3000,-100000000),
        arrowprops=dict(arrowstyle='<->'))
pylab.xlim(-5000,5000)
pylab.ylim(-2e8,7e8)
pylab.show()

Hope that helps a little.

Ryan

On Mon, Oct 17, 2011 at 12:02 PM, Piter_ <x.pi...@gmail.com> wrote:

> Hi all
> I want to draw an two headed arrow between two points.
> But I get a line. What I am doing wrong? I actually try to plot an
> image similar to this one:
>
> http://upload.wikimedia.org/wikipedia/commons/a/a3/Parameters_of_the_Marcus_Equation.JPG
> may be I can use an annotate function for this.
> Thanks for help.
> Petro.
> ########
> import pylab
> from scipy import optimize
> import numpy
> x1=numpy.arange(-4000,1000,0.1)
> x2=numpy.arange(-1000,4000,0.1)
> y1=100*numpy.square(x1+1500)
> y2=100*numpy.square(x2-1500)-0.1e9
> pylab.figure()
> pylab.plot(x1,y1,x2,y2)
> pylab.grid("True")
> pylab.arrow(-3000,0,0,-100000000,width=1)
> pylab.xlim(-5000,5000)
> pylab.ylim(-2e8,7e8)
> pylab.show()
> ###########x
>
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security
> threats, fraudulent activity and more. Splunk takes this data and makes
> sense of it. Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2d-oct
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to