You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(12) |
Sep
(12) |
Oct
(56) |
Nov
(65) |
Dec
(37) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(59) |
Feb
(78) |
Mar
(153) |
Apr
(205) |
May
(184) |
Jun
(123) |
Jul
(171) |
Aug
(156) |
Sep
(190) |
Oct
(120) |
Nov
(154) |
Dec
(223) |
| 2005 |
Jan
(184) |
Feb
(267) |
Mar
(214) |
Apr
(286) |
May
(320) |
Jun
(299) |
Jul
(348) |
Aug
(283) |
Sep
(355) |
Oct
(293) |
Nov
(232) |
Dec
(203) |
| 2006 |
Jan
(352) |
Feb
(358) |
Mar
(403) |
Apr
(313) |
May
(165) |
Jun
(281) |
Jul
(316) |
Aug
(228) |
Sep
(279) |
Oct
(243) |
Nov
(315) |
Dec
(345) |
| 2007 |
Jan
(260) |
Feb
(323) |
Mar
(340) |
Apr
(319) |
May
(290) |
Jun
(296) |
Jul
(221) |
Aug
(292) |
Sep
(242) |
Oct
(248) |
Nov
(242) |
Dec
(332) |
| 2008 |
Jan
(312) |
Feb
(359) |
Mar
(454) |
Apr
(287) |
May
(340) |
Jun
(450) |
Jul
(403) |
Aug
(324) |
Sep
(349) |
Oct
(385) |
Nov
(363) |
Dec
(437) |
| 2009 |
Jan
(500) |
Feb
(301) |
Mar
(409) |
Apr
(486) |
May
(545) |
Jun
(391) |
Jul
(518) |
Aug
(497) |
Sep
(492) |
Oct
(429) |
Nov
(357) |
Dec
(310) |
| 2010 |
Jan
(371) |
Feb
(657) |
Mar
(519) |
Apr
(432) |
May
(312) |
Jun
(416) |
Jul
(477) |
Aug
(386) |
Sep
(419) |
Oct
(435) |
Nov
(320) |
Dec
(202) |
| 2011 |
Jan
(321) |
Feb
(413) |
Mar
(299) |
Apr
(215) |
May
(284) |
Jun
(203) |
Jul
(207) |
Aug
(314) |
Sep
(321) |
Oct
(259) |
Nov
(347) |
Dec
(209) |
| 2012 |
Jan
(322) |
Feb
(414) |
Mar
(377) |
Apr
(179) |
May
(173) |
Jun
(234) |
Jul
(295) |
Aug
(239) |
Sep
(276) |
Oct
(355) |
Nov
(144) |
Dec
(108) |
| 2013 |
Jan
(170) |
Feb
(89) |
Mar
(204) |
Apr
(133) |
May
(142) |
Jun
(89) |
Jul
(160) |
Aug
(180) |
Sep
(69) |
Oct
(136) |
Nov
(83) |
Dec
(32) |
| 2014 |
Jan
(71) |
Feb
(90) |
Mar
(161) |
Apr
(117) |
May
(78) |
Jun
(94) |
Jul
(60) |
Aug
(83) |
Sep
(102) |
Oct
(132) |
Nov
(154) |
Dec
(96) |
| 2015 |
Jan
(45) |
Feb
(138) |
Mar
(176) |
Apr
(132) |
May
(119) |
Jun
(124) |
Jul
(77) |
Aug
(31) |
Sep
(34) |
Oct
(22) |
Nov
(23) |
Dec
(9) |
| 2016 |
Jan
(26) |
Feb
(17) |
Mar
(10) |
Apr
(8) |
May
(4) |
Jun
(8) |
Jul
(6) |
Aug
(5) |
Sep
(9) |
Oct
(4) |
Nov
|
Dec
|
| 2017 |
Jan
(5) |
Feb
(7) |
Mar
(1) |
Apr
(5) |
May
|
Jun
(3) |
Jul
(6) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2025 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Fernando P. <fpe...@gm...> - 2012-08-11 07:18:20
|
On Sat, Aug 11, 2012 at 12:09 AM, Nicolas Rougier <Nic...@in...> 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 exercises, hints, reveal-boxes, etc. I'm cc'ing here Matthias Bussonnier b/c I'm not sure if he's on the mpl list. He's one of our recent core devs who is behind a lot of our new JS magic in the notebook, and he's also a French scientist who will be at Euroscipy, so you guys could perhaps touch bases (I'm unfortunately not going to make it this year). Ultimately we'd like to make it very easy to write tutorials such as yours directly as notebooks, so that when used in the classroom students can work straight off them, and yet also publish then with clean and customizable HTML on the web like you did. Lots of the pieces are in place, though not quite all yet :) Cheers, f |
|
From: Nicolas R. <Nic...@in...> - 2012-08-11 07:09:11
|
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 > <Nic...@in...> wrote: >> >> I've just finished a new introductory tutorial for incoming Euroscipy 2012. You can find it here: >> >> http://www.loria.fr/~rougier/teaching/matplotlib/ > > Wow! Other than the rendering glitches already mentioned, this is > *awesome*. We're teaching a python workshop at UC Berkeley in 2 weeks > (http://register.pythonbootcamp.info) and I just suggested we use this > for our mpl intro. > > It's the best one I've seen so far, and the reference info at the > bottom as well as the mini-gallery will make it a very useful resource > even for seasoned users. > > Fantastic job, Nicolas (and Mike M.), and thanks for sharing this > great resource! > > Cheers, > > f |
|
From: Fernando P. <fpe...@gm...> - 2012-08-11 02:55:44
|
On Fri, Aug 10, 2012 at 5:23 AM, Nicolas Rougier <Nic...@in...> wrote: > > I've just finished a new introductory tutorial for incoming Euroscipy 2012. You can find it here: > > http://www.loria.fr/~rougier/teaching/matplotlib/ Wow! Other than the rendering glitches already mentioned, this is *awesome*. We're teaching a python workshop at UC Berkeley in 2 weeks (http://register.pythonbootcamp.info) and I just suggested we use this for our mpl intro. It's the best one I've seen so far, and the reference info at the bottom as well as the mini-gallery will make it a very useful resource even for seasoned users. Fantastic job, Nicolas (and Mike M.), and thanks for sharing this great resource! Cheers, f |
|
From: Damon M. <dam...@gm...> - 2012-08-10 20:28:08
|
On Fri, Aug 10, 2012 at 12:47:22PM +0100, Damon McDougall wrote: > On Fri, Aug 10, 2012 at 02:09:39PM +0530, satish maurya wrote: > > Dear All, > > > > I want to stairs plot (similar in matlab) matplotlib > > First i want for i data-set then multiple data-set super impose on that. > > I attach the figure it's showing velocity-depth stairs plots for > > superimpose (like hold on in matlab) > > large data-set. > > can anybody tell me how to plot that. > > > > I'm not sure I understand what you're asking. Are you asking how to make > a stairplot, or are you asking how to make *multiple* plots on one set > of axes? > > If your question is the former, matplotlib does not currently have a > stairplot implementation, but it wouldn't be hard to use the usual > plot() function to achieve the desired effect: > Actually, I discovered today that this is possible. You can use step() to achieve what you want: http://matplotlib.sourceforge.net/examples/pylab_examples/step_demo.html > > Before: > > x = arange(0, 10, 1) > y = x * (10.0 - x) > plot(x, y) > > After: > > x = arange(0, 10, 1) > x_m = x - 0.5 # left-hand midpoints > x_p = x + 0.5 # right-hand midpoints > y = x * (10.0 - x) > x_all = dstack((x_m, x, x_p)).flatten() > y_all = dstack((y, y, y)).flatten() > plot(x_all, y_all) > > If your question is the latter, you can toggle the hold state just by > calling > > hold() > > Hope this helps. > > > > > see the figure > > > > Thank you > > > > -- > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > *Satish Maurya* > > *Research Scholar* > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > -- > Damon McDougall > http://damon-is-a-geek.com > B2.39 > Mathematics Institute > University of Warwick > Coventry > West Midlands > CV4 7AL > United Kingdom -- Damon McDougall http://damon-is-a-geek.com B2.39 Mathematics Institute University of Warwick Coventry West Midlands CV4 7AL United Kingdom |
|
From: Nicolas R. <Nic...@in...> - 2012-08-10 15:46:30
|
Not at all of course. Glad this might be of some help for matplolib. Nicolas On Aug 10, 2012, at 16:03 , Michael Droettboom wrote: > Very nice. I'm thinking of some ideas to revamp the > documentation/website, and one thing I would like to do is to link to > some of 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. 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) >> >> Sources are available from: https://github.com/rougier/scipy-lecture-notes/tree/euroscipy-2012 >> >> >> If you've any comments or see errors... >> >> >> >> Nicolas >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Nicolas R. <Nic...@in...> - 2012-08-10 15:44:59
|
Thanks, just forgot about the license. It will be the same as the scipy lecture notes which is a Creative Commons Attribution 3.0 United States License (CC-by) http://creativecommons.org/licenses/by/3.0/us Would that be ok or is a BSD one more suited ? Nicolas On Aug 10, 2012, at 15:10 , Benjamin Root wrote: > > > On Fri, Aug 10, 2012 at 8:23 AM, Nicolas Rougier <Nic...@in...> 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/teaching/matplotlib/ > > > It is based on Mike Müller tutorial from scipy lecture notes (http://scipy-lectures.github.com/intro/matplotlib/matplotlib.html) > > Sources are available from: https://github.com/rougier/scipy-lecture-notes/tree/euroscipy-2012 > > > If you've any comments or see errors... > > > > Nicolas > > Nice work. I haven't read through all of it yet, but I did notice a layout issue in firefox (using 10.0.4). Many of the code snippets are being placed on top of the example image. > > What is the license for this tutorial? You should also place some copyright info at the bottom as well. > > Cheers! > Ben Root > |
|
From: Nicolas R. <Nic...@in...> - 2012-08-10 15:42:45
|
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, Benjamin Root wrote: >>> >>> Nice work. I haven't read through all of it yet, but I did notice a layout >>> issue in firefox (using 10.0.4). Many of the code snippets are being >>> placed on top of the example image. >> >> I see this behaviour too, on Chrome, version 20.0.1132.57. > > Same on epiphany 3.4.2 (webkit 1.8.1) > > -- > Fabrice Silva > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Michael D. <md...@st...> - 2012-08-10 14:03:12
|
Very nice. I'm thinking of some ideas to revamp the documentation/website, and one thing I would like to do is to link to some of 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. 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) > > Sources are available from: https://github.com/rougier/scipy-lecture-notes/tree/euroscipy-2012 > > > If you've any comments or see errors... > > > > Nicolas > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Tony Yu <ts...@gm...> - 2012-08-10 13:47:46
|
On Fri, Aug 10, 2012 at 8:23 AM, Nicolas Rougier <Nic...@in...>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/teaching/matplotlib/ > > > It is based on Mike Müller tutorial from scipy lecture notes ( > http://scipy-lectures.github.com/intro/matplotlib/matplotlib.html) > > Sources are available from: > https://github.com/rougier/scipy-lecture-notes/tree/euroscipy-2012 > > > If you've any comments or see errors... > > > > Nicolas > > This is really beautifully presented. It would be great if some, or all of this could be integrated into the main Matplotlib site. Someone emailed the list not too long suggesting that the user guide was geared more toward developers. This tutorial would definitely fill the gap. If nothing else, I would love to see the "Other types of plots" and "Quick Reference" sections as pages on the main site with links to them on the main navigation bar. Nice work! -Tony |
|
From: Fabrice S. <si...@lm...> - 2012-08-10 13:33:36
|
Le vendredi 10 août 2012 à 14:19 +0100, Damon McDougall a écrit : > On Fri, Aug 10, 2012 at 09:10:15AM -0400, Benjamin Root wrote: > > > > Nice work. I haven't read through all of it yet, but I did notice a layout > > issue in firefox (using 10.0.4). Many of the code snippets are being > > placed on top of the example image. > > I see this behaviour too, on Chrome, version 20.0.1132.57. Same on epiphany 3.4.2 (webkit 1.8.1) -- Fabrice Silva |
|
From: Damon M. <dam...@gm...> - 2012-08-10 13:19:30
|
On Fri, Aug 10, 2012 at 09:10:15AM -0400, Benjamin Root wrote: > On Fri, Aug 10, 2012 at 8:23 AM, Nicolas Rougier > <Nic...@in...>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/teaching/matplotlib/ > > > > It is based on Mike Müller tutorial from scipy lecture notes ( > > http://scipy-lectures.github.com/intro/matplotlib/matplotlib.html) > > > > Sources are available from: > > https://github.com/rougier/scipy-lecture-notes/tree/euroscipy-2012 > > > > If you've any comments or see errors... > > > > Nicolas > > > > Nice work. I haven't read through all of it yet, but I did notice a layout > issue in firefox (using 10.0.4). Many of the code snippets are being > placed on top of the example image. > I see this behaviour too, on Chrome, version 20.0.1132.57. Tutorial looks nice, though :) -- Damon McDougall http://damon-is-a-geek.com B2.39 Mathematics Institute University of Warwick Coventry West Midlands CV4 7AL United Kingdom |
|
From: Benjamin R. <ben...@ou...> - 2012-08-10 13:10:45
|
On Fri, Aug 10, 2012 at 8:23 AM, Nicolas Rougier <Nic...@in...>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/teaching/matplotlib/ > > > It is based on Mike Müller tutorial from scipy lecture notes ( > http://scipy-lectures.github.com/intro/matplotlib/matplotlib.html) > > Sources are available from: > https://github.com/rougier/scipy-lecture-notes/tree/euroscipy-2012 > > > If you've any comments or see errors... > > > > Nicolas > Nice work. I haven't read through all of it yet, but I did notice a layout issue in firefox (using 10.0.4). Many of the code snippets are being placed on top of the example image. What is the license for this tutorial? You should also place some copyright info at the bottom as well. Cheers! Ben Root |
|
From: Nicolas R. <Nic...@in...> - 2012-08-10 12:23:27
|
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) Sources are available from: https://github.com/rougier/scipy-lecture-notes/tree/euroscipy-2012 If you've any comments or see errors... Nicolas |
|
From: Damon M. <dam...@gm...> - 2012-08-10 11:47:32
|
On Fri, Aug 10, 2012 at 02:09:39PM +0530, satish maurya wrote: > Dear All, > > I want to stairs plot (similar in matlab) matplotlib > First i want for i data-set then multiple data-set super impose on that. > I attach the figure it's showing velocity-depth stairs plots for > superimpose (like hold on in matlab) > large data-set. > can anybody tell me how to plot that. > I'm not sure I understand what you're asking. Are you asking how to make a stairplot, or are you asking how to make *multiple* plots on one set of axes? If your question is the former, matplotlib does not currently have a stairplot implementation, but it wouldn't be hard to use the usual plot() function to achieve the desired effect: Before: x = arange(0, 10, 1) y = x * (10.0 - x) plot(x, y) After: x = arange(0, 10, 1) x_m = x - 0.5 # left-hand midpoints x_p = x + 0.5 # right-hand midpoints y = x * (10.0 - x) x_all = dstack((x_m, x, x_p)).flatten() y_all = dstack((y, y, y)).flatten() plot(x_all, y_all) If your question is the latter, you can toggle the hold state just by calling hold() Hope this helps. > > see the figure > > Thank you > > -- > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > *Satish Maurya* > *Research Scholar* > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- Damon McDougall http://damon-is-a-geek.com B2.39 Mathematics Institute University of Warwick Coventry West Midlands CV4 7AL United Kingdom |
|
From: satish m. <mau...@gm...> - 2012-08-10 08:39:51
|
Dear All, I want to stairs plot (similar in matlab) matplotlib First i want for i data-set then multiple data-set super impose on that. I attach the figure it's showing velocity-depth stairs plots for superimpose (like hold on in matlab) large data-set. can anybody tell me how to plot that. see the figure Thank you -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *Satish Maurya* *Research Scholar* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
From: Mark B. <ma...@gm...> - 2012-08-09 18:43:31
|
I am glad to see you can reproduce the error, Stan. I am running whatever is default with a PythonXY installation (sorry my windows machine is at work). Strange behavior. The code works fine on my mac (PyQt4 backend) with all options (show,draw,pause). Should we file a bug report? Mark On Thu, Aug 9, 2012 at 4:02 PM, Stan West <sta...@nr...> wrote: > ** > > *From:* Mark Bakker [mailto:ma...@gm...] > *Sent:* Tuesday, August 07, 2012 06:42 > > I tried a few things and found out that doing a pause works. > So why does a pause work, but a draw() or show() does not? > This all on Windows using the standard PythonXY installation. > Here is the code that works (testimage.py): > > from pylab import * > c = ones((10,20)) > ax = imshow(c) > pause(0.01) > print ax.get_axes().get_position() > > Running from IPython: > run testimage > Bbox(array([[ 0.125 , 0.24166667], > [ 0.9 , 0.75833333]])) > > I modified your script to test show(), draw(), and pause(); it's attached. > For the WXAgg matplotlib backend, I get: > > In [1]: print(matplotlib.get_backend()) > WXAgg > > In [2]: %run testimage > show: Bbox(array([[ 0.125, 0.1 ], > [ 0.9 , 0.9 ]])) > draw: Bbox(array([[ 0.125 , 0.24166667], > [ 0.9 , 0.75833333]])) > pause: Bbox(array([[ 0.125 , 0.24166667], > [ 0.9 , 0.75833333]])) > > but for the Qt4Agg backend, I get: > > In [1]: print(matplotlib.get_backend()) > Qt4Agg > > In [2]: %run testimage > show: Bbox(array([[ 0.125, 0.1 ], > [ 0.9 , 0.9 ]])) > draw: Bbox(array([[ 0.125, 0.1 ], > [ 0.9 , 0.9 ]])) > pause: Bbox(array([[ 0.125 , 0.24166667], > [ 0.9 , 0.75833333]])) > > Which backend have you been using? > |
|
From: Yasin S. B. <yas...@gm...> - 2012-08-09 14:58:05
|
Hi.
i wanted to make a colorbar for a dataset. dataset has 50 different values.
so instead of entering a different color for 50 values one by one, i tried
the code below.
here is what happens:
1- two different data value is painted same color.
changing the color number to some value, sometimes works, sometimes doesnt.
for example, if i change the N (number of colors) in the code below, from
50 to 52,
problem continues, but with different indices. (29-30) are same instead of
(28-29).
but if i change it to 60 colors, problem "seems to" go away for given data
values in the example.
2- colors in image are not "exactly" taken from colorbar. they are
different a tiny bit.
if you check that darkblue color color picker, there is no such color in
colorbar!
second 'data' line (RGB 21-1-167)
the most close one is color index 28 (RGB 22-2-168)
and even correctly indexed data colors are off a little bit (RGB-values, i
mean).
PS: since colors are very similar and look same, you need to use
a RGB color picker/finder app. (i use Color Selector 1.0)
thanks in advance.
#
===========================================================================
from matplotlib import colors, colorbar, pyplot
import numpy as np
# make a dict for colors.
color_info = {}
color_info["red"] = [[0.0, 0.00, 0.00], # black
[0.2, 0.40, 0.40], # brown
[0.4, 0.60, 0.60], # purple
[0.6, 0.00, 0.00], # darkblue
[0.7, 0.00, 0.00], # green
[0.8, 1.00, 1.00], # yellow
[0.9, 1.00, 1.00], # red
[1.0, 1.00, 1.00]] # white
color_info["green"] = [[0.0, 0.00, 0.00],
[0.2, 0.20, 0.20],
[0.4, 0.05, 0.05],
[0.6, 0.00, 0.00],
[0.7, 1.00, 1.00],
[0.8, 1.00, 1.00],
[0.9, 0.00, 0.00],
[1.0, 1.00, 1.00]]
color_info["blue"] = [[0.0, 0.00, 0.00],
[0.2, 0.00, 0.00],
[0.4, 0.70, 0.70],
[0.6, 0.65, 0.65],
[0.7, 0.00, 0.00],
[0.8, 0.00, 0.00],
[0.9, 0.18, 0.18],
[1.0, 1.00, 1.00]]
# divide colorbar into 50 colors. you can change this (Ex: N=15 and use
data2)
my_cmap = colors.LinearSegmentedColormap('my_colormap', color_info, N=50)
N = my_cmap.N
# we put tickmarks into the middle of colors, by shifting half a segment.
ticklabels = np.arange(N)
ind = np.arange(N)
ticks = [(i / float(N)) + (1 / float(2 * N)) for i in ind]
def my_cbar(cbar_ax, cmap=my_cmap):
"""adds cbar to image."""
base = colorbar.ColorbarBase(cbar_ax, cmap=my_cmap,
ticks=ticks,
orientation="horizontal")
xlabels = cbar_ax.get_xticklabels()
for label in xlabels:
label.set_rotation(60)
base.set_ticklabels(ticklabels)
# labels are very close so dont forget to maximize plot window to see
better.
fig = pyplot.figure(figsize=(7, 7))
data = [[27, 28],
[28, 29], # both are same colors!
[29, 30],
[30, 31],
[31, 32],
[32, 33]]
# data2 is just to show it works as expected for N=15.
data2 = [[7.999, 8],
[8.999, 9],
[9.999, 10],
[10, 11],
[11, 12],
[12, 13]]
# with these vmin/vmax, data value 0-0.99999 goes to 'color index 0',
# data value X - X.9999 goes to 'color index X' ...etc
# (change 'data' to 'data2' when N=15)
pyplot.imshow(data, cmap=my_cmap,
vmin=0, vmax=N, interpolation="nearest")
cx = fig.add_axes((0.2, 0.05, 0.6, 0.03))
my_cbar(cx, cmap=my_cmap)
# but data values 28 and 29 goes to same color. maybe this happens for other
# data values as well ???
# similarly interesting, if you check that darkblue color with a
# rgb color picker/reader, there is no such color in colorbar! the most
close
# one is color index 28.
# RGB values ->>> 'data[1, :]=(21, 1, 167)' vs 'color index 28=(22, 2, 168)'
# and even correctly indexed colors RGB values are off a little bit.
pyplot.show()
--
Yasin Selçuk Berber
"Bismillah, her hayrın başıdır."
|
|
From: Benjamin R. <ben...@ou...> - 2012-08-09 14:34:52
|
On Wed, Aug 8, 2012 at 7:03 AM, darkside <in....@gm...> wrote: > > > ---------- Forwarded message ---------- > From: darkside <in....@gm...> > Date: 2012/8/2 > Subject: Re: [Matplotlib-users] zoomed in detail box > To: Jae-Joon Lee <lee...@gm...> > > > Hi everyone! > > I'm also trying to do a detailed zoomed area of my plot, but I can't > manage to put the box in the position I want, bbox_to_anchor didn't work in > my case: > > axins = > zoomed_inset_axes(ax,3,loc=2,bbox_to_anchor=(0,0,0.5,0.5),bbox_transform=ax.transAxes) > > This bbox_to_anchor tuple is just an example. I only want to move the > zoomed box a little to the right, since the ticklabels overlap. > > Any idea? > > I really appreciate your help! > > Is this what you are looking for? http://matplotlib.sourceforge.net/mpl_toolkits/axes_grid/users/overview.html#insetlocator Cheers! Ben Root |
|
From: Stan W. <sta...@nr...> - 2012-08-09 14:02:32
|
From: Mark Bakker [mailto:ma...@gm...]
Sent: Tuesday, August 07, 2012 06:42
I tried a few things and found out that doing a pause works.
So why does a pause work, but a draw() or show() does not?
This all on Windows using the standard PythonXY installation.
Here is the code that works (testimage.py):
from pylab import *
c = ones((10,20))
ax = imshow(c)
pause(0.01)
print ax.get_axes().get_position()
Running from IPython:
run testimage
Bbox(array([[ 0.125 , 0.24166667],
[ 0.9 , 0.75833333]]))
I modified your script to test show(), draw(), and pause(); it's attached. For
the WXAgg matplotlib backend, I get:
In [1]: print(matplotlib.get_backend())
WXAgg
In [2]: %run testimage
show: Bbox(array([[ 0.125, 0.1 ],
[ 0.9 , 0.9 ]]))
draw: Bbox(array([[ 0.125 , 0.24166667],
[ 0.9 , 0.75833333]]))
pause: Bbox(array([[ 0.125 , 0.24166667],
[ 0.9 , 0.75833333]]))
but for the Qt4Agg backend, I get:
In [1]: print(matplotlib.get_backend())
Qt4Agg
In [2]: %run testimage
show: Bbox(array([[ 0.125, 0.1 ],
[ 0.9 , 0.9 ]]))
draw: Bbox(array([[ 0.125, 0.1 ],
[ 0.9 , 0.9 ]]))
pause: Bbox(array([[ 0.125 , 0.24166667],
[ 0.9 , 0.75833333]]))
Which backend have you been using?
|
|
From: Daniel H. <dh...@gm...> - 2012-08-08 23:23:16
|
I was wanting to allow the specification of the size of the box used to
enclose the text in an annotation, rather than allowing it to always fit
exactly to the text. I know that I could always just draw a rectangle, and
then text on top, but I was wanting to also be able to drag thing thing
around on the graph, in which case it is much more straightforward to keep
the text and rectangle together, just like the annotation does.
So my first attempt at drawing the box according to a set size looks like
the attached code: in text.py, I inserted some code into Text._draw_bbox().
So long as the annotation has an attribute bbox_size that exists, it's
used for the size of the box. Very straightforward, *but* it doesn't
survive a text rotation like an annotation (see attached images). I have
no clue what I'm doing wrong, and I will also have to confess a lot of
ignorance when it comes to matplotlib's transforms, mutations, and such.
I've been fiddling with this for hours with no success, and it seems that
it should be simple :(
def _draw_bbox(self, renderer, posx, posy):
""" Update the location and the size of the bbox
(FancyBoxPatch), and draw
"""
x_box, y_box, w_box, h_box = _get_textbox(self, renderer)
#======================my extra code ===============================
# self._get_xy is annotation specific.
# self.textcoords is annotation specific.
x_box_orig,y_box_orig = x_box,y_box
if getattr(self,'bbox_size',None):
bx,by = self.bbox_size
pt0 = self._get_xy(renderer,0.0,0.0,self.textcoords)
pt1 = self._get_xy(renderer,bx,0.0,self.textcoords)
pt2 = self._get_xy(renderer,0.0,by,self.textcoords)
bx = pt1[0]-pt0[0]
by = pt2[1]-pt0[1]
xc = x_box + w_box/2
yc = y_box + h_box/2
x_box = xc - bx/2
y_box = yc - by/2
w_box = bx
h_box = by
#================================================================================
self._bbox_patch.set_bounds(0., 0.,
w_box, h_box)
theta = self.get_rotation()/180.*math.pi
tr = mtransforms.Affine2D().rotate(theta)
tr = tr.translate(posx+x_box, posy+y_box)
self._bbox_patch.set_transform(tr)
fontsize_in_pixel = renderer.points_to_pixels(self.get_size())
self._bbox_patch.set_mutation_scale(fontsize_in_pixel)
self._bbox_patch.draw(renderer)
--
Daniel Hyams
dh...@gm...
|
|
From: Warren W. <war...@en...> - 2012-08-08 22:37:10
|
On Wed, Aug 8, 2012 at 3:34 PM, Gustavo Goretkin <gus...@gm... > wrote: > I can use the scatter function to plot an array of points and give a > corresponding array of colors to set those points. Is it possible to > do the same thing with alpha values? > > Right now, I'm restoring to calling plot with an 'o' marker for each > individual point, which is slow. > > The 'color' argument of the 'scatter' function can take an array of (r,g,b,alpha) values: In [23]: x = array([0, 1, 2, 3]) In [24]: y = array([0, 1, 1, 2]) In [25]: c = array([[0,0,1,1], [0,0,1,0.5], [0,1,0,0.5], [1,0,1,.9]]) In [26]: scatter(x, y, color=c) Out[26]: <matplotlib.collections.PathCollection at 0x898adf0> Warren > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Damon M. <dam...@gm...> - 2012-08-08 21:49:30
|
On Wed, Aug 08, 2012 at 05:22:49PM -0400, Tony Yu wrote: > On Wed, Aug 8, 2012 at 4:34 PM, Gustavo Goretkin <gus...@gm... > > wrote: > > > I can use the scatter function to plot an array of points and give a > > corresponding array of colors to set those points. Is it possible to > > do the same thing with alpha values? > > > You can use a colormap with varying alpha values. Would it be possible to do something like ax.plot(x, y, color=[c1, c2, c3], alpha=[a1, a2, a3])? It doesn't seem that it's supported and that would be the 'natural' extension, in some sense. -- Damon McDougall http://damon-is-a-geek.com B2.39 Mathematics Institute University of Warwick Coventry West Midlands CV4 7AL United Kingdom |
|
From: Tony Yu <ts...@gm...> - 2012-08-08 21:23:35
|
On Wed, Aug 8, 2012 at 4:34 PM, Gustavo Goretkin <gus...@gm...
> wrote:
> I can use the scatter function to plot an array of points and give a
> corresponding array of colors to set those points. Is it possible to
> do the same thing with alpha values?
>
> Right now, I'm restoring to calling plot with an 'o' marker for each
> individual point, which is slow.
>
>
You can use a colormap with varying alpha values.
Example below. I'm not a huge fan of the call signature of
`LinearSegmentedColormap`, so I've included a class that makes it a little
more convenient to define the colormap.
Cheers,
-Tony
P.S. There were some major cleanups of the alpha handling not too long ago,
but I don't think those are necessary for scatter. Let me know if this
doesn't work for some reason.
#~~~ example code
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.colors import LinearSegmentedColormap
class LinearColormap(LinearSegmentedColormap):
def __init__(self, name, segmented_data, index=None, **kwargs):
if index is None:
# If index not given, RGB colors are evenly-spaced in colormap.
index = np.linspace(0, 1, len(segmented_data['red']))
for key, value in segmented_data.iteritems():
# Combine color index with color values.
segmented_data[key] = zip(index, value)
segmented_data = dict((key, [(x, y, y) for x, y in value])
for key, value in segmented_data.iteritems())
LinearSegmentedColormap.__init__(self, name, segmented_data,
**kwargs)
# Red for all values, but alpha changes linearly from 0.3 to 1
color_spec = {'blue': [0.0, 0.0],
'green': [0.0, 0.0],
'red': [0.8, 0.8],
'alpha': [0.3, 1.0]}
alpha_red = LinearColormap('alpha_red', color_spec)
x, y, z = np.random.normal(size=(3, 100))
plt.scatter(x, y, c=z, cmap=alpha_red, s=50, edgecolors='none')
plt.show()
# Here's a slightly more complicated use of LinearColormap, if you're
interested.
# Blue below midpoint of colormap, red above mid point.
# Alpha maximum at the edges, minimum in the middle.
bwr_spec = {'blue': [0.4, 0.4, 0.1, 0.1],
'green': [0.2, 0.2, 0.0, 0.0],
'red': [0.02, 0.02, 0.4, 0.4],
'alpha': [1, 0.3, 0.3, 1]}
blue_white_red = LinearColormap('blue_white_red', bwr_spec,
index=[0, 0.5, 0.5, 1])
|
|
From: Gustavo G. <gus...@gm...> - 2012-08-08 20:35:10
|
I can use the scatter function to plot an array of points and give a corresponding array of colors to set those points. Is it possible to do the same thing with alpha values? Right now, I'm restoring to calling plot with an 'o' marker for each individual point, which is slow. |
|
From: darkside <in....@gm...> - 2012-08-08 11:03:57
|
---------- Forwarded message ---------- From: darkside <in....@gm...> Date: 2012/8/2 Subject: Re: [Matplotlib-users] zoomed in detail box To: Jae-Joon Lee <lee...@gm...> Hi everyone! I'm also trying to do a detailed zoomed area of my plot, but I can't manage to put the box in the position I want, bbox_to_anchor didn't work in my case: axins = zoomed_inset_axes(ax,3,loc=2,bbox_to_anchor=(0,0,0.5,0.5),bbox_transform=ax.transAxes) This bbox_to_anchor tuple is just an example. I only want to move the zoomed box a little to the right, since the ticklabels overlap. Any idea? I really appreciate your help! 2009/7/10 Jae-Joon Lee <lee...@gm...> > On Thu, Jul 9, 2009 at 7:24 AM, Robin<ro...@gm...> wrote: > >> On Wed, Jul 8, 2009 at 10:57 PM, Jae-Joon Lee<lee...@gm...> > wrote: > >>> If you use the svn version of matplotlib, you may use axes_grid > toolkit. > >>> > >>> > http://matplotlib.sourceforge.net/mpl_toolkits/axes_grid/users/overview.html#insetlocator > > > > Wow - this is really amazing. Sometimes it can be a bit frustrating > > when I'm working to a deadline to figure out the details of Bbox's and > > such but when I find something like this it really makes it worth > > while! It does exactly what I want, really easy to use and only took > > about 5 lines! (It would be nice if there were some docstrings in > > there though :)) > > > > On Thu, Jul 9, 2009 at 4:02 AM, Jae-Joon Lee<lee...@gm...> > wrote: > >> However, It is possible to specify the location of the axes in > >> normalized axes coordinate. > >> > >> http://thread.gmane.org/gmane.comp.python.matplotlib.general/16373 > > > > I'm afraid I didn't really understand how to apply this in my case... > > I guess I would have to set the position and everything by hand > > instead of using the zoom helper. I preferred to use the zoom helper, > > but found the legend loc settings put it slightly too close to the > > edge of the surrounding axes for my taste. > > > > So after checking the docstrings for how to position legends I came up > > with something that works, but it required a minor change to the > > inset_locator.py to pass the bbox_to_anchor and bbox_transform (it > > looks like this was intended since they have None default values): > > > > robin-mbp-3:~ robince$ diff > > > /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/mpl_toolkits/axes_grid/inset_locator.py > > code/scipy_build/matplotlib/lib/mpl_toolkits/axes_grid/inset_locator.py > > 288c288 > > < axes_locator = AnchoredZoomLocator(parent_axes, zoom=zoom, > > loc=loc, bbox_to_anchor=bbox_to_anchor,bbox_transform=bbox_transform) > > --- > >> axes_locator = AnchoredZoomLocator(parent_axes, zoom=zoom, loc=loc) > > > > With this minor change I get exactly what I want! > > > > Thanks for the catch. I'll commit the change to the svn soon. > By the way, borderpad keyword is meant to do what you want. However, I > just found that it does not work sine the option is not properly > handled. I'll fix this in the next commit. > > Regards, > > -JJ > > > > ax1ins = zoomed_inset_axes(ax1, 3, > > bbox_to_anchor=(0.1,0,1,1),bbox_transform=ax1.transAxes, loc=6) > > plot_trial_dists(res515[0],8,ax=ax1ins) > > ax1ins.set_xlim([5, 50]) > > ax1ins.set_ylim([0, 0.04]) > > ax1ins.set_xticks([]) > > ax1ins.set_yticks([]) > > mark_inset(ax1, ax1ins, loc1=2, loc2=4, fc="none", ec="0.5") > > > > thanks again, this is really terrific! > > > > Cheers > > > > Robin > > > > > ------------------------------------------------------------------------------ > Enter the BlackBerry Developer Challenge > This is your chance to win up to $100,000 in prizes! For a limited time, > vendors submitting new applications to BlackBerry App World(TM) will have > the opportunity to enter the BlackBerry Developer Challenge. See full prize > details at: http://p.sf.net/sfu/Challenge > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |