First time here? Check out the FAQ!

Ask Your Question
0

list_plot_semilogy not working

asked 12 years ago

Vishwanath gravatar image

updated 12 years ago

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.

Preview: (hide)

Comments

1
Jason Grout gravatar imageJason Grout ( 12 years ago )
slelievre gravatar imageslelievre ( 4 years ago )

3 Answers

Sort by » oldest newest most voted
1

answered 12 years ago

achrzesz gravatar image

updated 12 years ago

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
Preview: (hide)
link
0

answered 12 years ago

calc314 gravatar image

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

Preview: (hide)
link
0

answered 12 years ago

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...

Preview: (hide)
link

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: 12 years ago

Seen: 687 times

Last updated: Oct 08 '12