Re: [Matplotlib-users] Color a line segment as a gradient?

2011-09-30 Thread Eric Firing
On 09/30/2011 09:12 AM, John Hunter wrote: > On Thu, Sep 29, 2011 at 11:56 PM, Uri Laserson wrote: >> Hi all, >> Does anyone have a good solution for taking a line segment and coloring it >> according to some gradient (where the start and end colors are the only two >> things specified for the lin

Re: [Matplotlib-users] Color a line segment as a gradient?

2011-09-30 Thread John Hunter
On Thu, Sep 29, 2011 at 11:56 PM, Uri Laserson wrote: > Hi all, > Does anyone have a good solution for taking a line segment and coloring it > according to some gradient (where the start and end colors are the only two > things specified for the line coloring)? This example shows how to apply a c

[Matplotlib-users] matplotlib - fill open path inside U.S. borders + sample map

2011-09-30 Thread Isidora
Hi Jeff, I computed the convex hull for the points in paths returned by Basemap.drawcountries() and I got the attached map (convex hull algorithm: http://www.scipy.org/Cookbook/Finding_Convex_Hull). You can see the magenta convex hull polygon with U.S. border lines drawn in black as a reference

[Matplotlib-users] Showing a background image behind a plot_date line

2011-09-30 Thread jean-michel bain-cornu
Hi, I'd like to show a background image after plotting dates. I use imshow, which works, but makes the plotted line erased. If somebody can help, it would be valuable. thanks in advance jm Here is the code. If the line "ax.imshow(img,alpha=0.5)" is commented out, the graph is correctly displayed.

Re: [Matplotlib-users] matplotlib 3D: equivalent to Matlab patch()?

2011-09-30 Thread Holger Brandsmeier
> That is why you have to work with the 3D objects from > mpl_toolkits.mplot3d.art3d directly. There isn't a lot of documentation, so > your best bet is to look at the source code of the module. Indeed, I was able to extract the necessary pieces from the source code. In fact I split the function

[Matplotlib-users] Python Job Opening at TWDB.

2011-09-30 Thread Dharhas Pothina
Hi All, Sorry for cross posting, I know there is a large overlap in these three mailing lists. We have an opening in my team for a full time temporary employee. This position has current funding for the next 6-9 months with additional federal funding arriving in the Spring that should allo

[Matplotlib-users] hatching using stripes

2011-09-30 Thread Michiel de Hoon
Dear all, I am trying to draw a bar graph in which the bars are filled with a striped pattern rather than a solid color. For example an alternating pattern of red and yellow stripes with an equal width, at a 45 degree angle with respect to the bar. Is there some easy way to do this in matplotli

Re: [Matplotlib-users] matplotlib 3D: equivalent to Matlab patch()?

2011-09-30 Thread Benjamin Root
On Thu, Sep 29, 2011 at 4:31 PM, Holger Brandsmeier < holger.brandsme...@sam.math.ethz.ch> wrote: > Hi Ben, > > in your example > > http://matplotlib.sourceforge.net/examples/mplot3d/polys3d_demo.html > the essential line is: > ax.add_collection3d(poly, zs=zs, zdir='y') > according to everything

Re: [Matplotlib-users] matplotlib 3D: interpolated shading

2011-09-30 Thread Benjamin Root
On Fri, Sep 30, 2011 at 4:27 AM, Holger Brandsmeier < holger.brandsme...@sam.math.ethz.ch> wrote: > Dear List, > > is it possible to not only assign once color per polygon that is > plotted, but one color for each vertex, so that the result looks like > a properly smooth function. Even if I sample

Re: [Matplotlib-users] how would you do this (animated bargraph) (Neal Becker)

2011-09-30 Thread Neal Becker
David Hoese wrote: > Neal, > > I do something similar to this where data that I'm plotting in a 2D line > plot comes from a UDP socket and some memory mapped files. To > accomplish the live updating I have a mix of your #2 and #3. I have a > main GUI thread that displays the plots, then I have

Re: [Matplotlib-users] 1d plot of a discontinuous function

2011-09-30 Thread Benjamin Root
2011/9/30 Александров Петр > How to make a plot of a discontinuous 1d function without line at a > function jump. An example is shown on a picture. This was plotted by: > import numpy > from matplotlib import pyplot > x = numpy.linspace(-1.0, 1.0, 100) > y = numpy.sign(x) * numpy.cos(x) > axes =

Re: [Matplotlib-users] 1d plot of a discontinuous function

2011-09-30 Thread Sebastian Berg
Hey, On Fri, 2011-09-30 at 17:31 +0400, Александров Петр wrote: > How to make a plot of a discontinuous 1d function without line at a > function jump. An example is shown on a picture. This was plotted by: > import numpy > from matplotlib import pyplot > x = numpy.linspace(-1.0, 1.0, 100) > y = nu

Re: [Matplotlib-users] 1d plot of a discontinuous function

2011-09-30 Thread Fabrice Silva
Le vendredi 30 septembre 2011 à 17:31 +0400, Александров Петр a écrit : > How to make a plot of a discontinuous 1d function without line at a > function jump. An example is shown on a picture. This was plotted by: > import numpy > from matplotlib import pyplot > x = numpy.linspace(-1.0, 1.0, 100) >

Re: [Matplotlib-users] how would you do this (animated bargraph) (Neal Becker)

2011-09-30 Thread David Hoese
Neal, I do something similar to this where data that I'm plotting in a 2D line plot comes from a UDP socket and some memory mapped files. To accomplish the live updating I have a mix of your #2 and #3. I have a main GUI thread that displays the plots, then I have a second thread that gets da

[Matplotlib-users] how would you do this (animated bargraph)

2011-09-30 Thread Neal Becker
I just put together an animated bargraph to show results from a realtime process. I used this as an example: http://matplotlib.sourceforge.net/examples/animation/animation_blit_qt4.html The tricky part for me was that in the original design, there was a realtime process running. I have to writ

[Matplotlib-users] matplotlib 3D: interpolated shading

2011-09-30 Thread Holger Brandsmeier
Dear List, is it possible to not only assign once color per polygon that is plotted, but one color for each vertex, so that the result looks like a properly smooth function. Even if I sample the points closely enough, in the current approach in almost all of your examples you always see the underl

Re: [Matplotlib-users] Customizing the Navigation toolbar

2011-09-30 Thread Nils Wagner
On Thu, 29 Sep 2011 14:56:21 +0200 "Nils Wagner" wrote: > Hi all, > > How can I add a printer button to the Navigation toolbar > http://matplotlib.sourceforge.net/users/navigation_toolbar.html > ? > > A small example for QT would be awesome. > > Thanks in advance. > > Nils > How can I a