From: Darren D. <dd...@co...> - 2006-04-04 03:10:36
|
On Monday 03 April 2006 10:57 pm, Josh Marshall wrote: > When I run the following script: > > import numpy as N > from pylab import * > t = N.arange[0,8*N.pi, 0.1] > y = N.sin(t) > > figure() > plot(t,y) > xticks(N.arange(0,8*N.pi, N.pi)) > > figure() > semilogx(t,y) > xticks(N.arange(0,8*N.pi, N.pi)) > > The first plot will work fine, and set the x-ticks to be multiples of > pi, as desired. > > However, the second plot does not work. I have verified this is the > case whenever log axes are used: you can't then set the x-ticks or > labels. > > Is this a bug or a design feature? It is neither. log(0) is not plottable, you need to pick more appropriate xticks. |