Ask Your Question
0

list_plot_semilogy not working

asked 2012-09-02 22:15:10 -0500

updated 2012-09-03 12:06:12 -0500

Shashank gravatar image
import numpy
import matplotlib.pyplot as plt
noise=numpy.random.randn(1,10)
signal = numpy.ones(10) 
snrdb = numpy.arange(10.)
#print snrdb
import mpmath
ber = []
for i in range(0,10):
   ber.append(n(0.5*mpmath.erfc(float(snrdb[i])/sqrt(2))))

list_plot_semilogy(zip(snrdb,ber))

Running the above code with list_plot works but the semilogy option yields an empty graph. Please resolve this. Thanks in advance.

edit retag flag offensive close merge delete

Comments

1
Jason Grout gravatar imageJason Grout ( 2012-09-04 04:35:35 -0500 )edit

3 answers

Sort by ยป oldest newest most voted
1

answered 2012-09-02 22:43:18 -0500

achrzesz gravatar image

updated 2012-09-02 22:49:42 -0500

This version works:

sage: list_plot_semilogy(zip(snrdb,ber),plotjoined=True)

Also:

sage: p1=list_plot_semilogy(zip(snrdb,ber))                
sage: p2=list_plot_semilogy(zip(snrdb,ber),plotjoined=True)
sage: p1+p2
edit flag offensive delete link more
0

answered 2012-10-08 01:00:31 -0500

ppurka gravatar image

The log scale doesn't behave well with nonpositive points. See the explanation I have provided here: http://trac.sagemath.org/sage_trac/ti...

edit flag offensive delete link more
0

answered 2012-09-05 02:55:29 -0500

calc314 gravatar image

In Sage 5.2, you can also do list_plot(zip(snrdb,ber),scale='semilogy',plotjoined=True).

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2012-09-02 22:15:10 -0500

Seen: 343 times

Last updated: Oct 08 '12