Re: [Matplotlib-users] creating colors for many plots

2014-05-08 Thread Nicolas Rougier
A colormap can be called like a function to get the colors associated to (normalized) values. In your example, it is called with uniformly spaced values (linspace) between 0 and 1. This should return the corresponding colors. print plt.get_cmap('gray')(0.0) (0.0, 0.0, 0.0, 1.0) print plt.get_

Re: [Matplotlib-users] Matplotlib for tiles - blank lines

2014-03-24 Thread Nicolas Rougier
If you do not draw at all (no pcolor call), do you still get transparent colors ? If yes, what is your .matplotlibrc ? Nicolas On 24 Mar 2014, at 11:49, Jesper Larsen wrote: > Thanks Pierre, > > from __future__ import division did not help me, I am using mpl 1.1.1rc. I > will try upgradi

Re: [Matplotlib-users] Choosing optimal figure width/height automatically

2013-10-17 Thread Nicolas Rougier
Would something like this suit your needs ? import matplotlib.pyplot as plt # Image size width,height = 640,480 # Pixel border around image border = 1 dpi = 72.0 figsize= (width+2*border)/float(dpi), (height+2*border)/float(dpi) fig = plt.figure(figsize=figsize, dpi=dpi, facecolor="white") hpi

Re: [Matplotlib-users] contourf() for "proper plotting purpose"

2013-05-22 Thread Nicolas Rougier
You can use the 'origin' keyword: pl.controuf(Matrix, origin='lower') or pl.controuf(Matrix, origin='upper') Nicolas On May 23, 2013, at 7:27 AM, Bakhtiyor Zokhidov wrote: > Hi, > > I have following code: > > import numpy as np > import pylab as pl > > Matrix(10,10) = > np.array([[ 4.

Re: [Matplotlib-users] matplotlib pnpoly-example-results-in-error

2013-05-10 Thread Nicolas Rougier
>From the matplotlib page, you can reach: http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html and just translates the function: def inside_polygon(p, vertices): vx,vy = vertices[:,0], vertices[:,1] x,y = p c = 0 j = len(vertices)-1 for i in xrange(len(verti

Re: [Matplotlib-users] How to start when you don't know what to do

2013-01-15 Thread Nicolas Rougier
I do exactly that from time to time (copying a graphic) and I always start looking at the matplotlib gallery (http://matplotlib.org/gallery.html) for what is the most similar figure and starts from here (after removing what is not necessary). Most important is identifying the kind of axis nece

Re: [Matplotlib-users] New tutorial (beginner level)

2012-08-11 Thread Nicolas Rougier
9:17 , Fernando Perez wrote: > On Sat, Aug 11, 2012 at 12:09 AM, Nicolas Rougier > wrote: >> By the way, I suspect the simple plot part may well suited for the ipython >> notebook ! >> I'll give it a try. > > Actually in the notebook it is now possible to enable exe

Re: [Matplotlib-users] New tutorial (beginner level)

2012-08-11 Thread Nicolas Rougier
Thanks Fernando ! By the way, I suspect the simple plot part may well suited for the ipython notebook ! I'll give it a try. Nicolas On Aug 11, 2012, at 4:55 , Fernando Perez wrote: > On Fri, Aug 10, 2012 at 5:23 AM, Nicolas Rougier > wrote: >> >> I've just

Re: [Matplotlib-users] New tutorial (beginner level)

2012-08-10 Thread Nicolas Rougier
these external resources. Do you have any objections to me > linking to this? > > Mike > > On 08/10/2012 08:23 AM, Nicolas Rougier wrote: >> >> Hi all, >> >> >> I've just finished a new introductory tutorial for incoming Euroscipy 2012. >&

Re: [Matplotlib-users] New tutorial (beginner level)

2012-08-10 Thread Nicolas Rougier
, Benjamin Root wrote: > > > On Fri, Aug 10, 2012 at 8:23 AM, Nicolas Rougier > wrote: > > > Hi all, > > > I've just finished a new introductory tutorial for incoming Euroscipy 2012. > You can find it here: > > http://www.loria.fr/~rougier/teac

Re: [Matplotlib-users] New tutorial (beginner level)

2012-08-10 Thread Nicolas Rougier
Thank you all, I will try to correct that. I developed it in full screen mode and did not paid attention to the layout. Nicolas On Aug 10, 2012, at 15:33 , Fabrice Silva wrote: > Le vendredi 10 août 2012 à 14:19 +0100, Damon McDougall a écrit : >> On Fri, Aug 10, 2012 at 09:10:15AM -0400, Benj

[Matplotlib-users] New tutorial (beginner level)

2012-08-10 Thread Nicolas Rougier
Hi all, I've just finished a new introductory tutorial for incoming Euroscipy 2012. You can find it here: http://www.loria.fr/~rougier/teaching/matplotlib/ It is based on Mike Müller tutorial from scipy lecture notes (http://scipy-lectures.github.com/intro/matplotlib/matplotlib.html) Sour

Re: [Matplotlib-users] need an icon for a new featureH

2012-07-18 Thread Nicolas Rougier
What size/format do you need and would that be an option to transform/use Tango icons ? http://tango.freedesktop.org/ http://commons.wikimedia.org/wiki/Tango_icons Tango (for fullscreen but might suit tight-layout) <> <> <> <> <> Nicolas On Jul 19, 2012, at 0:47 , Benjamin Root wrote

Re: [Matplotlib-users] Additional line styles - comparison excel chart

2012-07-16 Thread Nicolas Rougier
Here is a quick example that might help you: http://www.loria.fr/~rougier/coding/gallery/showcase/showcase-10-large.png http://www.loria.fr/~rougier/coding/gallery/showcase/showcase-10.py Nicolas On Jul 16, 2012, at 11:27 , Daπid wrote: > On Mon, Jul 16, 2012 at 11:09 AM, Benjamin Jonen w

Re: [Matplotlib-users] Accelerating PDF saved plots

2012-07-05 Thread Nicolas Rougier
Your files do not seem to be readable: http://atmos.uwyo.edu/~gsever/data/matplotlib/test_speed.py http://atmos.uwyo.edu/~gsever/data/matplotlib/test_speed.pdf Nicolas On Jul 4, 2012, at 19:17 , Gökhan Sever wrote: > Hello, > > I am working on creating some distribution plots to analyze cl

Re: [Matplotlib-users] tornado chart

2012-06-25 Thread Nicolas Rougier
I did it once and posted it to the list but never found the time to add it to the official gallery (my bad): http://www.loria.fr/~rougier/coding/gallery/showcase/showcase-3-large.png http://www.loria.fr/~rougier/coding/gallery/ Nicolas On Jun 23, 2012, at 5:36 , Benjamin Root wrote: >

Re: [Matplotlib-users] histogram and a line

2012-03-08 Thread Nicolas Rougier
You need to specify the ylim because your height may be larger than your histogram and then you cannot see it. Here is a script that reproduce your screenshot (with random data). import numpy as np import matplotlib.pyplot as plt plt.rc('xtick', direction = 'out') plt.rc('ytick', direction =

Re: [Matplotlib-users] Matplotlib gallery

2012-02-23 Thread Nicolas Rougier
e Vector Charts Statistical Charts Maybe we can find/agree on similar structure(s)/sub-structure(s) and adapt it to the current gallery ? Nicolas On Feb 23, 2012, at 16:59 , Jerzy Karczmarczuk wrote: > Nicolas Rougier : >> I've seen the discussion around the re-organization of the

[Matplotlib-users] Matplotlib gallery

2012-02-23 Thread Nicolas Rougier
I've seen the discussion around the re-organization of the matplotlib gallery. If that might help, here is a link to a small gallery I made. The overall organization is simply based on subdirectories so maybe it could be a (temporary) solution for the matplotlib gallery (just matter of moving

Re: [Matplotlib-users] Hardware rendering with tricontourf

2012-01-29 Thread Nicolas Rougier
Thanks for posting the link to glumpy. As Benjamin explained, glumpy servers as a testbed for various technics that could be implemented later in matplotlib. The main problem today is that if you want to benefit from hardware acceleration, you have to use some GL features that are not compati

Re: [Matplotlib-users] data free margin

2011-11-22 Thread Nicolas Rougier
Is that what you want ? No ticks, no labels: import matplotlib.pyplot as plt plt.plot(np.arange(10), np.arange(10)) plt.ylim(0,10) plt.yticks(np.linspace(3,10,8)) plt.show() Ticks but no labels: import matplotlib.pyplot as plt plt.plot(np.arange(10), np.arange(10)) plt.ylim(0,10) plt.yticks(n

Re: [Matplotlib-users] [ANN] glumpy 0.2.0

2011-09-18 Thread Nicolas Rougier
e glumpy has it too. > Can show the source code for the interactive plot in your examples ? > > thanks, > stef > > > On 17-09-2011 19:22, Nicolas Rougier wrote: >> >> >> Hi folks, >> >> I am pleased to announce a new release of glumpy, a small

[Matplotlib-users] [ANN] glumpy 0.2.0

2011-09-17 Thread Nicolas Rougier
Hi folks, I am pleased to announce a new release of glumpy, a small python library for the (very) fast vizualization of numpy arrays, (mainly two dimensional) that has been designed with efficiency in mind. If you want to draw nice figures for inclusion in a scientific article, you’d better us

[Matplotlib-users] [ANN] glumpy 0.2.0

2011-09-17 Thread Nicolas Rougier
Hi folks, I am pleased to announce a new release of glumpy, a small python library for the (very) fast vizualization of numpy arrays, (mainly two dimensional) that has been designed with efficiency in mind. If you want to draw nice figures for inclusion in a scientific article, you’d better us

Re: [Matplotlib-users] RuntimeError: CGContextRef is NULL

2010-10-04 Thread Nicolas Rougier
Thanks. Unfortunately wx and tk backends are broken on my machine (but they may be easier to fix). I will file a bug report for the native backend bug. Nicolas On Oct 4, 2010, at 22:27 , Friedrich Romstedt wrote: > 2010/10/4 Nicolas Rougier : >> I'm trying to have animat

[Matplotlib-users] RuntimeError: CGContextRef is NULL

2010-10-04 Thread Nicolas Rougier
I'm trying to have animated plots using draw_artist on mac os x and I got an error with the following script: import numpy as np import matplotlib.pyplot as plt plt.ion() plt.figure() subplot = plt.subplot(1,1,1) axis = plt.imshow(np.random.random((10,10))) plt.draw() subplot.draw_artist(axis)

Re: [Matplotlib-users] [Numpy-discussion] glumpy: fast OpenGL numpy visualization + matplotlib integration

2009-09-28 Thread Nicolas Rougier
28, 2009 at 9:06 AM, Nicolas Rougier > wrote: Hi all, glumpy is a fast OpenGL visualization tool for numpy arrays coded on top of pyglet (http://www.pyglet.org/). The package contains many demos showing basic usage as well as integration with matplotlib. As a reference, the animation script ava

[Matplotlib-users] glumpy: fast OpenGL numpy visualization + matplotlib integration

2009-09-28 Thread Nicolas Rougier
Hi all, glumpy is a fast OpenGL visualization tool for numpy arrays coded on top of pyglet (http://www.pyglet.org/). The package contains many demos showing basic usage as well as integration with matplotlib. As a reference, the animation script available from matplotlib distribution runs

Re: [Matplotlib-users] Simple 3D support

2008-11-28 Thread Nicolas Rougier
the > installation and what problems, if any, did you run into? And their fixes? > Thanks for the info. > > -- Lou Pecora, my views are my own. > > > --- On Thu, 11/27/08, Nicolas Rougier <[EMAIL PROTECTED]> wrote: > > > From: Nicolas Rougier <[EMAIL PROTECTE

[Matplotlib-users] Simple 3D support

2008-11-27 Thread Nicolas Rougier
Hi all, I've been working lately on 3d visualization for my own need and maybe the result may have some interest for some of you. I know there is already mlab/mayavi2/vtk that does a great job, but after having spent a lot of time trying to install all requirements, I headed for a very fa

Re: [Matplotlib-users] GTK pylab console

2008-06-27 Thread Nicolas Rougier
rather than just the standard > python shell, into your console to get autocompletion, fancier help > etc. I think the combination could be great. > > Thanks for sharing this, and keep us updated! > > Cheers, > Mike > > Nicolas Rougier wrote: > > Hi all, >

[Matplotlib-users] GTK pylab console

2008-06-27 Thread Nicolas Rougier
mples from matplotlib examples and they seem to be displayed properly. Any comments/requests are welcome. Nicolas Rougier. - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services