segmentation fault

ankita dutta ankita.dutta09 at gmail.com
Thu Oct 15 06:49:33 EDT 2009


hi chris,

i  am using matplotlib for plotting graph, as following:

"import matplotlib.pyplot as plt"

can you kindly tell me how to fix this problem(crashing) ?

On Thu, Oct 15, 2009 at 3:36 PM, Chris Rebert <clp2 at rebertia.com> wrote:

> On Thu, Oct 15, 2009 at 2:14 AM, ankita dutta <ankita.dutta09 at gmail.com>
> wrote:
> > hi,
> > i am relatively new to python programming,
> > i am facing the following problem:
> >
> > i am tring to simply  obtain data from a file ( "B.txt" ,  data in this
> file
> > are in single column and floats)
> > and plot a graph between those values and thier index.  ( for example if
> in
> > file , if at 2nd position valuse is 9.34 ,  x=9.34 and y=1).
> > .
> > .
> > .
> > ln1=open("B.txt","r+")
> > lines5=ln1.readlines()
> > exp=[ ]
> > c1=[ ]
> > for i in range (0,len(lines1)):
> >     f1=lines1[i].split()
> >     c1.append(float(f1[0]))
> >     exp.append(i)
> > c1.sort(reverse=1)
> >
> > lines=plt.plot(c1,exp,'ro')
> > plt.show()
> > .
> > .
> > .
> >
> > but every time its showing the following error:
> >
> > <some random value>  is dumped
> > segmentation fault
>
> The problem lies with whatever library you're using that provides
> "plt" (or is named "plt"; your code sample is incomplete). It's coded
> in C and is apparently crashing.
>
> Cheers,
> Chris
> --
> http://blog.rebertia.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20091015/904ecb4a/attachment-0001.html>


More information about the Python-list mailing list