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