Ask Your Question
0

list_plot_semilogy not working

asked 2012-09-03 05:15:10 +0100

Vishwanath gravatar image

updated 2012-09-03 19:06:12 +0100

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 11:35:35 +0100 )edit
slelievre gravatar imageslelievre ( 2020-04-19 00:56:10 +0100 )edit

3 Answers

Sort by ยป oldest newest most voted
1

answered 2012-09-03 05:43:18 +0100

achrzesz gravatar image

updated 2012-09-03 05:49:42 +0100

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-09-05 09:55:29 +0100

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
0

answered 2012-10-08 08:00:31 +0100

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

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-03 05:15:10 +0100

Seen: 660 times

Last updated: Oct 08 '12