Re: [Matplotlib-users] colorbllind problem

2014-02-19 Thread Gabriele Brambilla
it works indexing the palette. thanks Gabriele 2014-02-18 13:57 GMT-05:00 Paul Hobson pmhob...@gmail.com: Try specifying the color explicitly from the palette object: import numpy as np import matplotlib.pyplot as plt import pandas import seaborn myPalet1 =

Re: [Matplotlib-users] colorbllind problem

2014-02-18 Thread Gabriele Brambilla
it works, thank you. Using a color palette that changes only the intensity/light of the color (all blue lines) helps. Gabriele 2014-02-17 20:57 GMT-05:00 Paul Hobson pmhob...@gmail.com: Untested, of course, but I would do something like this: import matplotlib.pyplot as plt import seaborn

Re: [Matplotlib-users] colorbllind problem

2014-02-18 Thread Gabriele Brambilla
Hi, I get right one plot, but this other one works in a strange way: it restarts to give the darker color to a line. I would like to assign the colors in the right order so the colorblind guy that works with me could see the differences like a light growing. (I attach the image) do you understand

Re: [Matplotlib-users] colorbllind problem

2014-02-18 Thread Paul Hobson
Try specifying the color explicitly from the palette object: import numpy as np import matplotlib.pyplot as plt import pandas import seaborn myPalet1 = seaborn.color_palette(RdPu_r, 10) seaborn.set_color_palette(myPalet1) x = np.linspace(start=0, stop=5, num=100) fig, ax = plt.subplots() for n,

Re: [Matplotlib-users] colorbllind problem

2014-02-17 Thread ChaoYue
Hi Gabriele, I'm afraid you have to put the numbers by yourself using the plt.text, as in an example: a = np.arange(10) b = np.tile(a,(10,1)) c = np.tile(a[:,np.newaxis],(10)) + b plot(c) for i in range(10): plt.text(5,c[i][5],str(i)) I've askd by a review to use the colorblind compatible

Re: [Matplotlib-users] colorbllind problem

2014-02-17 Thread Adam Hughes
I'm wondering if the matplotlib API is designed in such a way that choosing a color schema could be done at import time. I know that the entire plot style can be changed in one call (eg put plt.xkcd() at the beginning of your code), so I wander if colorblind-compatible colors could be loaded in a

Re: [Matplotlib-users] colorbllind problem

2014-02-17 Thread Paul Hobson
Adam, Look into the seaborn project: http://nbviewer.ipython.org/github/mwaskom/seaborn/blob/master/examples/aesthetics.ipynb it's easy enough to define your own color palettes or select existing ones. -paul On Mon, Feb 17, 2014 at 11:41 AM, Adam Hughes hughesada...@gmail.comwrote: I'm

Re: [Matplotlib-users] colorbllind problem

2014-02-17 Thread Scott Lasley
On Feb 17, 2014, at 1:15 PM, Gabriele Brambilla gb.gabrielebrambi...@gmail.com wrote: Hi, I'm dealing with a guy that is colorblind. Have you got any suggestion on how could I show a plot like the one attached to him? Is there an option in pyplot that write little numbers near the curves

Re: [Matplotlib-users] colorbllind problem

2014-02-17 Thread C M
On Mon, Feb 17, 2014 at 1:15 PM, Gabriele Brambilla gb.gabrielebrambi...@gmail.com wrote: Hi, I'm dealing with a guy that is colorblind. Have you got any suggestion on how could I show a plot like the one attached to him? Is there an option in pyplot that write little numbers near the

Re: [Matplotlib-users] colorbllind problem

2014-02-17 Thread Gabriele Brambilla
Hi, I would like to set the color of the different plots with seaborn but I don't find examples of this kind on the tutorial. How could I modify this code? the zip() arguments are lists of the same dimension. zipPARA = zip(As, GAMMAs, EcutS, Bees, angles) lotgr = plt.figure() axius =

Re: [Matplotlib-users] colorbllind problem

2014-02-17 Thread Paul Hobson
Untested, of course, but I would do something like this: import matplotlib.pyplot as plt import seaborn N = len(As) myPallette = seaborn.color_palette(skyblue, N) # use the name of any mpl colormap here seaborn.set_color_pallette(myPallette) zipPARA = zip(As, GAMMAs, EcutS, Bees, angles)