Re: [Matplotlib-users] help with matplotlib.path class

2008-10-30 Thread Amitava Maity
Thanks, vlines is definitely the better option. By the way, I am using the Enthought python distribution for Windows. I could not get the desired output from the ipython -pylab shell. But the same code when run in SciTe and IDLE gave the desired output. On Thu, 30 Oct 2008 Michael Droettboo

Re: [Matplotlib-users] help with matplotlib.path class

2008-10-30 Thread Michael Droettboom
The limits don't get automatically adjusted when using add_patch(). You could do something like: plt.gca().set_xlim(min([x for x, y in vertices]), max([x for x, y in vertices])) plt.gca().set_ylim(min([y for x, y in vertices]), max([y for x, y in vertices])) Again, vlines will do all this for

Re: [Matplotlib-users] help with matplotlib.path class

2008-10-30 Thread Amitava Maity
Thanks, Being a novice, I am trying the first thing in the example gallery that caught my eye. Vlines does seem to be a better option. But what's puzzling me is why do I get just a plot of the axes with the following code? Where are the vertical lines that I am looking for? from matplotlib

Re: [Matplotlib-users] help with matplotlib.path class

2008-10-30 Thread Michael Droettboom
If your first tuple is "codes", and second is "vertices", You can do: from matplotlib import path from matplotlib import patches from matplotlib import pyplot as plt patch = patches.PathPatch(path.Path(vertices, codes)) plt.gca().add_patch(patch) plt.show() However... rather than going through

[Matplotlib-users] help with matplotlib.path class

2008-10-30 Thread Amitava Maity
Hello list, I have generated the following tuples: (1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2) ((39525.5401, 144.91), (39525.5401, 161.352), (39874.5, 149.5), (39874.5, 166.142), (40205.0, 150.41), (40205.0, 167.051999), (40518.4497, 149.360

Re: [Matplotlib-users] Event handling, API programming

2008-10-30 Thread Adam
On Wed, Oct 29, 2008 at 11:19 PM, Anthony Floyd <[EMAIL PROTECTED]> wrote: > Hi Adam, > > On Sun, Oct 26, 2008 at 4:34 PM, Adam <[EMAIL PROTECTED]> wrote: >> Hi, I'm trying to make myself a set of widgets for the first time. >> I've gotten to the point that I can draw rectangles and lines and make

Re: [Matplotlib-users] Masking with patches

2008-10-30 Thread Pierre GM
Søren, Why wouldn't you allocate a 'zorder' to each mask, corresponding to a layer nb. That way, if a same pixel is shared by 2 masks or more, you take the one with the highest zorder. That could be done as easily as definind a `maskstack` list, with element `i` the mask with zorder `i`. Now, th

Re: [Matplotlib-users] no canvas reinitialization between calls to savefig

2008-10-30 Thread Michael Droettboom
I can't reproduce this here with SVN trunk. I get what you expect. Can you provide the information outlined here: http://matplotlib.sourceforge.net/faq/troubleshooting_faq.html#report-a-problem as well as the backend you are using? Cheers, Mike Thomas Pfaff wrote: > Hello, > > I'm having a pr

[Matplotlib-users] Cannot get non bold fonts

2008-10-30 Thread kaeguri
Hi, I am trying to get the fonts in the plots to be exactly like LaTeX would give me in math mode using the \mathrm command. So I set up the text to be in serif but still the font is too bold, I tried to play with weight but I see no difference at all. In the following short example http://www.n

Re: [Matplotlib-users] How to plot only points which lie in a certain range

2008-10-30 Thread Pierre GM
On Monday 27 October 2008 18:40:07 marcusantonius wrote: > I'm sorry for this newbie question. I have a data file consisting of 3 > columns, and want to plot the first versus the second column, but only if > the parameter in the third column lies in a certain range. Does somebody > have an idea how

[Matplotlib-users] Odd problem when saving to eps/ps

2008-10-30 Thread James Price
Hi I am using Python 2.4.4, Numpy 1.1.1 and Pylab 0.98.3 and have a problem with saving to eps. Basically I create 7 plots, each with 2 subplots of which one is an imshow colour map and the second is a simple plot(). When saving them to eps I can display 5 out of 7 with ghostview but 2 of them f

[Matplotlib-users] savefig doesn't clear canvas

2008-10-30 Thread Thomas Pfaff
Hello, I started off with the Polygon plotting example of the basemap toolkit as I want to visualize Radar data with GoogleEarth. I have a polygon shapefile and another data file in which I have one value for each of the polygons. I do the basemap.read_shapefile and the axes.add_patch stuff once i

[Matplotlib-users] Solution to pylab import problem

2008-10-30 Thread Andre Smit
The problem was exposed by running python -c "import pylab" from the command shell. A message box indicated that msvcp71.dll was missing. I copied this file to my python25 folder and it fixed the problem. Note - it didn't help to copy the missing file to the windows\system32 folder or even

[Matplotlib-users] pylab import problem

2008-10-30 Thread Andre Smit
FYI pylab fails to import on Windows Server 2008. I'm using the latest installs of numpy, scipy and matplotlib. >>> from pylab import * Traceback (most recent call last): File "", line 1, in File "C:\Python25\Lib\site-packages\pylab.py", line 1, in from matplotlib.pylab import

[Matplotlib-users] no canvas reinitialization between calls to savefig

2008-10-30 Thread Thomas Pfaff
Hello, I'm having a problem reusing a figure with the savefig command. I want to generate image timeseries with GoogleEarth displaying weather radar data, so my plot geometry is the same always and only the color of the patches which represent measurements changes over time. Now I want those porti