Re: [Matplotlib-users] Key events using nbagg backend

2014-12-05 Thread Joe Kington
Woops! You're absolutely right! I was completely confused! I mixed up the new "nbagg" backend with the way ipython notebooks used to display matplotlib figures. The nbagg backend is indeed interactive (and I have no idea why key press callbacks aren't supported, then). This is what happens when

Re: [Matplotlib-users] Patch + facecolors

2014-12-05 Thread Benjamin Root
I am a bit confused. Your variable is "TRI", but you keep saying rectangles. You are also referring to unstructured rectangles, which makes zero sense to me. Do you mean triangles? If you, matplotlib has the "tri-" family of functions and a whole module devoted to triangulation-related tasks: http

Re: [Matplotlib-users] Patch + facecolors

2014-12-05 Thread Sappy85
Hi diedro, try something like this: import matplotlib.patches as patches import matplotlib.pyplot as plt fig= plt.figure() ax= fig.add_subplot(111) verts = [0.2,0.8], [0.1,0.5], [0.7,0.1] poly = patches.Polygon(verts, ec='r', fc='g') ax.add_patch(poly) plt.show()

Re: [Matplotlib-users] Pyplot contour plot - clabel padding

2014-12-05 Thread Sappy85
Hi Jody, i have posted the code. Here again: import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt from mpl_toolkits.basemap import Basemap import pygrib filename = "file.grib2" grbs = pygrib.open('/data/' + filename) grb= grbs[2] data = grb.values datac

Re: [Matplotlib-users] Pyplot contour plot - clabel padding

2014-12-05 Thread Jody Klymak
I meant plt.xlim and plt.ylim. But its hard to tell what the problem is w/o some sample code. Cheers, Jody > On Dec 5, 2014, at 1:07 AM, Sappy85 wrote: > > Hi Jody, > > what exactly du you mean - the plot windows size? > > I tried this: > fig = plt.figure(figsize=(8.4,5.76)) > > But sti

[Matplotlib-users] Patch + facecolors

2014-12-05 Thread Diego Avesani
Dear matplotlib users, I would like to know if there is in matplotlib the following Matlab function: *p=patch(x(TRI'),y(TRI'),u(TRI'),u(TRI'));* *set(p,'FaceColor','interp','EdgeColor','black');* where TRI are the coordinate of many non regular rectangles. I would like to do that because I hav

Re: [Matplotlib-users] Pyplot contour plot - clabel padding

2014-12-05 Thread Sappy85
Hi Jody, what exactly du you mean - the plot windows size? I tried this: fig = plt.figure(figsize=(8.4,5.76)) But still the same problem. Regards -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Pyplot-contour-plot-clabel-padding-tp44554p44557.html Sent from the mat