[Matplotlib-users] Ploting a sparse matrix with imshow

2012-02-19 Thread Jose Guzman
Dear matplotlib users, I am trying to plot a nxn symetric matrix containing zeros (in white) and ones (in black). Quite simple, I guessed. For that I use imshow as follows: >>> imshow(W, cmap=cm.binary) # W is a Numpy Array with shape (100,100) However, this does not work the way i would lik

[Matplotlib-users] Distance between y-x digits and the corresponding labels

2011-02-18 Thread Jose Guzman
Hi everybody is there anybody to set the distance between the x/y axis numbers and the corresponding axis labels. I found the default distance is rather small, and I would like to enlarge it. I was playing around in .matplolibrc but I did not find anything useful. Any suggestion?? Thanks in

[Matplotlib-users] Adding 2 Line2D objects to a Subplot

2010-12-20 Thread Jose Guzman
Hi everybody I wanted to collect a combination of plots to insert then in a subplot. I choose to create Line2D objects to use the .add_line() method of the AxesSubplot class, but unfortunately this does lead to the desired results. Here my dummy version: from matplotlib.lines import Line2D f

[Matplotlib-users] using plot(single_object)

2010-12-12 Thread Jose Guzman
I was wondering if there is an easy way to combine two vectors (x and y) into a single object to be ploted with the plot() method in matplotlib. Untill now, I did something like: import matplotlib.pyplot as plt x = np.nplinspace(0,5,1000) y = np.ones_like(x) plt.plot(x,y) # need an object here

[Matplotlib-users] To modify 'extend' in a 2D plot

2010-05-26 Thread Jose Guzman
Dear Matplotlib users, I need to plot a (time x distance) array of measurements associated with a color bar. Although time is fixed (i.e 0, 1, 2, etc..), to the number of rows, the distances are not evenly distributed (e.g are fixed to 1.22, 1.53, 1.84, 2,11.), although are always constant. My