Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Rightclick on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: Jonny Milliken <thinkingmansopium@gm...>  20110819 17:07:42

Hi, I am having some trouble establishing how to use matplotlib.scale.SymmetricalLogScale() to draw a log scale on the positive and negative axis of a plot. Assuming of course that is the correct way to go about it The code at the moment I am looking at goes something like this, with arbitrary data generated. I need SubplotHost for parasite axis later on. <><><> import matplotlib import pylab import numpy from mpl_toolkits.axes_grid.parasite_axes import SubplotHost fig = pylab.figure(1) main = SubplotHost(fig,111) fig.add_subplot(main) x,y = [] for i in range(100): y.append(numpy.random.rand()) y.append(numpy.random.rand()) y.append(numpy.random.rand() * 100) y.append(numpy.random.rand() * 100) x = range(len(y)) main.plot(x,y) <><><> At this point I was expecting to be able to run with SymmetricalLogScale in the same way main.set_yscale('log') transforms after the plot but could not work out how to transform it other than: <><><> main.yaxis = matplotlib.scale.SymmetricalLogScale(main.yaxis) <><><> But that obviously didnt work, since SymmetricalLogScale doesnt have get_scale If anyone could shed some light on the way to invoke this I'd be much obliged!? I havent been able to find an example of it's usage anywhere Cheers Jonny 