[Matplotlib-users] corrupt pdf of histogram

2012-03-28 Thread sanders
Dear all, I'm making histograms: If keywords fill=False and log=True, then after saving, the png looks fine but the histogram in the pdf is mixed up. Anyone knows about this? Bram ### Script ### import matplotlib.pyplot as plt import numpy as np data = np.random.normal(size=1000) ###

[Matplotlib-users] set ncol for legend

2011-02-08 Thread sanders
Hi, I want to update the number of columns in my legend. How should I do that? I'm looking for something like: fig = plt.figure() ax = fig.add_subplot(111) my_own_plot_function(ax, data)# gives, for example, one column legend by default legend = ax.get_legend() /legend.set_ncol(2)/

Re: [Matplotlib-users] set ncol for legend

2011-02-08 Thread sanders
I realize that I have not been clear enough. I have already created a legend instance in my_own_plot_function, for example, a legend with one column by default: fig = plt.figure() ax = fig.add_subplot(111) my_own_plot_function(ax, data)# gives, for example, one column legend by default So

Re: [Matplotlib-users] Problem with simple use of draw() in animations of arrays

2009-11-09 Thread David Sanders
On Mon, Nov 2, 2009 at 11:51 PM, Jae-Joon Lee lee.j.j...@gmail.com wrote: On Mon, Nov 2, 2009 at 10:52 PM, David Sanders dpsand...@gmail.com wrote: from pylab import * ion() N = 1000 pos = zeros((N,2)) figure(figsize=(8,8)) points, = plot(pos[:,0], pos[:,1], ',') axis

[Matplotlib-users] Problem with simple use of draw() in animations of arrays

2009-11-02 Thread David Sanders
Hi, I have a problem with draw() to do simple animations of the contents of arrays in matplotlib. I was trying to use the idea in the animations cookbook ( http://www.scipy.org/Cookbook/Matplotlib/Animations) to animate some random walkers, but found that the animation did not work. A minimal