|
From: John H. <jdh...@ac...> - 2004-09-28 09:21:15
|
>>>>> "Tom" == Tom Kornack <to...@ko...> writes:
Tom> Hello: I'm having trouble figuring out how to plot error bars
Tom> on a log log plot. It doesn't seem that loglog takes an
Tom> errorbar keyword. Any pointers?
Hi Tom,
The semilogx, semilogy and loglog plots are thin wrappers around plot
that set the scale of the axes. So you can use a log scale on any
axis that has strictly positive data
from matplotlib.matlab import *
x = arange(10)
y = 1e6*rand(10)+1e5+1
err = 1e5*rand(10)
ax = gca()
errorbar(x,y,err)
ax.set_yscale('log')
show()
See also http://matplotlib.sf.net/examples/log_bar.py .
JDH
|