On Sat, May 24, 2008 at 6:02 PM, Olle Engdegård <olle@...> wrote:
> I very much miss the 'l' shortcut for toggling log/lin y-scale in the
> trunk! I use it a lot.
> I suggest restoring it with something like
> if self.get_yscale() is ("log" or "linear"):
> else: pass
> I think most of time most people use log or linear scales.
This seems reasonable, but when I tried to implement it it looked like
the nan mask for the simple_plot.py example was sticky, eg when I
toggled back to linear the negative values were still masked. I tried
a simpler example still (all positive y data) and got something very
strange: the plotted y values appear to change on a toggle from log
and back to linear:
In : import matplotlib.pyplot as plt
In : plt.close('all')
In : ax = plt.subplot(111)
In : ax.plot(np.random.rand(20))
Out: [<matplotlib.lines.Line2D object at 0x123082f0>]
In : ax.set_yscale('linear'); ax.figure.canvas.draw()
In : ax.set_yscale('log'); ax.figure.canvas.draw()
In : ax.set_yscale('linear'); ax.figure.canvas.draw() # the y
data are now plotted differently
I am not sure what is going on yet, but I'm sure Michael will chime in
since I think we are seeing some funkiness in the new transforms and
> The new hist() function looks really good, I especially welcome the "step"
> mode. A couple of comments:
> The latest svn incarnation doesn't allow for log scale in step-mode
> (unless you set it manually).
> Also, I think the step-mode should have fill=False as default, otherwise
> it does not look that much different from bar-mode. The nice thing about
> step histograms is that you can put several of them in the same plot while
> keeping it intelligible!
Manuel is the developer behind these nice new changes to hist --
hopefully he can help you here.