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
(27) |
2
(15) |
3
(2) |
|
4
(4) |
5
(5) |
6
(9) |
7
(15) |
8
(24) |
9
(19) |
10
(7) |
|
11
(13) |
12
(26) |
13
(27) |
14
(17) |
15
(14) |
16
(12) |
17
(9) |
|
18
(12) |
19
(17) |
20
(19) |
21
(5) |
22
(5) |
23
(7) |
24
(4) |
|
25
(1) |
26
(9) |
27
(20) |
28
(5) |
29
(10) |
30
(12) |
31
(6) |
|
From: Michael D. <md...@st...> - 2012-03-08 23:57:31
|
There is a proposed solution to all of this here: https://github.com/matplotlib/matplotlib/pull/746 Please test -- I don't have any nxutils-using code myself, and matplotlib itself has none. We should probably convert some of the nxutils code in the wild into some unit tests. Mike On 03/08/2012 12:37 PM, Benjamin Root wrote: > > > On Thu, Mar 8, 2012 at 11:16 AM, Benjamin Root <ben...@ou... > <mailto:ben...@ou...>> wrote: > > > > On Thu, Mar 8, 2012 at 10:47 AM, John Hunter <jd...@gm... > <mailto:jd...@gm...>> wrote: > > > > On Thu, Mar 8, 2012 at 10:32 AM, Benjamin Root > <ben...@ou... <mailto:ben...@ou...>> wrote: > > > +1 as well. I just took another look at the Path object > and I see no such function. The lack of this function is > a problem for me as well in my existing apps. In order to > deprecate nxutils, this functionality needs to be added to > Path. Otherwise, nxutils *must* be reinstated before the > next release. > > > Michael has already agreed to make a nxutils compatibility > layer that would have the same interface as the old nxutils. > So we are talking about performance, not core functionality. > > We should remember that Michael did the lion's share of the > work on porting mpl to python 3 > (https://github.com/matplotlib/matplotlib/pull/565/commits). > He elected not to port all of the C++ if he could replace > some of the functionality with the core. So those who rely on > bare metal speed the you are getting in nxutils should step up > to either : > > 1) help with the port of nxutils to python 3 > > 2) help with exposing methods in _path.cpp that are almost as > fast or faster > > 3) live with slower speeds in the compatibility layer he has > agreed to write > > 4) ask (nicely) for someone to help you > > I prefer option 2 because this is fairly easy and avoids code > redundancy. It would take just a few lines of extra code to > do this with the python sequence protocol as inputs and python > lists as return values. It would take a bit more to support > numpy arrays as input and output, and we should get input from > Michael about the desirability of making _path.cpp depend on > numpy. I don't see the harm, but I'd like to verify. > > In my opinion, a slower implementation in a > nxutils.py compatibility module is not a release stopper, even > if it is undesirable. > > JDH > > > Don't get me wrong. If help is needed, I can certainly provide it > since it is my itch. I am just a little exasperated with how this > issue has been handled up to now. The shim is a very good idea > and it should have been done back when the py3k merge happened. I > didn't press the issue then because I was traveling and didn't > have time to examine the issue closely, and having _nxutils.so > still in my build hide the problem from me (my own fault). > > As for shim implementation, I would be willing to accept a > slightly slower function now (with the promise of improvements > later), but if the implementation is too much slower, then effort > will need to be made to get it up to acceptable levels. I know of > several users **cough**my future employer**cough** who uses > functionality such as this, and they would not be happy if their > products are dragged down by such a bottleneck. > > Probably about time I dug more into CXX wrapped stuff... > > Ben Root > > > > Looking over the code, it looks like we could generalize > point_in_path_impl() into points_in_path_impl(). The current code > iterates through the path vertices to test a single point. Putting > this action inside a loop (for each point that we want to test) would > mean that this iterator has to be processed each time, which I suspect > would kill performance when the number of vertices is far greater than > the number of test points. > > Tinkering.... > > Ben Root > > > > ------------------------------------------------------------------------------ > Virtualization& Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Paul H. <pmh...@gm...> - 2012-03-08 23:51:58
|
Jerzy et al, Check out the axvline method (of pyplot or an axes object). You'll only have to specify the x-value, and it'll won't rescale your y-axis. -paul On Thu, Mar 8, 2012 at 4:50 AM, Jerzy Karczmarczuk <jer...@un...> wrote: > Nicolas Rougier, (to Mic, who can't see a histogram and a line > simultaneously): > >> You need to specify the ylim because your height may be larger than your histogram and then you cannot see it. > I suspect something similar. The height of matplot_hist.png is 0.040. > The line goes from 0 to 300. The histogram reduces to the bottom line. > There is no immediate relation between max(hist_data) and the height of > a *normed* histogram. > > And, please, if you want to point out the difficulties in making your > programs fulfil your aims, show the REAL, COMPLETE programs, perhaps > with fake, random data, but without useless : "hist_data=[]" > > And don't call a mean: "median" or vice-versa... > > Scaling the axes is easy. "ylim" should be changed, use also the > "extent" parameter (see doc). Drawing axes shifted, as in hist.png is a > bit more involved, and I don't know if you really want that as well. > > Jerzy K. > > > ------------------------------------------------------------------------------ > Virtualization & Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Trillian <sin...@gm...> - 2012-03-08 23:05:09
|
Hello All, How do I control a width and length of a boxes in a stack plot? Currently with the code I have, I can only control the separation or the white-space between the two plots. I would like the top plot to be larger in length and narrow in width while the bottom plot to have the same width as the top but the length to be much shorter than the top. Please see figure. http://old.nabble.com/file/p33468632/RVs.png RVs.png #!/usr/bin/env python import asciitable data = asciitable.read('RVs.dat') # To use the variables in asciitable use col1, col2, etc.. from pylab import * f = figure() subplots_adjust(hspace=1) ax1 = subplot(211) ax1.plot(data.col6,data.col5, 'ko') ylabel('RV using GJ406') title('RV comparison') ax2 = subplot(212, sharex=ax1) ax2.plot(data.col6,data.col5-data.col6,'ko' ) xlabel('RV (km/s)') ylabel('Residuals (km/s)') # The line below takes away the x-axis values from top plot. xticklabels = ax1.get_xticklabels()+ax2.get_xticklabels() setp(xticklabels, visible=True) savefig('RVs.png') Thanks, Trillian -- View this message in context: http://old.nabble.com/Stack-Plot-tp33468632p33468632.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Sourabh B. <sou...@gm...> - 2012-03-08 22:03:08
|
I am creating a PyQT based tool. that has a Figure canvas embedded in it. I want to update the plot on some event. I can draw the plot perfectly. But how do I clear the plot without removing the mouse movement capabilities. axes.cla, fixes the axis movement as well. |
|
From: Jouni K. S. <jk...@ik...> - 2012-03-08 19:46:13
|
Alejandro Weinstein <ale...@gm...> writes: > TypeError: unicode argument expected, got 'str' > I am using MPL verion 1.2.x (built from commit 396a6446). That reminds me of a problem fixed in commit 680edf7, so could you either try cherry-picking that commit or updating to a later revision? Your test case doesn't produce an error on a recent-ish master. -- Jouni K. Seppänen http://www.iki.fi/jks |
|
From: Michael D. <md...@st...> - 2012-03-08 17:38:19
|
On 03/08/2012 12:35 PM, Michael Droettboom wrote: > It shouldn't be a problem to build a compatibility shim -- I'd much > rather do that than have multiple functions Oops -- hit send too soon. I meant to say "I'd much rather do that than have multiple functions that do virtually the same thing" Mike > > Mike > > On 03/08/2012 12:16 PM, Benjamin Root wrote: >> >> >> On Thu, Mar 8, 2012 at 10:47 AM, John Hunter <jd...@gm... >> <mailto:jd...@gm...>> wrote: >> >> >> >> On Thu, Mar 8, 2012 at 10:32 AM, Benjamin Root <ben...@ou... >> <mailto:ben...@ou...>> wrote: >> >> >> +1 as well. I just took another look at the Path object and >> I see no such function. The lack of this function is a >> problem for me as well in my existing apps. In order to >> deprecate nxutils, this functionality needs to be added to >> Path. Otherwise, nxutils *must* be reinstated before the >> next release. >> >> >> Michael has already agreed to make a nxutils compatibility layer >> that would have the same interface as the old nxutils. So we are >> talking about performance, not core functionality. >> >> We should remember that Michael did the lion's share of the work >> on porting mpl to python 3 >> (https://github.com/matplotlib/matplotlib/pull/565/commits). He >> elected not to port all of the C++ if he could replace some of >> the functionality with the core. So those who rely on bare metal >> speed the you are getting in nxutils should step up to either : >> >> 1) help with the port of nxutils to python 3 >> >> 2) help with exposing methods in _path.cpp that are almost as >> fast or faster >> >> 3) live with slower speeds in the compatibility layer he has >> agreed to write >> >> 4) ask (nicely) for someone to help you >> >> I prefer option 2 because this is fairly easy and avoids code >> redundancy. It would take just a few lines of extra code to do >> this with the python sequence protocol as inputs and python lists >> as return values. It would take a bit more to support numpy >> arrays as input and output, and we should get input from Michael >> about the desirability of making _path.cpp depend on numpy. I >> don't see the harm, but I'd like to verify. >> >> In my opinion, a slower implementation in a >> nxutils.py compatibility module is not a release stopper, even if >> it is undesirable. >> >> JDH >> >> >> Don't get me wrong. If help is needed, I can certainly provide it >> since it is my itch. I am just a little exasperated with how this >> issue has been handled up to now. The shim is a very good idea and >> it should have been done back when the py3k merge happened. I didn't >> press the issue then because I was traveling and didn't have time to >> examine the issue closely, and having _nxutils.so still in my build >> hide the problem from me (my own fault). >> >> As for shim implementation, I would be willing to accept a slightly >> slower function now (with the promise of improvements later), but if >> the implementation is too much slower, then effort will need to be >> made to get it up to acceptable levels. I know of several users >> **cough**my future employer**cough** who uses functionality such as >> this, and they would not be happy if their products are dragged down >> by such a bottleneck. >> >> Probably about time I dug more into CXX wrapped stuff... >> >> Ben Root >> >> >> ------------------------------------------------------------------------------ >> Virtualization& Cloud Management Using Capacity Planning >> Cloud computing makes use of virtualization - but cloud computing >> also focuses on allowing computing to be delivered as a service. >> http://www.accelacomm.com/jaw/sfnl/114/51521223/ >> >> >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > ------------------------------------------------------------------------------ > Virtualization& Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Benjamin R. <ben...@ou...> - 2012-03-08 17:37:39
|
On Thu, Mar 8, 2012 at 11:16 AM, Benjamin Root <ben...@ou...> wrote: > > > On Thu, Mar 8, 2012 at 10:47 AM, John Hunter <jd...@gm...> wrote: > >> >> >> On Thu, Mar 8, 2012 at 10:32 AM, Benjamin Root <ben...@ou...> wrote: >> >>> >>> +1 as well. I just took another look at the Path object and I see no >>> such function. The lack of this function is a problem for me as well in my >>> existing apps. In order to deprecate nxutils, this functionality needs to >>> be added to Path. Otherwise, nxutils *must* be reinstated before the next >>> release. >>> >>> >> Michael has already agreed to make a nxutils compatibility layer that >> would have the same interface as the old nxutils. So we are talking about >> performance, not core functionality. >> >> We should remember that Michael did the lion's share of the work on >> porting mpl to python 3 ( >> https://github.com/matplotlib/matplotlib/pull/565/commits). He elected >> not to port all of the C++ if he could replace some of the functionality >> with the core. So those who rely on bare metal speed the you are getting >> in nxutils should step up to either : >> >> 1) help with the port of nxutils to python 3 >> >> 2) help with exposing methods in _path.cpp that are almost as fast or >> faster >> >> 3) live with slower speeds in the compatibility layer he has agreed to >> write >> >> 4) ask (nicely) for someone to help you >> >> I prefer option 2 because this is fairly easy and avoids code redundancy. >> It would take just a few lines of extra code to do this with the python >> sequence protocol as inputs and python lists as return values. It would >> take a bit more to support numpy arrays as input and output, and we should >> get input from Michael about the desirability of making _path.cpp depend on >> numpy. I don't see the harm, but I'd like to verify. >> >> In my opinion, a slower implementation in a >> nxutils.py compatibility module is not a release stopper, even if it is >> undesirable. >> >> JDH >> > > Don't get me wrong. If help is needed, I can certainly provide it since > it is my itch. I am just a little exasperated with how this issue has been > handled up to now. The shim is a very good idea and it should have been > done back when the py3k merge happened. I didn't press the issue then > because I was traveling and didn't have time to examine the issue closely, > and having _nxutils.so still in my build hide the problem from me (my own > fault). > > As for shim implementation, I would be willing to accept a slightly slower > function now (with the promise of improvements later), but if the > implementation is too much slower, then effort will need to be made to get > it up to acceptable levels. I know of several users **cough**my future > employer**cough** who uses functionality such as this, and they would not > be happy if their products are dragged down by such a bottleneck. > > Probably about time I dug more into CXX wrapped stuff... > > Ben Root > Looking over the code, it looks like we could generalize point_in_path_impl() into points_in_path_impl(). The current code iterates through the path vertices to test a single point. Putting this action inside a loop (for each point that we want to test) would mean that this iterator has to be processed each time, which I suspect would kill performance when the number of vertices is far greater than the number of test points. Tinkering.... Ben Root |
|
From: Eric F. <ef...@ha...> - 2012-03-08 17:37:35
|
On 03/08/2012 07:16 AM, Benjamin Root wrote: > > > On Thu, Mar 8, 2012 at 10:47 AM, John Hunter <jd...@gm... > <mailto:jd...@gm...>> wrote: > > > > On Thu, Mar 8, 2012 at 10:32 AM, Benjamin Root <ben...@ou... > <mailto:ben...@ou...>> wrote: > > > +1 as well. I just took another look at the Path object and I > see no such function. The lack of this function is a problem > for me as well in my existing apps. In order to deprecate > nxutils, this functionality needs to be added to Path. > Otherwise, nxutils *must* be reinstated before the next release. > > > Michael has already agreed to make a nxutils compatibility layer > that would have the same interface as the old nxutils. So we are > talking about performance, not core functionality. > > We should remember that Michael did the lion's share of the work on > porting mpl to python 3 > (https://github.com/matplotlib/matplotlib/pull/565/commits). He > elected not to port all of the C++ if he could replace some of the > functionality with the core. So those who rely on bare metal speed > the you are getting in nxutils should step up to either : > > 1) help with the port of nxutils to python 3 > > 2) help with exposing methods in _path.cpp that are almost as fast > or faster > > 3) live with slower speeds in the compatibility layer he has agreed > to write > > 4) ask (nicely) for someone to help you > > I prefer option 2 because this is fairly easy and avoids code > redundancy. It would take just a few lines of extra code to do this > with the python sequence protocol as inputs and python lists as > return values. It would take a bit more to support numpy arrays as > input and output, and we should get input from Michael about the > desirability of making _path.cpp depend on numpy. I don't see the > harm, but I'd like to verify. > > In my opinion, a slower implementation in a > nxutils.py compatibility module is not a release stopper, even if it > is undesirable. > > JDH > > > Don't get me wrong. If help is needed, I can certainly provide it since > it is my itch. I am just a little exasperated with how this issue has > been handled up to now. The shim is a very good idea and it should have > been done back when the py3k merge happened. I didn't press the issue > then because I was traveling and didn't have time to examine the issue > closely, and having _nxutils.so still in my build hide the problem from > me (my own fault). > > As for shim implementation, I would be willing to accept a slightly > slower function now (with the promise of improvements later), but if the > implementation is too much slower, then effort will need to be made to > get it up to acceptable levels. I know of several users **cough**my > future employer**cough** who uses functionality such as this, and they > would not be happy if their products are dragged down by such a bottleneck. For my own purposes I decided to simply copy the pnpoly core and write a cython wrapper, since nxutils did not seem to have a secure future in mpl. If anyone is interested in this approach, see the files _pnpoly.c and utility.pyx (last function therein) in the num/src subdirectory of my "pycurrents" repo: http://currents.soest.hawaii.edu/hgstage/pycurrents/shortlog/tip. The wrapper is brand-new and very lightly tested; I suspect it could be improved considerably. (Also, at present it has only the points_in_poly function.) > > Probably about time I dug more into CXX wrapped stuff... mpl strategy question: stick with CXX and hand-wrapping exclusively, or start using cython? Eric > > Ben Root > > > > ------------------------------------------------------------------------------ > Virtualization& Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Michael D. <md...@st...> - 2012-03-08 17:35:14
|
_path.cpp already has a number of methods that use Numpy arrays (John is mistaken that it doesn't depend on Numpy), so adding another is no problem. It was my understanding that nxutils was an internal usage module and not part of the public API, and therefore could be removed as long as all of the internal references were updated. It doesn't have a '_' prefix, so of course it being private wasn't explicit, but there are number of things in matplotlib that fall into that category. Apparently, I was mistaken and there are a lot of users using it from outside. It shouldn't be a problem to build a compatibility shim -- I'd much rather do that than have multiple functions -- and adding a points_in_poly to _path.cpp should be pretty straightforward. Mike On 03/08/2012 12:16 PM, Benjamin Root wrote: > > > On Thu, Mar 8, 2012 at 10:47 AM, John Hunter <jd...@gm... > <mailto:jd...@gm...>> wrote: > > > > On Thu, Mar 8, 2012 at 10:32 AM, Benjamin Root <ben...@ou... > <mailto:ben...@ou...>> wrote: > > > +1 as well. I just took another look at the Path object and I > see no such function. The lack of this function is a problem > for me as well in my existing apps. In order to deprecate > nxutils, this functionality needs to be added to Path. > Otherwise, nxutils *must* be reinstated before the next release. > > > Michael has already agreed to make a nxutils compatibility layer > that would have the same interface as the old nxutils. So we are > talking about performance, not core functionality. > > We should remember that Michael did the lion's share of the work > on porting mpl to python 3 > (https://github.com/matplotlib/matplotlib/pull/565/commits). He > elected not to port all of the C++ if he could replace some of the > functionality with the core. So those who rely on bare metal > speed the you are getting in nxutils should step up to either : > > 1) help with the port of nxutils to python 3 > > 2) help with exposing methods in _path.cpp that are almost as fast > or faster > > 3) live with slower speeds in the compatibility layer he has > agreed to write > > 4) ask (nicely) for someone to help you > > I prefer option 2 because this is fairly easy and avoids code > redundancy. It would take just a few lines of extra code to do > this with the python sequence protocol as inputs and python lists > as return values. It would take a bit more to support numpy > arrays as input and output, and we should get input from Michael > about the desirability of making _path.cpp depend on numpy. I > don't see the harm, but I'd like to verify. > > In my opinion, a slower implementation in a > nxutils.py compatibility module is not a release stopper, even if > it is undesirable. > > JDH > > > Don't get me wrong. If help is needed, I can certainly provide it > since it is my itch. I am just a little exasperated with how this > issue has been handled up to now. The shim is a very good idea and it > should have been done back when the py3k merge happened. I didn't > press the issue then because I was traveling and didn't have time to > examine the issue closely, and having _nxutils.so still in my build > hide the problem from me (my own fault). > > As for shim implementation, I would be willing to accept a slightly > slower function now (with the promise of improvements later), but if > the implementation is too much slower, then effort will need to be > made to get it up to acceptable levels. I know of several users > **cough**my future employer**cough** who uses functionality such as > this, and they would not be happy if their products are dragged down > by such a bottleneck. > > Probably about time I dug more into CXX wrapped stuff... > > Ben Root > > > ------------------------------------------------------------------------------ > Virtualization& Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Benjamin R. <ben...@ou...> - 2012-03-08 17:17:02
|
On Thu, Mar 8, 2012 at 10:47 AM, John Hunter <jd...@gm...> wrote: > > > On Thu, Mar 8, 2012 at 10:32 AM, Benjamin Root <ben...@ou...> wrote: > >> >> +1 as well. I just took another look at the Path object and I see no >> such function. The lack of this function is a problem for me as well in my >> existing apps. In order to deprecate nxutils, this functionality needs to >> be added to Path. Otherwise, nxutils *must* be reinstated before the next >> release. >> >> > Michael has already agreed to make a nxutils compatibility layer that > would have the same interface as the old nxutils. So we are talking about > performance, not core functionality. > > We should remember that Michael did the lion's share of the work on > porting mpl to python 3 ( > https://github.com/matplotlib/matplotlib/pull/565/commits). He elected > not to port all of the C++ if he could replace some of the functionality > with the core. So those who rely on bare metal speed the you are getting > in nxutils should step up to either : > > 1) help with the port of nxutils to python 3 > > 2) help with exposing methods in _path.cpp that are almost as fast or > faster > > 3) live with slower speeds in the compatibility layer he has agreed to > write > > 4) ask (nicely) for someone to help you > > I prefer option 2 because this is fairly easy and avoids code redundancy. > It would take just a few lines of extra code to do this with the python > sequence protocol as inputs and python lists as return values. It would > take a bit more to support numpy arrays as input and output, and we should > get input from Michael about the desirability of making _path.cpp depend on > numpy. I don't see the harm, but I'd like to verify. > > In my opinion, a slower implementation in a > nxutils.py compatibility module is not a release stopper, even if it is > undesirable. > > JDH > Don't get me wrong. If help is needed, I can certainly provide it since it is my itch. I am just a little exasperated with how this issue has been handled up to now. The shim is a very good idea and it should have been done back when the py3k merge happened. I didn't press the issue then because I was traveling and didn't have time to examine the issue closely, and having _nxutils.so still in my build hide the problem from me (my own fault). As for shim implementation, I would be willing to accept a slightly slower function now (with the promise of improvements later), but if the implementation is too much slower, then effort will need to be made to get it up to acceptable levels. I know of several users **cough**my future employer**cough** who uses functionality such as this, and they would not be happy if their products are dragged down by such a bottleneck. Probably about time I dug more into CXX wrapped stuff... Ben Root |
|
From: Ryan M. <rm...@gm...> - 2012-03-08 17:07:12
|
On Thu, Mar 8, 2012 at 10:47 AM, John Hunter <jd...@gm...> wrote: > I prefer option 2 because this is fairly easy and avoids code redundancy. > It would take just a few lines of extra code to do this with the python > sequence protocol as inputs and python lists as return values. It would > take a bit more to support numpy arrays as input and output, and we should > get input from Michael about the desirability of making _path.cpp depend on > numpy. I don't see the harm, but I'd like to verify. > > In my opinion, a slower implementation in a nxutils.py compatibility module > is not a release stopper, even if it is undesirable. +1 Python 3 support is more important and, quite frankly, overdue--especially given how long it's been sitting in the tree. Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma |
|
From: John H. <jd...@gm...> - 2012-03-08 16:47:54
|
On Thu, Mar 8, 2012 at 10:32 AM, Benjamin Root <ben...@ou...> wrote: > > +1 as well. I just took another look at the Path object and I see no such > function. The lack of this function is a problem for me as well in my > existing apps. In order to deprecate nxutils, this functionality needs to > be added to Path. Otherwise, nxutils *must* be reinstated before the next > release. > > Michael has already agreed to make a nxutils compatibility layer that would have the same interface as the old nxutils. So we are talking about performance, not core functionality. We should remember that Michael did the lion's share of the work on porting mpl to python 3 ( https://github.com/matplotlib/matplotlib/pull/565/commits). He elected not to port all of the C++ if he could replace some of the functionality with the core. So those who rely on bare metal speed the you are getting in nxutils should step up to either : 1) help with the port of nxutils to python 3 2) help with exposing methods in _path.cpp that are almost as fast or faster 3) live with slower speeds in the compatibility layer he has agreed to write 4) ask (nicely) for someone to help you I prefer option 2 because this is fairly easy and avoids code redundancy. It would take just a few lines of extra code to do this with the python sequence protocol as inputs and python lists as return values. It would take a bit more to support numpy arrays as input and output, and we should get input from Michael about the desirability of making _path.cpp depend on numpy. I don't see the harm, but I'd like to verify. In my opinion, a slower implementation in a nxutils.py compatibility module is not a release stopper, even if it is undesirable. JDH |
|
From: Jerzy K. <jer...@un...> - 2012-03-08 16:45:13
|
federico vaggi: > I am drawing a line with n points, using a particle marker - > something like: > > x = np.linspace(1,10,11) ** 2 > y = np.linspace(1,10,11) > ZZZ=plot(x,y,'ro') > > Is there any way to change the 7th dot (7, 49) to be a blue star > instead of a red circle? > > I was considering using the scatter function to scatter points 1:6 and > 8:10 separately with 'ro' and then scatter 7 with the right > properties... is that the easiest way? I might be silly, but I believe that this IS the easiest way. In the program above ZZZ (which I put myself) is a list containing just ONE Line2D object, with a common set of properties, such as set_markerfacecolor() or set_marker_size(), and if you use them, all markers change. The data attached to the plot have no information about markers. So, if a way exists at all, to change just one marker, it would be quite involved, and a second plot seems easier than anything else. But a true specialist might know The Real Magic... Jerzy Karczmarczuk |
|
From: Benjamin R. <ben...@ou...> - 2012-03-08 16:38:13
|
On Thu, Mar 8, 2012 at 10:18 AM, federico vaggi <vag...@gm...>wrote: > Hi, > > I have a very simple request - I am drawing a line with n points, using a > particle marker - something like: > > x = np.linspace(1,10,11) ** 2 > y = np.linspace(1,10,11) > plot(x,y,'ro') > > Is there any way to change the 7th dot (7, 49) to be a blue star instead > of a red circle? > > I was considering using the scatter function to scatter points 1:6 and > 8:10 separately with 'ro' and then scatter 7 with the right properties... > is that the easiest way? > Thanks a lot, > > Federico > > Pretty much. Although, you could possibly just do the first plot normally and then have the scatter function simply plot the red star over the blue circle (maybe make the star size bigger to fully cover the blue circle?). Ben Root |
|
From: Benjamin R. <ben...@ou...> - 2012-03-08 16:32:59
|
On Thu, Mar 8, 2012 at 10:21 AM, Dharhas Pothina < Dha...@tw...> wrote: > > + one on this issue. One of the big advantages of the nxutils points in > poly is that you could pass it a large numpy array of points and get back a > mask. We found this to be significantly faster than using looping through > the single point in poly algorithms from packages like shapely. Echoing > Jorge's question how would we do this using contains_point(). > > > - dharhas > > > > >>> Jorge Scandaliaris <jor...@ya...> 3/8/2012 3:33 AM >>> > > Benjamin Root <ben.root@...> writes: > > <snip> > > > > Essentially, you make a Path object using the vertices, and then use its > > contains_point() method. > > Ben Root > > > > OK, but given that contains_point works with a *single* point at a time, I > have > to call it for all my points which is a bit more cumbersome, or am I > missing > something? > > Jorge > > > +1 as well. I just took another look at the Path object and I see no such function. The lack of this function is a problem for me as well in my existing apps. In order to deprecate nxutils, this functionality needs to be added to Path. Otherwise, nxutils *must* be reinstated before the next release. Ben Root |
|
From: John H. <jd...@gm...> - 2012-03-08 16:31:06
|
On Thu, Mar 8, 2012 at 10:21 AM, Dharhas Pothina < Dha...@tw...> wrote: > > + one on this issue. One of the big advantages of the nxutils points in > poly is that you could pass it a large numpy array of points and get back a > mask. We found this to be significantly faster than using looping through > the single point in poly algorithms from packages like shapely. Echoing > Jorge's question how would we do this using contains_point(). > One could modify src/_path.cpp to expose a "points_in_path" method so the looping would be done in C++. The underlying work is being done in point_in_path_impl and exposed to python as point_in_path. It would not be too much work to expose a points_in_path method, but we would have to think about what arguments to take and to return. _path.cpp does not currently depend on numpy, and doing things via python list would be slower than what we currently have in nxutils which is array aware. JDH |
|
From: Dharhas P. <Dha...@tw...> - 2012-03-08 16:21:38
|
+ one on this issue. One of the big advantages of the nxutils points in poly is that you could pass it a large numpy array of points and get back a mask. We found this to be significantly faster than using looping through the single point in poly algorithms from packages like shapely. Echoing Jorge's question how would we do this using contains_point(). - dharhas >>> Jorge Scandaliaris <jor...@ya...> 3/8/2012 3:33 AM >>> Benjamin Root <ben.root@...> writes: <snip> > > Essentially, you make a Path object using the vertices, and then use its > contains_point() method. > Ben Root > OK, but given that contains_point works with a *single* point at a time, I have to call it for all my points which is a bit more cumbersome, or am I missing something? Jorge ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Matplotlib-users mailing list Mat...@li... https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: federico v. <vag...@gm...> - 2012-03-08 16:18:11
|
Hi, I have a very simple request - I am drawing a line with n points, using a particle marker - something like: x = np.linspace(1,10,11) ** 2 y = np.linspace(1,10,11) plot(x,y,'ro') Is there any way to change the 7th dot (7, 49) to be a blue star instead of a red circle? I was considering using the scatter function to scatter points 1:6 and 8:10 separately with 'ro' and then scatter 7 with the right properties... is that the easiest way? Thanks a lot, Federico |
|
From: spey_skaddet <qua...@ya...> - 2012-03-08 14:44:00
|
Hi, first time I'm posting here. I'm fairly new to using pylab, and I
recently started using tkinter and the canvas widget, and I think I really
messed something up!
I'm running a pdsoft version Python 2.6.2 (r262:71600, Sep 24 2009,
11:47:14) on UNIX (AFS system - not by choice)!
Some background info, might be useful:
A few weeks ago I could happily run my .py script, though knew I may have
been doing something wrong (not opening/closing a loop as needed): Every
time I would run my script, the 'canvas' with my images would pop up, and
then when I'd edit my file and re-run the script, I'd simply close the 'old'
canvas with the mouse when the new canvas would appear. I could not figure
out how to elegantly exit using tkinter/canvas (tried Google searches but
didn't find anything after a while).
Here is an excerpt from the script that worked (comments deleted):
===
from Tkinter import *
window=Tk()
window.title('Canvas Window')
evol=Canvas(window,width=500,height=1000,background='white')
evol.pack()
evol.create_oval(90,210,170,290,fill="light blue")
evol.create_oval(350,230,390,270,fill="cyan")
evol.create_text(130,250,text='He',font=('verdana',11))
evol.create_line(170,250,350,250,width=3)
evol.create_polygon(350,250,340,240,340,260,fill="black")
evol.create_text(255,230,text=' MT ',font=('verdana',11))
evol.create_text(50,240,text='t=102',font=('verdana',11))
evol.create_text(50,260,text='M1=0.96',font=('verdana',11))
evol.create_text(440,260,text='M2=6.62',font=('verdana',11))
evol.create_text(440,240,text='a=258',font=('verdana',11))
retval = evol.postscript(file="blah.eps", height=1000, width=500,
colormode="color")
===
Anyway this all seemed to be working, until last week when I ran my script
again, and now I receive the following message:
===
TclError Traceback (most recent call last)
/MYDIR/<ipython console> in <module>()
/MYDIR/evolgrid.py in <module>()
26
27 ## create a window:
---> 28 window=Tk()
29 ## change window's name to 'Canvas Window':
30 window.title('Canvas Window')
/usr/common/pdsoft/appl/pyapps/lib/python2.6/lib-tk/Tkinter.pyc in
__init__(self, screenName, baseName, className, useTk, sync, use)
1641 baseName = baseName + ext
1642 interactive = 0
-> 1643 self.tk = _tkinter.create(screenName, baseName, className,
interactive, wantobjects, useTk, sync, use)
1644 if useTk:
1645 self._loadtk()
TclError: out of stack space (infinite loop?)
===
Also, since this problem, now whenever I start up with 'ipython -pylab', and
type figure() (just as a test), I get the following message:
===
TclError Traceback (most recent call last)
/MYDIR/<ipython console> in <module>()
/usr/common/pdsoft/appl/pyapps/lib/python2.6/site-packages/matplotlib/pyplot.pyc
in figure(num, figsize, dpi, facecolor, edgecolor, frameon, FigureClass,
**kwargs)
268 frameon=frameon,
269
FigureClass=FigureClass,
--> 270 **kwargs)
271
272 # make this figure current on button press event
/usr/common/pdsoft/appl/pyapps/lib/python2.6/site-packages/matplotlib/backends/backend_tkagg.pyc
in new_figure_manager(num, *args, **kwargs)
81 FigureClass = kwargs.pop('FigureClass', Figure)
82 figure = FigureClass(*args, **kwargs)
---> 83 window = Tk.Tk()
84 canvas = FigureCanvasTkAgg(figure, master=window)
85 figManager = FigureManagerTkAgg(canvas, num, window)
/usr/common/pdsoft/appl/pyapps/lib/python2.6/lib-tk/Tkinter.pyc in
__init__(self, screenName, baseName, className, useTk, sync, use)
1641 baseName = baseName + ext
1642 interactive = 0
-> 1643 self.tk = _tkinter.create(screenName, baseName, className,
interactive, wantobjects, useTk, sync, use)
1644 if useTk:
1645 self._loadtk()
TclError: out of stack space (infinite loop?)
===
So, something is really messed up! Can someone help me? :-/
--
View this message in context: http://old.nabble.com/pylab-TclError%3A-out-of-stack-space---tkinter--tp33465359p33465359.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
|
|
From: Jerzy K. <jer...@un...> - 2012-03-08 12:50:57
|
Nicolas Rougier, (to Mic, who can't see a histogram and a line simultaneously): > You need to specify the ylim because your height may be larger than your histogram and then you cannot see it. I suspect something similar. The height of matplot_hist.png is 0.040. The line goes from 0 to 300. The histogram reduces to the bottom line. There is no immediate relation between max(hist_data) and the height of a *normed* histogram. And, please, if you want to point out the difficulties in making your programs fulfil your aims, show the REAL, COMPLETE programs, perhaps with fake, random data, but without useless : "hist_data=[]" And don't call a mean: "median" or vice-versa... Scaling the axes is easy. "ylim" should be changed, use also the "extent" parameter (see doc). Drawing axes shifted, as in hist.png is a bit more involved, and I don't know if you really want that as well. Jerzy K. |
|
From: Jorge S. <jor...@ya...> - 2012-03-08 09:34:16
|
Benjamin Root <ben.root@...> writes: <snip> > > Essentially, you make a Path object using the vertices, and then use its > contains_point() method. > Ben Root > OK, but given that contains_point works with a *single* point at a time, I have to call it for all my points which is a bit more cumbersome, or am I missing something? Jorge |
|
From: Nicolas R. <Nic...@in...> - 2012-03-08 08:26:36
|
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 = 'out')
data = np.random.normal(0,1,100)
fig = plt.figure(figsize=(8,6), dpi=72, facecolor='w')
axes = plt.subplot(111)
axes.axvline(np.mean(data), 0, data.max(), linewidth=2, color='red')
axes.hist(data, bins=50, normed=True)
axes.set_ylim(0, 1)
axes.set_xlim(-3, 3)
axes.spines['right'].set_color('none')
axes.spines['top'].set_color('none')
axes.xaxis.set_ticks_position('bottom')
axes.spines['bottom'].set_position(('data', -0.05))
axes.yaxis.set_ticks_position('left')
axes.spines['left'].set_position(('data',-3.25))
plt.show()
Nicolas
On Mar 8, 2012, at 7:54 , Mic wrote:
> Hi Jerzy,
> Thank you for your answer. With the code below I get only a green line (see attached line.png):
>
> import numpy as np
> import matplotlib.pyplot as plt
>
> hist_data = []
>
> heigth = max(hist_data) + 10
> mean = np.mean(hist_data)
>
> f = plt.figure()
> h = f.add_subplot(111)
> h.hist(hist_data, bins=50, normed=True)
> h.plot([mean,mean],[0,height])
> f.savefig('myhist.png')
>
> without h.plot() I get a histogram (see attached matplot_hist.png).
>
> How can I get the line and the histogram at the same time in the picture?
> How is it possible to norm the vertical axis in order to get similar results like in this picture (see attached hist.png)?
>
> Thank you in advance.
>
> On Wed, Mar 7, 2012 at 6:41 PM, Jerzy Karczmarczuk <jer...@un...> wrote:
> Mic:
>> Hello,
>> I am able to draw a histogram with the following code:
>>
>> ...
>> h.hist(hist_data, bins=50, normed=True)
>>
>> However, I don't know how to draw a line for median at 249 position like in attachment.
> Are your axes really matplotlib axes? (I have doubts, since the vertical is not normed, although your histogram is).
>
> In your real axes, the command plot([249,249],[0,height]) draws a vertical line (there is a primitive vert. line as well), what is the problem??
>
> Jerzy Karczmarczuk
>
>
>
> ------------------------------------------------------------------------------
> Virtualization & Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
> <line.png><matplot_hist.png><hist.png>------------------------------------------------------------------------------
> Virtualization & Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/_______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|
|
From: questions a. <que...@gm...> - 2012-03-08 04:21:09
|
Hi all,
I am still having a problem with the same code. I am not sure if maybe the
problem is how I read the data in as numpy.genfromtxt
Is there a step I need to take to convert the data to numpy array to then
read into matplotlib?
Thanks
On Fri, Mar 2, 2012 at 11:49 AM, questions anon <que...@gm...>wrote:
> python, numpy through enthought -
> Python 2.7.2 |EPD 7.1-1 (32-bit)| (default, Jul 3 2011, 15:13:59) [MSC
> v.1500 32 bit (Intel)] on win32
> imports at the top of the script:
>
> import numpy as N
> import matplotlib.pyplot as plt
> from numpy import ma as MA
> from mpl_toolkits.basemap import Basemap
> import os
>
>
>
> On Thu, Mar 1, 2012 at 4:42 PM, Benjamin Root <ben...@ou...> wrote:
>
>>
>>
>> On Wednesday, February 29, 2012, questions anon wrote:
>>
>>> I have had some progress reading in the data but am unsure how to create
>>> lats and lons from the info I have (see above).
>>> the error I am receiving is:
>>>
>>> Traceback (most recent call last):
>>> File "d:\plotrainfall.py", line 40, in <module>
>>> CS = map.contourf(x,y, f, 15,cmap=plt.cm.jet)
>>> File "C:\Python27\lib\site-packages\mpl_toolkits\basemap\__init__.py",
>>> line 3072, in contourf
>>>
>>> np.logical_or(outsidemask,np.logical_or(ma.getmaskarray(data),xymask))
>>> AttributeError: logical_or
>>>
>>>
>>> from the below code:
>>>
>>>
>>> onefile=r"E:/test_in/r19000117.txt"
>>>
>>> f=N.genfromtxt(onefile, skip_header=6, dtype=float, names=True)
>>> print f
>>>
>>>
>>> map = Basemap(projection='merc',llcrnrlat=-45,urcrnrlat=-9,
>>>
>>> llcrnrlon=111.975,urcrnrlon=156.525,lat_ts=0,resolution='i')
>>> map.drawcoastlines()
>>> map.drawstates()
>>> xi=N.linspace(111.975, 156.275, 886)
>>> yi=N.linspace(-44.525, -9.975, 691)
>>> x,y=map(*N.meshgrid(xi,yi))
>>> plt.title('rainfall')
>>> CS = map.contourf(x,y, f, 15,cmap=plt.cm.jet)
>>> l,b,w,h =0.1,0.1,0.8,0.8
>>> cax = plt.axes([l+w+0.025, b, 0.025, h])
>>> plt.colorbar(CS,cax=cax, drawedges=True)
>>> plt.savefig((os.path.join(OutputFolder, 'rainfall.png')))
>>> plt.show()
>>> plt.close()
>>>
>>>
>>>
>> How did you install numpy? Which version are you using? What are your
>> imports at the top of this script?
>>
>> Ben Root
>>
>
>
|