From: Ben W. <zo...@pa...> - 2005-03-24 04:53:22
|
I have the need to make a pcolor loglog plot. Unfortunately I can't figure out how - as near as I can tell it's impossible, pcolor loglog just plain isn't supported. It seems like the ability to logify arbitrary axes would be a good idea (there's got to be *somebody* out there who wants a semilog polar projection) but I can't find it anywhere. Suggestions? Right now my best idea is to do the log transformation myself (eww) and then modify the axis legend (eww). The following code was a vague attempt to force pcolor to use loglog scale, but it crashes with the message "Aborted" - seems like a suboptimal error message. I should point out that I'm currently using 0.72.1 since updating the corporate version would take a little work, but I haven't seen anything in the 0.73.1 docs that imply that's changed. So if it has, lemme know and I'll go get someone to update. :) #!/usr/bin/python from matplotlib import pylab import Numeric as Numeric import math as math def main(argv): pylab.loglog([1,100],[1,100]) pylab.pcolor( Numeric.array( [ [ x + y for x in range(100) ] for y in range(100) ] ), shading = "flat" ) pylab.savefig("/home/zorba/stats/color.png") return -Ben |