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
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
1
(12) |
2
(14) |
3
(13) |
4
(6) |
5
(6) |
6
(21) |
7
(29) |
8
(30) |
9
(13) |
10
(4) |
11
(4) |
12
(4) |
13
(15) |
14
(22) |
15
(23) |
16
(23) |
17
(9) |
18
(23) |
19
(12) |
20
(10) |
21
(26) |
22
(5) |
23
(32) |
24
(5) |
25
(7) |
26
(4) |
27
(3) |
28
(19) |
29
(20) |
|
|
|
HI Mike, Will be videos available from the course? Thank you in advance. Cheers, On Wed, Jan 25, 2012 at 6:52 AM, Mike Müller <mmu...@py...>wrote: > Course "Python for Scientists and Engineers" in Chicago > ======================================================= > > There will be a comprehensive Python course for scientists and engineers > in Chicago end of February / beginning of March 2012. It consists of a > 3-day > intro and a 2-day advanced section. Both sections can be taken separately > or combined. > > More details below and here: http://www.dabeaz.com/chicago/science.html > > Please let friends or colleagues who might be interested in such a > course know about it. > > > 3-Day Intro Section > ------------------- > > - Overview of Scientific and Technical Libraries for Python. > - Numerical Calculations with NumPy > - Storage and Processing of Large Amounts of Data > - Graphical Presentation of Scientific Data with matplotlib > - Object Oriented Programming for Scientific and Technical Projects > - Open Time for Problem Solving > > > 2-Day Advanced Section > ---------------------- > > - Extending Python with Other Languages > - Unit Testing > - Version Control with Mercurial > > > The Details > ----------- > > The course is hosted by David Beazley (http://www.dabeaz.com). > > Date: Feb 27 - Mar 2, 2012 > Location: Chicago, IL, USA > Trainer: Mike Müller > Course Language: English > Link: http://www.dabeaz.com/chicago/science.html > > > ------------------------------------------------------------------------------ > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just 99ドル.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
Hi Mike, Would it possible that after the conference the videos of all talks could be downloaded? It is not possible to download them from last year. Thank you in advance. Cheers, On Thu, Jan 26, 2012 at 1:43 AM, Mike Müller <mmu...@py...>wrote: > Hi, > > I will be giving a matplotlib and a optimization tutorial > at PyCon in March. > > So please point people to it who would like to have a compact > introduction to matplotlib. > > The optimization tutorial gives an overview over this topic. > > BTW, the early bird deadline is today. > > Mike > > > > Plotting with matplotlib > ------------------------ > > Instructor: Mike Müller > Type:Tutorial > Audience level:Novice > Category:Useful libraries > March 8th 9 a.m. – 12:20 p.m. > https://us.pycon.org/2012/schedule/presentation/238/ > > When it comes to plotting with Python many people think about matplotlib. > It is > widely used and provides a simple interface for creating a wide variety of > plots from very simple diagrams to sophisticated animations. This tutorial > is a > hands-on introduction that teaches the basics of matplotlib. Students will > learn how to create publication-ready plots with just a few lines of > Python. > > > > Faster Python Programs through Optimization > ------------------------------------------- > > Instructor: Mike Müller > Type:Tutorial > Audience level:Experienced > Category:Best Practices/Patterns > March 7th 9 a.m. – 12:20 p.m. > https://us.pycon.org/2012/schedule/presentation/245/ > > This tutorial provides an overview of techniques to improve the > performance of > Python programs. The focus is on concepts such as profiling, difference of > data > structures and algorithms as well as a selection of tools and libraries > that > help to speed up Python. > > > ------------------------------------------------------------------------------ > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just 99ドル.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
On 02/08/2012 02:22 PM, John Hunter wrote: > > > On Wed, Feb 8, 2012 at 1:12 PM, Ted To <rai...@th... > <mailto:rai...@th...>> wrote: > > Is it possible to force the date ticks to be the same in two different > plots? For example, the attached figures cover the same time spans but > in one, the data are weekly and the other, monthly. While there is > nothing really wrong with different tick marks, aesthetically it would > be nice if they were both the same. > > > > Yes, just use the "sharex" keyword to share the x-axis between the two. > Not only will they have the same ticks and labels, but when you pan and > zoom in one the other moves with it. The example below does not use > dates, but it will work with dates just the same. > > > import matplotlib.pyplot as plt > import numpy as np > > fig1 = plt.figure(1) > ax1 = fig1.add_subplot(111) > ax1.plot(np.random.randn(10,2)*10) > > fig2 = plt.figure(2) > ax2 = fig2.add_subplot(111, sharex=ax1) > ax2.plot(np.random.randn(10,2)*10) > > plt.show() > > JDH Thanks again, worked like a charm! Cheers, Ted
On Wed, Feb 8, 2012 at 1:12 PM, Ted To <rai...@th...> wrote: > > Is it possible to force the date ticks to be the same in two different > plots? For example, the attached figures cover the same time spans but > in one, the data are weekly and the other, monthly. While there is > nothing really wrong with different tick marks, aesthetically it would > be nice if they were both the same. > > Yes, just use the "sharex" keyword to share the x-axis between the two. Not only will they have the same ticks and labels, but when you pan and zoom in one the other moves with it. The example below does not use dates, but it will work with dates just the same. import matplotlib.pyplot as plt import numpy as np fig1 = plt.figure(1) ax1 = fig1.add_subplot(111) ax1.plot(np.random.randn(10,2)*10) fig2 = plt.figure(2) ax2 = fig2.add_subplot(111, sharex=ax1) ax2.plot(np.random.randn(10,2)*10) plt.show() JDH
Hi, Is it possible to force the date ticks to be the same in two different plots? For example, the attached figures cover the same time spans but in one, the data are weekly and the other, monthly. While there is nothing really wrong with different tick marks, aesthetically it would be nice if they were both the same. Thanks, Ted
Thanks Tony and JDH, problem resolved and now I can try to compile. - Chris On Wed, Feb 8, 2012 at 10:41 AM, Tony Yu <ts...@gm...> wrote: > > > On Wed, Feb 8, 2012 at 1:20 PM, Chris <pl...@gm...> wrote: >> >> New error at `git checkout -b mdboom-pixel_marker v1.1.x': >> >> fatal: git checkout: updating paths is incompatible with switching >> branches. >> Did you intend to checkout 'v1.1.x' which can not be resolved as commit? >> >> - Chris > > > That looks like something I've done before without issue. Maybe you're on an > older version of git. In any case, you can break this up into two steps > > # change to maintenance branch > git checkout v1.1.x > > # create new branch based on current checkout > git checkout -b mdboom-pixel_marker > > > Then continue as John instructed. > > -Tony > > > >> >> >> On Wed, Feb 8, 2012 at 10:13 AM, John Hunter <jd...@gm...> wrote: >> > >> > >> > On Wed, Feb 8, 2012 at 12:06 PM, Tony Yu <ts...@gm...> wrote: >> > >> >>> git clone gi...@gi...:matplotlib/matplotlib.git matplotlib.git >> >>> >> >>> did not go through. >> >>> >> >>> - Chris >> >>> >> >> >> >> I don't think you want the ".git" at the very end of the clone command. >> >> That just tells get where (i.e. new directory) to put the repo. >> >> >> > >> > I don't think that is the problem. I just add the .git extension >> > because >> > the default is to check out a directory called "matplotlib" which if it >> > is >> > located in the path you are running or testing from, will confuse the >> > import. So I just add some extension so python won't confuse the mpl >> > src >> > dir ("matplotlib.git") with the mpl package ("matplotlib"). > >
On Wed, Feb 8, 2012 at 1:20 PM, Chris <pl...@gm...> wrote: > New error at `git checkout -b mdboom-pixel_marker v1.1.x': > > fatal: git checkout: updating paths is incompatible with switching > branches. > Did you intend to checkout 'v1.1.x' which can not be resolved as commit? > > - Chris > That looks like something I've done before without issue. Maybe you're on an older version of git. In any case, you can break this up into two steps # change to maintenance branch git checkout v1.1.x # create new branch based on current checkout git checkout -b mdboom-pixel_marker Then continue as John instructed. -Tony > > On Wed, Feb 8, 2012 at 10:13 AM, John Hunter <jd...@gm...> wrote: > > > > > > On Wed, Feb 8, 2012 at 12:06 PM, Tony Yu <ts...@gm...> wrote: > > > >>> git clone gi...@gi...:matplotlib/matplotlib.git matplotlib.git > >>> > >>> did not go through. > >>> > >>> - Chris > >>> > >> > >> I don't think you want the ".git" at the very end of the clone command. > >> That just tells get where (i.e. new directory) to put the repo. > >> > > > > I don't think that is the problem. I just add the .git extension because > > the default is to check out a directory called "matplotlib" which if it > is > > located in the path you are running or testing from, will confuse the > > import. So I just add some extension so python won't confuse the mpl src > > dir ("matplotlib.git") with the mpl package ("matplotlib"). >
I interpreted the "public key" error (as did others) to be an ssh issue. For a publicly readable approach this seems to work: [dhcp-90-166:python/matplotlib/git] dale% git clone git://github.com/matplotlib/matplotlib.git Cloning into matplotlib... remote: Counting objects: 57725, done. remote: Compressing objects: 100% (13597/13597), done. remote: Total 57725 (delta 44284), reused 57317 (delta 43924) Receiving objects: 100% (57725/57725), 81.69 MiB | 2.67 MiB/s, done. Resolving deltas: 100% (44284/44284), done. [dhcp-90-166:python/matplotlib/git] dale% ll total 0 drwxr-xr-x 3 dale staff 102 Feb 8 13:20 . drwxr-xr-x 5 dale staff 170 Feb 8 13:08 .. drwxr-xr-x 33 dale staff 1122 Feb 8 13:21 matplotlib [dhcp-90-166:python/matplotlib/git] dale% -Dale On Feb 8, 2012, at 13:13 , John Hunter wrote: > > > On Wed, Feb 8, 2012 at 12:06 PM, Tony Yu <ts...@gm...> wrote: > > git clone gi...@gi...:matplotlib/matplotlib.git matplotlib.git > > did not go through. > > - Chris > > > I don't think you want the ".git" at the very end of the clone command. That just tells get where (i.e. new directory) to put the repo. > > > I don't think that is the problem. I just add the .git extension because the default is to check out a directory called "matplotlib" which if it is located in the path you are running or testing from, will confuse the import. So I just add some extension so python won't confuse the mpl src dir ("matplotlib.git") with the mpl package ("matplotlib"). > ------------------------------------------------------------------------------ > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just 99ドル.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d_______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
New error at `git checkout -b mdboom-pixel_marker v1.1.x': fatal: git checkout: updating paths is incompatible with switching branches. Did you intend to checkout 'v1.1.x' which can not be resolved as commit? - Chris On Wed, Feb 8, 2012 at 10:13 AM, John Hunter <jd...@gm...> wrote: > > > On Wed, Feb 8, 2012 at 12:06 PM, Tony Yu <ts...@gm...> wrote: > >>> git clone gi...@gi...:matplotlib/matplotlib.git matplotlib.git >>> >>> did not go through. >>> >>> - Chris >>> >> >> I don't think you want the ".git" at the very end of the clone command. >> That just tells get where (i.e. new directory) to put the repo. >> > > I don't think that is the problem. I just add the .git extension because > the default is to check out a directory called "matplotlib" which if it is > located in the path you are running or testing from, will confuse the > import. So I just add some extension so python won't confuse the mpl src > dir ("matplotlib.git") with the mpl package ("matplotlib").
On Wed, Feb 8, 2012 at 12:06 PM, Tony Yu <ts...@gm...> wrote: git clone gi...@gi...:matplotlib/matplotlib.git matplotlib.git >> >> did not go through. >> >> - Chris >> >> > I don't think you want the ".git" at the very end of the clone command. > That just tells get where (i.e. new directory) to put the repo. > > I don't think that is the problem. I just add the .git extension because the default is to check out a directory called "matplotlib" which if it is located in the path you are running or testing from, will confuse the import. So I just add some extension so python won't confuse the mpl src dir ("matplotlib.git") with the mpl package ("matplotlib").
On Wed, Feb 8, 2012 at 11:58 AM, Chris <pl...@gm...> wrote: > This time the error is: > > fatal: Not a git repository (or any of the parent directories): .git > > I guess that I have not be able to establish a local git tree since the > command > > git clone gi...@gi...:matplotlib/matplotlib.git matplotlib.git > > did not go through. > > I see, that is also the ssh version. Here is the http read only version. Updated my complete instructions: # install git to checkout the mpl src code sudo apt-get install git # install the pre-reqs to build matplotlib from source sudo apt-get build-dep python-matplotlib # get the latest released branch of matplotlib git clone git://github.com/matplotlib/matplotlib.git matplotlib.git # cd into the matplotlib directory and create a branch off of the release branch to test cd matplotlib.git git checkout -b mdboom-pixel_marker v1.1.x # pull in Michael's changes git pull git://github.com/mdboom/matplotlib.git pixel_marker # build the matplotlib source code python setup.py build # install it sudo python setup.py install
On Wed, Feb 8, 2012 at 12:58 PM, Chris <pl...@gm...> wrote: > This time the error is: > > fatal: Not a git repository (or any of the parent directories): .git > > I guess that I have not be able to establish a local git tree since the > command > > git clone gi...@gi...:matplotlib/matplotlib.git matplotlib.git > > did not go through. > > - Chris > > I don't think you want the ".git" at the very end of the clone command. That just tells get where (i.e. new directory) to put the repo. -Tony > On Wed, Feb 8, 2012 at 9:48 AM, John Hunter <jd...@gm...> wrote: > > > > > > On Wed, Feb 8, 2012 at 11:39 AM, Chris <pl...@gm...> wrote: > >> > >> Thanks John. Since I already have a running copy of mpl, I skipped to > >> the git clone step, but get this error: > >> > >> Permission denied (publickey). > >> fatal: The remote end hung up unexpectedly > >> > >> I'm a complete noob on git, so please bear with me. > > > > > > > > I think I should have pointed you to the read only address. Try this: > > > > > > git pull git://github.com/mdboom/matplotlib.git pixel_marker > > > > JDH > > > > > ------------------------------------------------------------------------------ > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just 99ドル.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
This time the error is: fatal: Not a git repository (or any of the parent directories): .git I guess that I have not be able to establish a local git tree since the command git clone gi...@gi...:matplotlib/matplotlib.git matplotlib.git did not go through. - Chris On Wed, Feb 8, 2012 at 9:48 AM, John Hunter <jd...@gm...> wrote: > > > On Wed, Feb 8, 2012 at 11:39 AM, Chris <pl...@gm...> wrote: >> >> Thanks John. Since I already have a running copy of mpl, I skipped to >> the git clone step, but get this error: >> >> Permission denied (publickey). >> fatal: The remote end hung up unexpectedly >> >> I'm a complete noob on git, so please bear with me. > > > > I think I should have pointed you to the read only address. Try this: > > > git pull git://github.com/mdboom/matplotlib.git pixel_marker > > JDH >
On Wed, Feb 8, 2012 at 11:39 AM, Chris <pl...@gm...> wrote: > Thanks John. Since I already have a running copy of mpl, I skipped to > the git clone step, but get this error: > > Permission denied (publickey). > fatal: The remote end hung up unexpectedly > > I'm a complete noob on git, so please bear with me. > I think I should have pointed you to the read only address. Try this: git pull git://github.com/mdboom/matplotlib.git pixel_marker JDH
Thanks John. Since I already have a running copy of mpl, I skipped to the git clone step, but get this error: Permission denied (publickey). fatal: The remote end hung up unexpectedly I'm a complete noob on git, so please bear with me. - Chris On Wed, Feb 8, 2012 at 9:31 AM, John Hunter <jd...@gm...> wrote: > > > On Wed, Feb 8, 2012 at 11:06 AM, Chris <pl...@gm...> wrote: >> >> I was trying to test the patch mike put in to fix the single pixel >> plotting issue, but just realized that this was a Mac version. Can I >> use it on a linux box? How? > > > These instructions are for an ubuntu based system -- if you are on a > different version of linux you may need different commands to install git > and the mpl build dependencies > > # install git to checkout the mpl src code > sudo apt-get install git > > # install the pre-reqs to build matplotlib from source > sudo apt-get build-dep python-matplotlib > > # get the latest released branch of matplotlib > git clone gi...@gi...:matplotlib/matplotlib.git matplotlib.git > > # cd into the matplotlib directory and create a branch off of the release > branch to test > cd matplotlib.git > git checkout -b mdboom-pixel_marker v1.1.x > > # pull in Michael's changes > git pull https://github.com/mdboom/matplotlib.git pixel_marker > > # build the matplotlib source code > python setup.py build > > # install it > sudo python setup.py install
On Wed, Feb 8, 2012 at 11:06 AM, Chris <pl...@gm...> wrote: > I was trying to test the patch mike put in to fix the single pixel > plotting issue, but just realized that this was a Mac version. Can I > use it on a linux box? How? > These instructions are for an ubuntu based system -- if you are on a different version of linux you may need different commands to install git and the mpl build dependencies # install git to checkout the mpl src code sudo apt-get install git # install the pre-reqs to build matplotlib from source sudo apt-get build-dep python-matplotlib # get the latest released branch of matplotlib git clone gi...@gi...:matplotlib/matplotlib.git matplotlib.git # cd into the matplotlib directory and create a branch off of the release branch to test cd matplotlib.git git checkout -b mdboom-pixel_marker v1.1.x # pull in Michael's changes git pull https://github.com/mdboom/matplotlib.git pixel_marker # build the matplotlib source code python setup.py build # install it sudo python setup.py install
I was trying to test the patch mike put in to fix the single pixel plotting issue, but just realized that this was a Mac version. Can I use it on a linux box? How? Thanks, Chris
This is the solution which requires the least modification to the original text inserting functions. The only drawback is like you said, it only works with ps backend. Any idea if this could be generalized for other backends? On Tue, Feb 7, 2012 at 3:44 PM, Yann Tambouret <yan...@bu...> wrote: > Along the lines of Mike's suggestion, I thought this could be done using > Latex. > > > I posted an answer on SO with an example of doing this, but it seems only > to work with postscript backend. Other backends override the color with the > mpl text color setting. > > Is there a way to prevent this override? For example don't try to use 'PS' > backend, and look at hte figure interactively. It defaults to black. > > http://stackoverflow.com/a/9185143/717357 > > -Yann > > > > > On Tue, Feb 7, 2012 at 4:46 PM, Paul Ivanov <piv...@gm...> wrote: > >> Benjamin Root, on 2012年02月07日 13:46, wrote: >> > Also, how deep should this rabbit hole go? I could imagine one could >> want >> > this for title() and figtitle(). Maybe it would be best to implement >> this >> > at the Text() constructor level? >> >> For this reason, I would discourage even implementing such >> functionality in the core of matplotlib. This functionality doesn't >> strike me >> as something that ought to be available everywhere by default - if someone >> needs it, they can implement it as follows: >> >> ----- >> import matplotlib.pyplot as plt >> from matplotlib import transforms >> >> def rainbow_text(x,y,ls,lc,**kw): >> """ >> Take a list of strings ``ls`` and colors ``lc`` and place them next to >> each >> other, with text ls[i] being shown in color lc[i]. >> >> This example shows how to do both vertical and horizontal text, and >> will >> pass all keyword arguments to plt.text, so you can set the font size, >> family, etc. >> """ >> t = plt.gca().transData >> fig = plt.gcf() >> plt.show() >> >> #horizontal version >> for s,c in zip(ls,lc): >> text = plt.text(x,y," "+s+" ",color=c, transform=t, **kw) >> text.draw(fig.canvas.get_renderer()) >> ex = text.get_window_extent() >> t = transforms.offset_copy(text._transform, x=ex.width, >> units='dots') >> >> #vertical version >> for s,c in zip(ls,lc): >> text = plt.text(x,y," "+s+" ",color=c, transform=t, >> rotation=90,va='bottom',ha='center',**kw) >> text.draw(fig.canvas.get_renderer()) >> ex = text.get_window_extent() >> t = transforms.offset_copy(text._transform, y=ex.height, >> units='dots') >> >> >> plt.figure() >> rainbow_text(0.5,0.5,"all unicorns poop rainbows ! ! !".split(), >> ['red', 'orange', 'brown', 'green', 'blue', 'purple', 'black'], >> size=40) >> >> best, >> -- >> Paul Ivanov >> 314 address only used for lists, off-list direct email at: >> http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 >> >> >> ------------------------------------------------------------------------------ >> Keep Your Developer Skills Current with LearnDevNow! >> The most comprehensive online learning library for Microsoft developers >> is just 99ドル.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, >> Metro Style Apps, more. Free future releases when you subscribe now! >> http://p.sf.net/sfu/learndevnow-d2d >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> > > > ------------------------------------------------------------------------------ > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just 99ドル.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- Gökhan
On 02/08/2012 11:28 AM, John Hunter wrote: > > OK, here is where the problem is. In the plt.axis call you are setting > the x-axis min to 0 which is not a legal date value. I suggest letting > the x-axis take care of itself, and set the y-axis limits with > > plt.ylim(-1.5, 1.5) > > JDH Many thanks! I also had to move the axhline commands to follow the other plotting commands. Ted
On Wed, Feb 8, 2012 at 10:24 AM, Ted To <rai...@th...> wrote: > On 02/08/2012 11:17 AM, John Hunter wrote: > > > > > > On Wed, Feb 8, 2012 at 10:06 AM, Ted To <rai...@th... > > <mailto:rai...@th...>> wrote: > > > > If it hasn't been fixed, is there a workaround? > > > > On 02/08/2012 10:42 AM, Ted To wrote: > > > I believe I have traced it to some axhline and axis commands and > > this is > > > apparently an old problem. Does it work with version 1.1.0? I > have > > > 1.0.1 installed on a debian system. > > > > > > Can you "print(dates)" before calling plot in the environment in which > > it fails and post the output here. > > > > JDH > > Sure, the commands where it crashes and the output are: > > print dates > pyplot.axis([0, len(prices.label[0]), -1.5, 1.5]) > OK, here is where the problem is. In the plt.axis call you are setting the x-axis min to 0 which is not a legal date value. I suggest letting the x-axis take care of itself, and set the y-axis limits with plt.ylim(-1.5, 1.5) JDH
On 02/08/2012 11:17 AM, John Hunter wrote: > > > On Wed, Feb 8, 2012 at 10:06 AM, Ted To <rai...@th... > <mailto:rai...@th...>> wrote: > > If it hasn't been fixed, is there a workaround? > > On 02/08/2012 10:42 AM, Ted To wrote: > > I believe I have traced it to some axhline and axis commands and > this is > > apparently an old problem. Does it work with version 1.1.0? I have > > 1.0.1 installed on a debian system. > > > Can you "print(dates)" before calling plot in the environment in which > it fails and post the output here. > > JDH Sure, the commands where it crashes and the output are: print dates pyplot.axis([0, len(prices.label[0]), -1.5, 1.5]) pyplot.axhline(-.5,color='r') pyplot.axhline(.5,color='r') pyplot.axhline(0,color='.75') diff = (fisherChained-tornqvistChained)*100 pyplot.plot_date(pylab.date2num(dates),diff,'b-',label='Chained') pyplot.setp(pyplot.gca().get_xmajorticklabels(),rotation=30) pyplot.savefig(city+agg+'Diffs.pdf') [datetime.date(1992, 12, 12), datetime.date(1992, 12, 19), datetime.date(1992, 12, 26), datetime.date(1993, 1, 2), datetime.date(1993, 1, 9), datetime.date(1993, 1, 16), datetime.date(1993, 1, 23), datetime.date(1993, 1, 30), datetime.date(1993, 2, 6), datetime.date(1993, 2, 13), datetime.date(1993, 2, 20), datetime.date(1993, 2, 27), datetime.date(1993, 3, 6), datetime.date(1993, 3, 13), datetime.date(1993, 3, 20), datetime.date(1993, 3, 27), datetime.date(1993, 4, 3), datetime.date(1993, 4, 10), datetime.date(1993, 4, 17), datetime.date(1993, 4, 24), datetime.date(1993, 5, 1), datetime.date(1993, 5, 8), datetime.date(1993, 5, 15), datetime.date(1993, 5, 22), datetime.date(1993, 5, 29), datetime.date(1993, 6, 5), datetime.date(1993, 6, 12), datetime.date(1993, 6, 19), datetime.date(1993, 6, 26), datetime.date(1993, 7, 3), datetime.date(1993, 7, 10), datetime.date(1993, 7, 17), datetime.date(1993, 7, 24), datetime.date(1993, 7, 31), datetime.date(1993, 8, 7), datetime.date(1993, 8, 14), datetime.date(1993, 8, 21), datetime.date(1993, 8, 28), datetime.date(1993, 9, 4), datetime.date(1993, 9, 11), datetime.date(1993, 9, 18), datetime.date(1993, 9, 25), datetime.date(1993, 10, 2), datetime.date(1993, 10, 9), datetime.date(1993, 10, 16), datetime.date(1993, 10, 23), datetime.date(1993, 10, 30), datetime.date(1993, 11, 6), datetime.date(1993, 11, 13), datetime.date(1993, 11, 20), datetime.date(1993, 11, 27), datetime.date(1993, 12, 4), datetime.date(1993, 12, 11), datetime.date(1993, 12, 18), datetime.date(1993, 12, 25), datetime.date(1994, 1, 1), datetime.date(1994, 1, 8), datetime.date(1994, 1, 15), datetime.date(1994, 1, 22), datetime.date(1994, 1, 29), datetime.date(1994, 2, 5), datetime.date(1994, 2, 12), datetime.date(1994, 2, 19), datetime.date(1994, 2, 26), datetime.date(1994, 3, 5), datetime.date(1994, 3, 12), datetime.date(1994, 3, 19), datetime.date(1994, 3, 26), datetime.date(1994, 4, 2), datetime.date(1994, 4, 9), datetime.date(1994, 4, 16), datetime.date(1994, 4, 23), datetime.date(1994, 4, 30), datetime.date(1994, 5, 7), datetime.date(1994, 5, 14), datetime.date(1994, 5, 21), datetime.date(1994, 5, 28), datetime.date(1994, 6, 4), datetime.date(1994, 6, 11), datetime.date(1994, 6, 18), datetime.date(1994, 6, 25), datetime.date(1994, 7, 2), datetime.date(1994, 7, 9), datetime.date(1994, 7, 16), datetime.date(1994, 7, 23), datetime.date(1994, 7, 30), datetime.date(1994, 8, 6), datetime.date(1994, 8, 13), datetime.date(1994, 8, 20), datetime.date(1994, 8, 27), datetime.date(1994, 9, 3), datetime.date(1994, 9, 10), datetime.date(1994, 9, 17), datetime.date(1994, 9, 24), datetime.date(1994, 10, 1), datetime.date(1994, 10, 8), datetime.date(1994, 10, 15), datetime.date(1994, 10, 22), datetime.date(1994, 10, 29), datetime.date(1994, 11, 5), datetime.date(1994, 11, 12), datetime.date(1994, 11, 19), datetime.date(1994, 11, 26), datetime.date(1994, 12, 3), datetime.date(1994, 12, 10), datetime.date(1994, 12, 17), datetime.date(1994, 12, 24), datetime.date(1994, 12, 31)] Traceback (most recent call last): File "makeIndices.py", line 128, in <module> pyplot.setp(pyplot.gca().get_xmajorticklabels(),rotation=30) File "/usr/lib/pymodules/python2.6/matplotlib/axes.py", line 2440, in get_xmajorticklabels self.xaxis.get_majorticklabels()) File "/usr/lib/pymodules/python2.6/matplotlib/axis.py", line 1071, in get_majorticklabels ticks = self.get_major_ticks() File "/usr/lib/pymodules/python2.6/matplotlib/axis.py", line 1169, in get_major_ticks numticks = len(self.get_major_locator()()) File "/usr/lib/pymodules/python2.6/matplotlib/dates.py", line 743, in __call__ self.refresh() File "/usr/lib/pymodules/python2.6/matplotlib/dates.py", line 752, in refresh dmin, dmax = self.viewlim_to_dt() File "/usr/lib/pymodules/python2.6/matplotlib/dates.py", line 524, in viewlim_to_dt return num2date(vmin, self.tz), num2date(vmax, self.tz) File "/usr/lib/pymodules/python2.6/matplotlib/dates.py", line 289, in num2date if not cbook.iterable(x): return _from_ordinalf(x, tz) File "/usr/lib/pymodules/python2.6/matplotlib/dates.py", line 203, in _from_ordinalf dt = datetime.datetime.fromordinal(ix) ValueError: ordinal must be >= 1
On Wed, Feb 8, 2012 at 10:06 AM, Ted To <rai...@th...> wrote: > If it hasn't been fixed, is there a workaround? > > On 02/08/2012 10:42 AM, Ted To wrote: > > I believe I have traced it to some axhline and axis commands and this is > > apparently an old problem. Does it work with version 1.1.0? I have > > 1.0.1 installed on a debian system. > Can you "print(dates)" before calling plot in the environment in which it fails and post the output here. JDH
If it hasn't been fixed, is there a workaround? On 02/08/2012 10:42 AM, Ted To wrote: > I believe I have traced it to some axhline and axis commands and this is > apparently an old problem. Does it work with version 1.1.0? I have > 1.0.1 installed on a debian system. > > On 02/08/2012 09:47 AM, Ted To wrote: >> Hi, >> >> I'm experiencing a very strange problem with plot_date that I can't >> figure out. >> >> pyplot.plot_date(pylab.date2num(dates),diff,'b-',label='Chained') >> pyplot.show() >> >> dates, naturally, is a list of dates and diff is an array of floats. >> With my script, this fails. But if I interactively enter dates and diff >> and then type the above commands, it works with no problems. Any ideas >> or suggestions? >> >> The traceback follows. >> >> Thanks, >> Ted >> >> Exception in Tkinter callback >> Traceback (most recent call last): >> File "/usr/lib/python2.6/lib-tk/Tkinter.py", line 1413, in __call__ >> return self.func(*args) >> File >> "/usr/lib/pymodules/python2.6/matplotlib/backends/backend_tkagg.py", >> line 245, in resize >> self.show() >> File >> "/usr/lib/pymodules/python2.6/matplotlib/backends/backend_tkagg.py", >> line 248, in draw >> FigureCanvasAgg.draw(self) >> File >> "/usr/lib/pymodules/python2.6/matplotlib/backends/backend_agg.py", line >> 394, in draw >> self.figure.draw(self.renderer) >> File "/usr/lib/pymodules/python2.6/matplotlib/artist.py", line 55, in >> draw_wrapper >> draw(artist, renderer, *args, **kwargs) >> File "/usr/lib/pymodules/python2.6/matplotlib/figure.py", line 798, in >> draw >> func(*args) >> File "/usr/lib/pymodules/python2.6/matplotlib/artist.py", line 55, in >> draw_wrapper >> draw(artist, renderer, *args, **kwargs) >> File "/usr/lib/pymodules/python2.6/matplotlib/axes.py", line 1946, in draw >> a.draw(renderer) >> File "/usr/lib/pymodules/python2.6/matplotlib/artist.py", line 55, in >> draw_wrapper >> draw(artist, renderer, *args, **kwargs) >> File "/usr/lib/pymodules/python2.6/matplotlib/axis.py", line 971, in draw >> tick_tups = [ t for t in self.iter_ticks()] >> File "/usr/lib/pymodules/python2.6/matplotlib/axis.py", line 904, in >> iter_ticks >> majorLocs = self.major.locator() >> File "/usr/lib/pymodules/python2.6/matplotlib/dates.py", line 743, in >> __call__ >> self.refresh() >> File "/usr/lib/pymodules/python2.6/matplotlib/dates.py", line 752, in >> refresh >> dmin, dmax = self.viewlim_to_dt() >> File "/usr/lib/pymodules/python2.6/matplotlib/dates.py", line 524, in >> viewlim_to_dt >> return num2date(vmin, self.tz), num2date(vmax, self.tz) >> File "/usr/lib/pymodules/python2.6/matplotlib/dates.py", line 289, in >> num2date >> if not cbook.iterable(x): return _from_ordinalf(x, tz) >> File "/usr/lib/pymodules/python2.6/matplotlib/dates.py", line 203, in >> _from_ordinalf >> dt = datetime.datetime.fromordinal(ix) >> ValueError: ordinal must be >= 1 >> >> ------------------------------------------------------------------------------ >> Keep Your Developer Skills Current with LearnDevNow! >> The most comprehensive online learning library for Microsoft developers >> is just 99ドル.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, >> Metro Style Apps, more. Free future releases when you subscribe now! >> http://p.sf.net/sfu/learndevnow-d2d >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > ------------------------------------------------------------------------------ > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just 99ドル.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
On Wed, Feb 8, 2012 at 8:42 AM, David Craig <dcd...@gm...> wrote: Hi, I have a plot of a time series and I would like to add a single > extra tick mark and label to the plot in a different color to the > already existing tick marks. Is this possible?? > Thanks, > It's fairly easy to do if you want to set the tick locations and labels youself (see http://matplotlib.sourceforge.net/users/artists.html near the end for an overview of the mpl containers like Tick and the attributes they contain). import matplotlib.pyplot as plt import numpy as np fig, ax = plt.subplots(1) ax.plot(np.random.randn(10,2)*10) locs = np.arange(2, 10, 2) labels = ['%d'%loc for loc in locs] ticks, labels = plt.xticks(locs, labels) i = 2 # tick1line and tick2line are matplotlib.lines.Line2D instances ticks[i].tick1line.set_color('red') ticks[i].tick2line.set_color('red') labels[i].set_color('red') plt.show() If you want to "add a tick" using the existing mpl auto tick locating and labeling infrastructure, it is also possible but you will need to subclass the tick locator. JDH
I believe I have traced it to some axhline and axis commands and this is apparently an old problem. Does it work with version 1.1.0? I have 1.0.1 installed on a debian system. On 02/08/2012 09:47 AM, Ted To wrote: > Hi, > > I'm experiencing a very strange problem with plot_date that I can't > figure out. > > pyplot.plot_date(pylab.date2num(dates),diff,'b-',label='Chained') > pyplot.show() > > dates, naturally, is a list of dates and diff is an array of floats. > With my script, this fails. But if I interactively enter dates and diff > and then type the above commands, it works with no problems. Any ideas > or suggestions? > > The traceback follows. > > Thanks, > Ted > > Exception in Tkinter callback > Traceback (most recent call last): > File "/usr/lib/python2.6/lib-tk/Tkinter.py", line 1413, in __call__ > return self.func(*args) > File > "/usr/lib/pymodules/python2.6/matplotlib/backends/backend_tkagg.py", > line 245, in resize > self.show() > File > "/usr/lib/pymodules/python2.6/matplotlib/backends/backend_tkagg.py", > line 248, in draw > FigureCanvasAgg.draw(self) > File > "/usr/lib/pymodules/python2.6/matplotlib/backends/backend_agg.py", line > 394, in draw > self.figure.draw(self.renderer) > File "/usr/lib/pymodules/python2.6/matplotlib/artist.py", line 55, in > draw_wrapper > draw(artist, renderer, *args, **kwargs) > File "/usr/lib/pymodules/python2.6/matplotlib/figure.py", line 798, in > draw > func(*args) > File "/usr/lib/pymodules/python2.6/matplotlib/artist.py", line 55, in > draw_wrapper > draw(artist, renderer, *args, **kwargs) > File "/usr/lib/pymodules/python2.6/matplotlib/axes.py", line 1946, in draw > a.draw(renderer) > File "/usr/lib/pymodules/python2.6/matplotlib/artist.py", line 55, in > draw_wrapper > draw(artist, renderer, *args, **kwargs) > File "/usr/lib/pymodules/python2.6/matplotlib/axis.py", line 971, in draw > tick_tups = [ t for t in self.iter_ticks()] > File "/usr/lib/pymodules/python2.6/matplotlib/axis.py", line 904, in > iter_ticks > majorLocs = self.major.locator() > File "/usr/lib/pymodules/python2.6/matplotlib/dates.py", line 743, in > __call__ > self.refresh() > File "/usr/lib/pymodules/python2.6/matplotlib/dates.py", line 752, in > refresh > dmin, dmax = self.viewlim_to_dt() > File "/usr/lib/pymodules/python2.6/matplotlib/dates.py", line 524, in > viewlim_to_dt > return num2date(vmin, self.tz), num2date(vmax, self.tz) > File "/usr/lib/pymodules/python2.6/matplotlib/dates.py", line 289, in > num2date > if not cbook.iterable(x): return _from_ordinalf(x, tz) > File "/usr/lib/pymodules/python2.6/matplotlib/dates.py", line 203, in > _from_ordinalf > dt = datetime.datetime.fromordinal(ix) > ValueError: ordinal must be >= 1 > > ------------------------------------------------------------------------------ > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just 99ドル.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users