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
(2) |
2
(32) |
3
(26) |
4
(29) |
5
(41) |
6
(2) |
7
(1) |
8
(13) |
9
(15) |
10
(23) |
11
(23) |
12
(16) |
13
(6) |
14
(15) |
15
(4) |
16
(18) |
17
(28) |
18
(17) |
19
(11) |
20
(6) |
21
(2) |
22
(4) |
23
(1) |
24
|
25
|
26
(1) |
27
(2) |
28
(2) |
29
(3) |
30
(10) |
31
(2) |
|
|
|
From: Gökhan S. <gok...@gm...> - 2012-10-17 16:17:26
|
Thanks Mike, Another point I noticed is setting linewidth to 0 (in fill_between function) isn't working as expected when figure is saved as a PDF file. I noticed this while posting a sample script on scipy-users: http://atmos.uwyo.edu/~gsever/data/test/curvefit_test.py Compare the outputs of pdf and png to see the difference that I am mentioning: http://atmos.uwyo.edu/~gsever/data/test/curvefit_test.pdf http://atmos.uwyo.edu/~gsever/data/test/curvefit_test.png On Wed, Oct 17, 2012 at 9:16 AM, Michael Droettboom <md...@st...> wrote: > Filed as https://github.com/matplotlib/matplotlib/issues/1410 > > > On 10/16/2012 10:38 PM, Eric Firing wrote: > > On 2012/10/16 4:27 PM, Gökhan Sever wrote: > > Hello, > > I see that a few days old clone of mpl, cannot save open symbols > correctly in a pdf file. > > Here is a simple test case (in ipython --pylab): > > I6 xx = np.random.random(1000) > > I7 plt.plot(xx, 'D', mfc='none') > > On screen open symbols are fine, as expected transparency works fine, > however when saved in pdf transparency disappears, symbols cover each > other. (Saving to png is also fine) > > Could you confirm if this is a case in another installation? > > Confirmed with 1.2.x. The problem is only on pdf; ps and svg are correct. > > Eric > > > Thanks. > > -- > Gökhan > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today:http://p.sf.net/sfu/appdyn_sfd2d_oct > > > > _______________________________________________ > Matplotlib-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today:http://p.sf.net/sfu/appdyn_sfd2d_oct > _______________________________________________ > Matplotlib-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- Gökhan |
From: Daπid <dav...@gm...> - 2012-10-17 15:20:29
|
I also think that would be useful. It would, for example, allow to generate "preview" plots from other languages, without interfacing them to Python. It must be said that MPL is actually quite nice looking in the default settings for basic plotting, and this is an nice feature that can exploit. I have seen many pieces of code using SuperMongo for plotting. I find it absolutely ugly, and super expensive, but it is probably the easier plotting system to call from FORTRAN (or, at least, it was). On Wed, Oct 17, 2012 at 3:15 PM, Michael Droettboom <md...@st...> wrote: > I think this could be very useful -- and might help increase the user > base beyond the Python community. As I, and most of us on this list, > are quite comfortable with Python, I don't think I'd use it myself, but > I certainly see the utility of it. > > Mike > > On 10/17/2012 06:38 AM, Damon McDougall wrote: >> All, >> >> I was brain-storming yesterday and I wanted to test the waters to see >> if people would find it useful. >> >> Currently, GNU plotutils comes with command-line utilities such as >> `graph` to create quick and dirty line plots like this: >> http://www.gnu.org/software/gsl/manual/html_node/DWT-Examples.html. I >> think even gnuplot might be similar. >> >> How do people feel about perhaps adding a matplotlib version, mocking >> the same calling signature as graph? >> >> I think the most important question is: would it be useful? >> > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Michael D. <md...@st...> - 2012-10-17 15:17:14
|
Filed as https://github.com/matplotlib/matplotlib/issues/1410 On 10/16/2012 10:38 PM, Eric Firing wrote: > On 2012/10/16 4:27 PM, Gökhan Sever wrote: >> Hello, >> >> I see that a few days old clone of mpl, cannot save open symbols >> correctly in a pdf file. >> >> Here is a simple test case (in ipython --pylab): >> >> I6 xx = np.random.random(1000) >> >> I7 plt.plot(xx, 'D', mfc='none') >> >> On screen open symbols are fine, as expected transparency works fine, >> however when saved in pdf transparency disappears, symbols cover each >> other. (Saving to png is also fine) >> >> Could you confirm if this is a case in another installation? > Confirmed with 1.2.x. The problem is only on pdf; ps and svg are correct. > > Eric > >> Thanks. >> >> -- >> Gökhan >> >> >> ------------------------------------------------------------------------------ >> Everyone hates slow websites. So do we. >> Make your web apps faster with AppDynamics >> Download AppDynamics Lite for free today: >> http://p.sf.net/sfu/appdyn_sfd2d_oct >> >> >> >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Michael D. <md...@st...> - 2012-10-17 13:15:59
|
I think this could be very useful -- and might help increase the user base beyond the Python community. As I, and most of us on this list, are quite comfortable with Python, I don't think I'd use it myself, but I certainly see the utility of it. Mike On 10/17/2012 06:38 AM, Damon McDougall wrote: > All, > > I was brain-storming yesterday and I wanted to test the waters to see > if people would find it useful. > > Currently, GNU plotutils comes with command-line utilities such as > `graph` to create quick and dirty line plots like this: > http://www.gnu.org/software/gsl/manual/html_node/DWT-Examples.html. I > think even gnuplot might be similar. > > How do people feel about perhaps adding a matplotlib version, mocking > the same calling signature as graph? > > I think the most important question is: would it be useful? > |
From: Alejandro W. <ale...@gm...> - 2012-10-17 12:21:59
|
On Wed, Oct 17, 2012 at 1:41 AM, Eric Firing <ef...@ha...> wrote: > sudo apt-get build-dep python-matplotlib > > It might pull in more than you really want, but it will certainly > include gui toolkits. If you want to avoid installing all the packages that you get with the `apt-get build-dep pythoh-matplotlib`, the following seems to be enough: sudo apt-get install libfreetype6-dev libpng12-dev python-tk tk-dev python-gtk2-dev Alejandro. |
From: Damon M. <dam...@gm...> - 2012-10-17 10:38:37
|
All, I was brain-storming yesterday and I wanted to test the waters to see if people would find it useful. Currently, GNU plotutils comes with command-line utilities such as `graph` to create quick and dirty line plots like this: http://www.gnu.org/software/gsl/manual/html_node/DWT-Examples.html. I think even gnuplot might be similar. How do people feel about perhaps adding a matplotlib version, mocking the same calling signature as graph? I think the most important question is: would it be useful? -- Damon McDougall http://www.damon-is-a-geek.com B2.39 Mathematics Institute University of Warwick Coventry West Midlands CV4 7AL United Kingdom |
From: Francesco M. <fra...@gm...> - 2012-10-17 10:15:44
|
2012/10/17 Damon McDougall <dam...@gm...> > On Wed, Oct 17, 2012 at 9:12 AM, Francesco Montesano > <fra...@gm...> wrote: > > > > > > 2012/10/17 Eric Firing <ef...@ha...> > >> > >> On 2012/10/16 9:22 PM, Francesco Montesano wrote: > >> > Dear list, > >> > > >> > I've see a difference between the default backend between > >> > > >> > v1.1.1 (shipped with kubuntu 12.10dev) and v1.2.0.rc1, 1.2.0rc2 and > >> > master (1.3.x). > >> > > >> > > >> > My set up is to call ipython with pylab and turn on interactive mode. > I > >> > still haven't copied over my matplotlibrc file from my work computer > >> > (there I use qtagg, if I remember well) > >> > > >> > > >> > On v1.1.1 the default is [backend: TkAgg], while in the other two > cases > >> > it is [backend: agg]. Is there some reason for this difference? > >> > >> The default should be based on what is found when mpl is built, so it > >> sounds like when you are building v1.2.x, none of the supported gui > >> toolkits is being found. I don't know why that is. Are you installing > >> on a system that has gui toolkits already installed? > > > > I think so, as the v1.1.1 shipped with my OS is using TkAgg as backend > and I > > can plot interactively. > > > > When I build from source I get > > OPTIONAL BACKEND DEPENDENCIES > > libpng: found, but unknown version (no pkg-config) > > Tkinter: no > > * Using default library and include directories > for > > * Tcl and Tk because a Tk window failed to open. > > * You may need to define DISPLAY for Tk to work > so > > * that setup can determine where your libraries > are > > * located. Tkinter present, but header files are > not > > * found. You may need to install development > > * packages. > > * You may need to install 'dev' package(s) to > > * provide header files. > > Gtk+: no > > * Could not find Gtk+ headers in any of > > * '/usr/local/include', '/usr/include', > > * '/usr/local/include', '/usr/include', '.' > > Mac OS X native: no > > Qt: no > > Qt4: Qt: 4.8.2, PyQt4: 4.9.3 > > PySide: no > > Cairo: 1.8.8 > > > > Could be a problem with Tkinter and dev packages. > > > > > >> > >> > >> One useful > >> technique with ubuntu derivatives is to do > >> > >> sudo apt-get build-dep python-matplotlib > >> > > probably it's easier if I just switch to qtagg, as I already have it > > > >> > >> It might pull in more than you really want, but it will certainly > >> include gui toolkits. > >> > >> Eric > > > > Thanks, > > Francesco > > > >> > >> > >> > > >> > > >> > cheers, > >> > > >> > Francesco > > Packages have whatever default backend the maintainer decided to build > them with. For example, the macports packaged version of matplotlib is > maintained by someone who specifies the macosx backend to be the > default. When building from source, I think the TkAgg backend is the > default, because most platforms have tkinter installed out of the box. > Since it appears you don't have Tkinter installed, Agg is the default. > > Agg is a non-gui backend (but it produces awesome output). > Thanks for the explanation. Fra > > -- > Damon McDougall > http://www.damon-is-a-geek.com > B2.39 > Mathematics Institute > University of Warwick > Coventry > West Midlands > CV4 7AL > United Kingdom > |
From: Damon M. <dam...@gm...> - 2012-10-17 10:08:47
|
On Wed, Oct 17, 2012 at 9:12 AM, Francesco Montesano <fra...@gm...> wrote: > > > 2012/10/17 Eric Firing <ef...@ha...> >> >> On 2012/10/16 9:22 PM, Francesco Montesano wrote: >> > Dear list, >> > >> > I've see a difference between the default backend between >> > >> > v1.1.1 (shipped with kubuntu 12.10dev) and v1.2.0.rc1, 1.2.0rc2 and >> > master (1.3.x). >> > >> > >> > My set up is to call ipython with pylab and turn on interactive mode. I >> > still haven't copied over my matplotlibrc file from my work computer >> > (there I use qtagg, if I remember well) >> > >> > >> > On v1.1.1 the default is [backend: TkAgg], while in the other two cases >> > it is [backend: agg]. Is there some reason for this difference? >> >> The default should be based on what is found when mpl is built, so it >> sounds like when you are building v1.2.x, none of the supported gui >> toolkits is being found. I don't know why that is. Are you installing >> on a system that has gui toolkits already installed? > > I think so, as the v1.1.1 shipped with my OS is using TkAgg as backend and I > can plot interactively. > > When I build from source I get > OPTIONAL BACKEND DEPENDENCIES > libpng: found, but unknown version (no pkg-config) > Tkinter: no > * Using default library and include directories for > * Tcl and Tk because a Tk window failed to open. > * You may need to define DISPLAY for Tk to work so > * that setup can determine where your libraries are > * located. Tkinter present, but header files are not > * found. You may need to install development > * packages. > * You may need to install 'dev' package(s) to > * provide header files. > Gtk+: no > * Could not find Gtk+ headers in any of > * '/usr/local/include', '/usr/include', > * '/usr/local/include', '/usr/include', '.' > Mac OS X native: no > Qt: no > Qt4: Qt: 4.8.2, PyQt4: 4.9.3 > PySide: no > Cairo: 1.8.8 > > Could be a problem with Tkinter and dev packages. > > >> >> >> One useful >> technique with ubuntu derivatives is to do >> >> sudo apt-get build-dep python-matplotlib >> > probably it's easier if I just switch to qtagg, as I already have it > >> >> It might pull in more than you really want, but it will certainly >> include gui toolkits. >> >> Eric > > Thanks, > Francesco > >> >> >> > >> > >> > cheers, >> > >> > Francesco Packages have whatever default backend the maintainer decided to build them with. For example, the macports packaged version of matplotlib is maintained by someone who specifies the macosx backend to be the default. When building from source, I think the TkAgg backend is the default, because most platforms have tkinter installed out of the box. Since it appears you don't have Tkinter installed, Agg is the default. Agg is a non-gui backend (but it produces awesome output). -- Damon McDougall http://www.damon-is-a-geek.com B2.39 Mathematics Institute University of Warwick Coventry West Midlands CV4 7AL United Kingdom |
From: Francesco M. <fra...@gm...> - 2012-10-17 08:13:18
|
2012/10/17 Eric Firing <ef...@ha...> > On 2012/10/16 9:22 PM, Francesco Montesano wrote: > > Dear list, > > > > I've see a difference between the default backend between > > > > v1.1.1 (shipped with kubuntu 12.10dev) and v1.2.0.rc1, 1.2.0rc2 and > > master (1.3.x). > > > > > > My set up is to call ipython with pylab and turn on interactive mode. I > > still haven't copied over my matplotlibrc file from my work computer > > (there I use qtagg, if I remember well) > > > > > > On v1.1.1 the default is [backend: TkAgg], while in the other two cases > > it is [backend: agg]. Is there some reason for this difference? > > The default should be based on what is found when mpl is built, so it > sounds like when you are building v1.2.x, none of the supported gui > toolkits is being found. I don't know why that is. Are you installing > on a system that has gui toolkits already installed? I think so, as the v1.1.1 shipped with my OS is using TkAgg as backend and I can plot interactively. When I build from source I get OPTIONAL BACKEND DEPENDENCIES libpng: found, but unknown version (no pkg-config) Tkinter: no * Using default library and include directories for * Tcl and Tk because a Tk window failed to open. * You may need to define DISPLAY for Tk to work so * that setup can determine where your libraries are * located. Tkinter present, but header files are not * found. You may need to install development * packages. * You may need to install 'dev' package(s) to * provide header files. Gtk+: no * Could not find Gtk+ headers in any of * '/usr/local/include', '/usr/include', * '/usr/local/include', '/usr/include', '.' Mac OS X native: no Qt: no Qt4: Qt: 4.8.2, PyQt4: 4.9.3 PySide: no Cairo: 1.8.8 Could be a problem with Tkinter and dev packages. > > One useful > technique with ubuntu derivatives is to do sudo apt-get build-dep python-matplotlib > > probably it's easier if I just switch to qtagg, as I already have it > It might pull in more than you really want, but it will certainly > include gui toolkits. > > Eric > Thanks, Francesco > > > > > > > cheers, > > > > Francesco > > > > > > > > > ------------------------------------------------------------------------------ > > Everyone hates slow websites. So do we. > > Make your web apps faster with AppDynamics > > Download AppDynamics Lite for free today: > > http://p.sf.net/sfu/appdyn_sfd2d_oct > > > > > > > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Ian T. <ian...@gm...> - 2012-10-17 07:44:02
|
On 16 October 2012 18:44, T J <tj...@gm...> wrote: > > This is a set of 152 points on a triangle. delaunay is mentioned to > have problems for some pathological cases. Is a complete triangular > grid considered as such a case? > Yes, under certain circumstances! delaunay is not 'geometrically robust', meaning it doesn't take into account machine precision errors when deciding if a point is on one side of a line or not or inside a circle or not, which can result in errors leading to the algorithm failing. It sounds like this should be an easy problem to solve but it isn't. In your example the y-values that presumably should be in a straight line about y=-0.5 feature variations at about the 16th decimal place that are causing the algorithm to fail. If these variations were much larger or much smaller, the algorithm would probably work. The first time the failure occurs is at the 20th point, which you can see if you add a call to something like plt.tripcolor(x, y, np.zeros_like(x), alpha=0.5) The darker blue colour shows two triangles overlapping, which shouldn't happen. You have a number of options: 1) Round your x and y values to a smaller number of decimal places, e.g. x = x.round(8) y = y.round(8) On my machine 8 decimal places is good, 10 isn't. 2) Add extra noise to your point positions, which is the classic way to get around this delaunay limitation, e.g. x = x + 1e-6*np.random.rand(len(x)) y = y + 1e-6*np.random.rand(len(x)) 3) Specify the triangulation yourself, which is usually pretty easy for regular cases like yours. See tricontour_demo.py for an example of how to specify a triangulation in your tri* function calls. I hope this helps, Ian |
From: Eric F. <ef...@ha...> - 2012-10-17 07:41:53
|
On 2012/10/16 9:22 PM, Francesco Montesano wrote: > Dear list, > > I've see a difference between the default backend between > > v1.1.1 (shipped with kubuntu 12.10dev) and v1.2.0.rc1, 1.2.0rc2 and > master (1.3.x). > > > My set up is to call ipython with pylab and turn on interactive mode. I > still haven't copied over my matplotlibrc file from my work computer > (there I use qtagg, if I remember well) > > > On v1.1.1 the default is [backend: TkAgg], while in the other two cases > it is [backend: agg]. Is there some reason for this difference? The default should be based on what is found when mpl is built, so it sounds like when you are building v1.2.x, none of the supported gui toolkits is being found. I don't know why that is. Are you installing on a system that has gui toolkits already installed? One useful technique with ubuntu derivatives is to do sudo apt-get build-dep python-matplotlib It might pull in more than you really want, but it will certainly include gui toolkits. Eric > > > cheers, > > Francesco > > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Francesco M. <fra...@gm...> - 2012-10-17 07:22:57
|
Dear list, I've see a difference between the default backend between v1.1.1 (shipped with kubuntu 12.10dev) and v1.2.0.rc1, 1.2.0rc2 and master (1.3.x). My set up is to call ipython with pylab and turn on interactive mode. I still haven't copied over my matplotlibrc file from my work computer (there I use qtagg, if I remember well) On v1.1.1 the default is [backend: TkAgg], while in the other two cases it is [backend: agg]. Is there some reason for this difference? cheers, Francesco |
From: Eric F. <ef...@ha...> - 2012-10-17 02:38:20
|
On 2012/10/16 4:27 PM, Gökhan Sever wrote: > Hello, > > I see that a few days old clone of mpl, cannot save open symbols > correctly in a pdf file. > > Here is a simple test case (in ipython --pylab): > > I6 xx = np.random.random(1000) > > I7 plt.plot(xx, 'D', mfc='none') > > On screen open symbols are fine, as expected transparency works fine, > however when saved in pdf transparency disappears, symbols cover each > other. (Saving to png is also fine) > > Could you confirm if this is a case in another installation? Confirmed with 1.2.x. The problem is only on pdf; ps and svg are correct. Eric > > Thanks. > > -- > Gökhan > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Gökhan S. <gok...@gm...> - 2012-10-17 02:27:23
|
Hello, I see that a few days old clone of mpl, cannot save open symbols correctly in a pdf file. Here is a simple test case (in ipython --pylab): I6 xx = np.random.random(1000) I7 plt.plot(xx, 'D', mfc='none') On screen open symbols are fine, as expected transparency works fine, however when saved in pdf transparency disappears, symbols cover each other. (Saving to png is also fine) Could you confirm if this is a case in another installation? Thanks. -- Gökhan |
From: Jeff W. <js...@fa...> - 2012-10-16 18:34:53
|
On 10/16/12 11:20 AM, Rich Signell wrote: > Jeff, > Yep, that worked! So here is a working example of OWSlib with > Basemap: http://nbviewer.ipython.org/3900648/ > > I switched the Basemap projection to 'cyl' because we need to ensure > that Basemap and WMS are using the same projection, right? (and since > I had requested EPSG:4326 from WMS, that's the 'cyl' in Basemap). > > Thanks! > Rich Rich: I took your code and made it into a new example. https://github.com/matplotlib/basemap/pull/84 I think it may be better not to try to create a wmsimage method, since OWSlib.wms.WebMapService is quite a complicated beast to wrap. -Jeff > > On Tue, Oct 16, 2012 at 11:38 AM, Jeff Whitaker <js...@fa...> wrote: >> On 10/16/12 8:48 AM, Rich Signell wrote: >>> Klo & Jeff, >>> >>> I tried making a concrete example of using OWSlib with Basemap, but >>> althought the WMS image looks good, the warpimage does not. >>> >>> http://nbviewer.ipython.org/3899690/ >>> >>> Do you see where I went wrong? >>> >>> Thanks, >>> Rich >> >> Rich: warpimage assumes the image is of global extent. In your example, I >> think you can just pass the image to the basemap imshow method with >> >> from matplotlib.image import imread >> import urllib2 >> m.imshow(imread(urllib2.urlopen(url)),origin='upper') >> >> Klo previously mentioned there might be a problem with the png data from the >> WMS server being 'chunked', s you might have to use klo's imshow_chunked >> function >> >> http://www.mail-archive.com/mat...@li.../msg25618.html >> >> >> -Jeff >> >>> On Sat, Oct 13, 2012 at 7:26 PM, klo uo <kl...@gm...> wrote: >>>> That's also what that snippet I linked does. You can add it to to Basemap >>>> and it should work. >>>> >>>> However Jeff suggested we use this tiny package OWSlib and handle WMS >>>> that >>>> way, which is better IMHO, but for some reason we did not got further >>>> reply. >>>> >>>> >>>> >>>> On Fri, Oct 12, 2012 at 1:31 PM, Rich Signell <rsi...@us...> wrote: >>>>> WMS services are required to respond to "GetCapabiltiies" request, >>>>> reporting what layers, styles, times, elevations, and projections they >>>>> have available. So for example, using the Unidata WMS example below, >>>>> if we do: >>>>> >>>>> >>>>> >>>>> http://motherlode.ucar.edu:8080/thredds/wms/fmrc/NCEP/NAM/CONUS_12km/NCEP-NAM-CONUS_12km-noaaport_best.ncd?service=WMS&request=GetCapabilities >>>>> >>>>> we can see from the XML response that the Coordinate Reference Systems >>>>> supported are: >>>>> >>>>> <CRS>EPSG:4326</CRS> >>>>> <CRS>CRS:84</CRS> >>>>> <CRS>EPSG:41001</CRS> >>>>> <CRS>EPSG:3857</CRS> >>>>> <CRS>EPSG:27700</CRS> >>>>> <CRS>EPSG:3408</CRS> >>>>> <CRS>EPSG:3409</CRS> >>>>> <CRS>EPSG:32661</CRS> >>>>> <CRS>EPSG:32761</CRS> >>>>> >>>>> And for this server, the supported response types are: >>>>> <Format>image/jpeg</Format> >>>>> <Format>image/png</Format> >>>>> <Format>application/vnd.google-earth.kmz</Format> >>>>> <Format>image/gif</Format> >>>>> >>>>> So I guess one way to proceed if you wanted to use WMS in Matplotlib >>>>> and avoid reprojection in python would be to: >>>>> 1. do the WMS GetCapabilities request to find the available supported >>>>> Coordinate Reference Systems (which will vary with WMS server) >>>>> 2. setup Basemap to use one of these CRS >>>>> 3. use the bounding box of your current axis (in projection units) as >>>>> part of a GetMap request to the WMS. >>>>> >>>>> -Rich >>>>> >>>>> On Thu, Oct 11, 2012 at 12:16 AM, klo uo <kl...@gm...> wrote: >>>>>> I guess that's it? >>>>>> >>>>>> warpimage() as it is now, checks if passed image is url, so we can add >>>>>> additional check if image is url, with urlparse to deduce image >>>>>> coordinates >>>>>> and projection if present, then overlay it over already created Basemap >>>>>> object. >>>>>> >>>>>> >>>>>> >>>>>> ------------------------------------------------------------------------------ >>>>>> Don't let slow site performance ruin your business. Deploy New Relic >>>>>> APM >>>>>> Deploy New Relic app performance management and know exactly >>>>>> what is happening inside your Ruby, Python, PHP, Java, and .NET app >>>>>> Try New Relic at no cost today and get our sweet Data Nerd shirt too! >>>>>> http://p.sf.net/sfu/newrelic-dev2dev >>>>>> _______________________________________________ >>>>>> Matplotlib-users mailing list >>>>>> Mat...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>>>>> >>>>> >>>>> -- >>>>> Dr. Richard P. Signell (508) 457-2229 >>>>> USGS, 384 Woods Hole Rd. >>>>> Woods Hole, MA 02543-1598 >>>> >>> > > |
From: T J <tj...@gm...> - 2012-10-16 17:44:42
|
On Tue, Oct 16, 2012 at 2:34 AM, Damon McDougall <dam...@gm...> wrote: > On Tue, Oct 16, 2012 at 8:04 AM, T J <tj...@gm...> wrote: >> I'm interested in clipping the result of plt.contour (and >> plt.contourf) to a patch. However, QuadContourSet does not have a >> set_clip_path() method. Is there a way to do this? >> >> Here is an example plot that I have generated. >> >> http://imgur.com/pybIf >> >> For the curious, it plots contours of a function on the 2-simplex. >> The way I've gone about computing this is, unfortunately, convoluted. >> I generate a regular grid in 2D and treat each point as a projection >> of a 3D probability vector into 2D. Then, I invert the projection so >> that I have "distributions" and then compute the Z value for each >> point. The contours are then calculated, but now, I need to clip >> everything outside the triangle, as only points within the triangle >> correspond to actual distributions. >> >> Is there a more direct way to calculate contours on a restricted set? >> >> Thanks. > > The contour functions support masked regions. I think that might be > what you're looking for. Since the region you want to mask is a > triangle, maybe even use a masked triangulated contour plot? Here's > the call signature: > http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.tricontour > > Does that help? > Yes, that looks to be exactly what I am looking for. Note, the mask kwarg is barely mentioned in that docstring, but I think I get it. However, I am having some trouble. tricontour seems to fail when computing the Triangulation() object. Here is my code: http://codepad.org/cVB7YP9r This is a set of 152 points on a triangle. delaunay is mentioned to have problems for some pathological cases. Is a complete triangular grid considered as such a case? Code is shown below as well. ------------ import numpy as np import matplotlib.pyplot as plt points = np.array([ [0.8660254037844384, -0.5000000000000004], [0.7577722283113836, -0.5000000000000004], [0.6495190528383288, -0.5000000000000003], [0.5412658773652739, -0.5000000000000003], [0.4330127018922191, -0.5000000000000002], [0.3247595264191642, -0.5000000000000002], [0.21650635094610943, -0.5000000000000002], [0.10825317547305463, -0.5000000000000001], [-2.220446049250313e-16, -0.5000000000000001], [-0.10825317547305507, -0.5], [-0.21650635094610993, -0.5], [-0.32475952641916467, -0.5], [-0.4330127018922195, -0.4999999999999999], [-0.5412658773652743, -0.4999999999999999], [-0.6495190528383291, -0.49999999999999983], [-0.7577722283113839, -0.4999999999999998], [-0.8660254037844388, -0.4999999999999997], [0.811898816047911, -0.40625000000000044], [0.7036456405748561, -0.4062500000000004], [0.5953924651018013, -0.40625000000000033], [0.48713928962874653, -0.4062500000000003], [0.3788861141556917, -0.4062500000000002], [0.2706329386826369, -0.4062500000000002], [0.16237976320958203, -0.4062500000000001], [0.05412658773652723, -0.4062500000000001], [-0.05412658773652762, -0.40625000000000006], [-0.16237976320958242, -0.40625], [-0.2706329386826372, -0.40625], [-0.37888611415569207, -0.40624999999999994], [-0.4871392896287469, -0.4062499999999999], [-0.5953924651018018, -0.40624999999999983], [-0.7036456405748566, -0.4062499999999998], [-0.8118988160479114, -0.4062499999999997], [0.7577722283113836, -0.3125000000000004], [0.6495190528383288, -0.31250000000000033], [0.541265877365274, -0.31250000000000033], [0.4330127018922191, -0.3125000000000002], [0.3247595264191643, -0.3125000000000002], [0.21650635094610948, -0.31250000000000017], [0.10825317547305463, -0.3125000000000001], [-1.6653345369377348e-16, -0.31250000000000006], [-0.10825317547305502, -0.3125], [-0.21650635094610982, -0.3125], [-0.3247595264191646, -0.31249999999999994], [-0.43301270189221946, -0.3124999999999999], [-0.5412658773652743, -0.31249999999999983], [-0.6495190528383292, -0.3124999999999998], [-0.7577722283113839, -0.3124999999999998], [0.7036456405748562, -0.21875000000000036], [0.5953924651018013, -0.2187500000000003], [0.48713928962874653, -0.21875000000000028], [0.37888611415569173, -0.21875000000000022], [0.2706329386826369, -0.21875000000000017], [0.16237976320958208, -0.21875000000000014], [0.05412658773652723, -0.21875000000000008], [-0.054126587736527565, -0.21875000000000006], [-0.16237976320958242, -0.21875], [-0.2706329386826372, -0.21874999999999994], [-0.378886114155692, -0.21874999999999992], [-0.48713928962874686, -0.21874999999999986], [-0.5953924651018017, -0.2187499999999998], [-0.7036456405748566, -0.21874999999999978], [0.6495190528383288, -0.12500000000000033], [0.541265877365274, -0.12500000000000028], [0.43301270189221913, -0.12500000000000025], [0.32475952641916433, -0.1250000000000002], [0.2165063509461095, -0.12500000000000017], [0.10825317547305469, -0.1250000000000001], [-1.6653345369377348e-16, -0.12500000000000006], [-0.10825317547305496, -0.125], [-0.21650635094610982, -0.12499999999999997], [-0.3247595264191646, -0.12499999999999993], [-0.4330127018922194, -0.12499999999999989], [-0.5412658773652743, -0.12499999999999983], [-0.6495190528383291, -0.12499999999999979], [0.5953924651018014, -0.031250000000000305], [0.4871392896287466, -0.03125000000000028], [0.37888611415569173, -0.031250000000000194], [0.27063293868263694, -0.03125000000000017], [0.1623797632095821, -0.03125000000000014], [0.05412658773652729, -0.03125000000000008], [-0.054126587736527565, -0.03125000000000003], [-0.16237976320958236, -0.031249999999999986], [-0.2706329386826372, -0.031249999999999944], [-0.378886114155692, -0.031249999999999903], [-0.4871392896287468, -0.031249999999999854], [-0.5953924651018017, -0.03124999999999981], [0.541265877365274, 0.06249999999999972], [0.4330127018922192, 0.06249999999999975], [0.3247595264191644, 0.06249999999999983], [0.21650635094610954, 0.06249999999999986], [0.10825317547305471, 0.06249999999999989], [-1.1102230246251565e-16, 0.062499999999999944], [-0.10825317547305496, 0.0625], [-0.21650635094610976, 0.06250000000000003], [-0.3247595264191646, 0.06250000000000008], [-0.4330127018922194, 0.06250000000000012], [-0.5412658773652742, 0.06250000000000017], [0.4871392896287466, 0.15624999999999975], [0.3788861141556918, 0.15624999999999978], [0.27063293868263694, 0.15624999999999986], [0.16237976320958214, 0.1562499999999999], [0.054126587736527315, 0.15624999999999992], [-0.05412658773652751, 0.15625], [-0.16237976320958236, 0.15625000000000003], [-0.27063293868263716, 0.15625000000000006], [-0.378886114155692, 0.1562500000000001], [-0.4871392896287468, 0.15625000000000017], [0.43301270189221924, 0.24999999999999978], [0.3247595264191644, 0.2499999999999998], [0.21650635094610957, 0.2499999999999999], [0.10825317547305474, 0.24999999999999992], [-8.326672684688674e-17, 0.24999999999999994], [-0.10825317547305491, 0.25], [-0.2165063509461097, 0.25000000000000006], [-0.32475952641916456, 0.2500000000000001], [-0.43301270189221935, 0.2500000000000001], [0.37888611415569184, 0.3437499999999998], [0.270632938682637, 0.34374999999999983], [0.16237976320958217, 0.3437499999999999], [0.05412658773652734, 0.34374999999999994], [-0.05412658773652748, 0.34375], [-0.1623797632095823, 0.34375000000000006], [-0.2706329386826371, 0.3437500000000001], [-0.37888611415569196, 0.3437500000000001], [0.32475952641916445, 0.43749999999999983], [0.2165063509461096, 0.4374999999999999], [0.10825317547305478, 0.4374999999999999], [-5.551115123125783e-17, 0.4374999999999999], [-0.10825317547305488, 0.43750000000000006], [-0.2165063509461097, 0.4375000000000001], [-0.3247595264191645, 0.4375000000000001], [0.27063293868263705, 0.5312499999999999], [0.1623797632095822, 0.5312499999999999], [0.054126587736527385, 0.5312499999999999], [-0.054126587736527426, 0.53125], [-0.16237976320958225, 0.5312500000000001], [-0.2706329386826371, 0.5312500000000001], [0.21650635094610965, 0.6249999999999999], [0.10825317547305482, 0.6249999999999999], [-1.3877787807814457e-17, 0.625], [-0.10825317547305482, 0.625], [-0.21650635094610965, 0.6250000000000001], [0.16237976320958225, 0.7187499999999999], [0.05412658773652742, 0.71875], [-0.0541265877365274, 0.71875], [-0.16237976320958222, 0.71875], [0.10825317547305485, 0.8125], [2.7755575615628914e-17, 0.8125], [-0.1082531754730548, 0.8125], [0.054126587736527454, 0.90625], [-0.05412658773652737, 0.90625], [6.123233995736766e-17, 1.0]]) def test1(x=None): # Failure for x > 23 slc = slice(None,x,None) plt.scatter(points[slc,0], points[slc,1]) matplotlib.delaunay.Triangulation(points[slc,0], points[slc,1]) def test2(x=None): # Randomizing the rows seems to have no effect # Failure for x > 23 slc = slice(None,x,None) idx = np.arange(points.shape[0]) np.random.shuffle(idx) points2 = np.array([points[i] for i in idx]) plt.scatter(points2[slc,0], points2[slc,1]) matplotlib.delaunay.Triangulation(points[slc,0], points[slc,1]) if __name__ == '__main__': test2() #test2(22) |
From: Jeff W. <js...@fa...> - 2012-10-16 17:28:56
|
On 10/16/12 11:20 AM, Rich Signell wrote: > Jeff, > Yep, that worked! So here is a working example of OWSlib with > Basemap: http://nbviewer.ipython.org/3900648/ > > I switched the Basemap projection to 'cyl' because we need to ensure > that Basemap and WMS are using the same projection, right? (and since > I had requested EPSG:4326 from WMS, that's the 'cyl' in Basemap). > > Thanks! > Rich Rich: That's right. I'll go ahead and create a wmsimage method, similar to Klo's, but that uses OWSlib. You will then have to specify the projection using the epsg keyword when creating the Basemap instance. -Jeff > > On Tue, Oct 16, 2012 at 11:38 AM, Jeff Whitaker <js...@fa...> wrote: >> On 10/16/12 8:48 AM, Rich Signell wrote: >>> Klo & Jeff, >>> >>> I tried making a concrete example of using OWSlib with Basemap, but >>> althought the WMS image looks good, the warpimage does not. >>> >>> http://nbviewer.ipython.org/3899690/ >>> >>> Do you see where I went wrong? >>> >>> Thanks, >>> Rich >> >> Rich: warpimage assumes the image is of global extent. In your example, I >> think you can just pass the image to the basemap imshow method with >> >> from matplotlib.image import imread >> import urllib2 >> m.imshow(imread(urllib2.urlopen(url)),origin='upper') >> >> Klo previously mentioned there might be a problem with the png data from the >> WMS server being 'chunked', s you might have to use klo's imshow_chunked >> function >> >> http://www.mail-archive.com/mat...@li.../msg25618.html >> >> >> -Jeff >> >>> On Sat, Oct 13, 2012 at 7:26 PM, klo uo <kl...@gm...> wrote: >>>> That's also what that snippet I linked does. You can add it to to Basemap >>>> and it should work. >>>> >>>> However Jeff suggested we use this tiny package OWSlib and handle WMS >>>> that >>>> way, which is better IMHO, but for some reason we did not got further >>>> reply. >>>> >>>> >>>> >>>> On Fri, Oct 12, 2012 at 1:31 PM, Rich Signell <rsi...@us...> wrote: >>>>> WMS services are required to respond to "GetCapabiltiies" request, >>>>> reporting what layers, styles, times, elevations, and projections they >>>>> have available. So for example, using the Unidata WMS example below, >>>>> if we do: >>>>> >>>>> >>>>> >>>>> http://motherlode.ucar.edu:8080/thredds/wms/fmrc/NCEP/NAM/CONUS_12km/NCEP-NAM-CONUS_12km-noaaport_best.ncd?service=WMS&request=GetCapabilities >>>>> >>>>> we can see from the XML response that the Coordinate Reference Systems >>>>> supported are: >>>>> >>>>> <CRS>EPSG:4326</CRS> >>>>> <CRS>CRS:84</CRS> >>>>> <CRS>EPSG:41001</CRS> >>>>> <CRS>EPSG:3857</CRS> >>>>> <CRS>EPSG:27700</CRS> >>>>> <CRS>EPSG:3408</CRS> >>>>> <CRS>EPSG:3409</CRS> >>>>> <CRS>EPSG:32661</CRS> >>>>> <CRS>EPSG:32761</CRS> >>>>> >>>>> And for this server, the supported response types are: >>>>> <Format>image/jpeg</Format> >>>>> <Format>image/png</Format> >>>>> <Format>application/vnd.google-earth.kmz</Format> >>>>> <Format>image/gif</Format> >>>>> >>>>> So I guess one way to proceed if you wanted to use WMS in Matplotlib >>>>> and avoid reprojection in python would be to: >>>>> 1. do the WMS GetCapabilities request to find the available supported >>>>> Coordinate Reference Systems (which will vary with WMS server) >>>>> 2. setup Basemap to use one of these CRS >>>>> 3. use the bounding box of your current axis (in projection units) as >>>>> part of a GetMap request to the WMS. >>>>> >>>>> -Rich >>>>> >>>>> On Thu, Oct 11, 2012 at 12:16 AM, klo uo <kl...@gm...> wrote: >>>>>> I guess that's it? >>>>>> >>>>>> warpimage() as it is now, checks if passed image is url, so we can add >>>>>> additional check if image is url, with urlparse to deduce image >>>>>> coordinates >>>>>> and projection if present, then overlay it over already created Basemap >>>>>> object. >>>>>> >>>>>> >>>>>> >>>>>> ------------------------------------------------------------------------------ >>>>>> Don't let slow site performance ruin your business. Deploy New Relic >>>>>> APM >>>>>> Deploy New Relic app performance management and know exactly >>>>>> what is happening inside your Ruby, Python, PHP, Java, and .NET app >>>>>> Try New Relic at no cost today and get our sweet Data Nerd shirt too! >>>>>> http://p.sf.net/sfu/newrelic-dev2dev >>>>>> _______________________________________________ >>>>>> Matplotlib-users mailing list >>>>>> Mat...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>>>>> >>>>> >>>>> -- >>>>> Dr. Richard P. Signell (508) 457-2229 >>>>> USGS, 384 Woods Hole Rd. >>>>> Woods Hole, MA 02543-1598 >>>> >>> > > |
From: Rich S. <rsi...@us...> - 2012-10-16 17:20:15
|
Jeff, Yep, that worked! So here is a working example of OWSlib with Basemap: http://nbviewer.ipython.org/3900648/ I switched the Basemap projection to 'cyl' because we need to ensure that Basemap and WMS are using the same projection, right? (and since I had requested EPSG:4326 from WMS, that's the 'cyl' in Basemap). Thanks! Rich On Tue, Oct 16, 2012 at 11:38 AM, Jeff Whitaker <js...@fa...> wrote: > On 10/16/12 8:48 AM, Rich Signell wrote: >> >> Klo & Jeff, >> >> I tried making a concrete example of using OWSlib with Basemap, but >> althought the WMS image looks good, the warpimage does not. >> >> http://nbviewer.ipython.org/3899690/ >> >> Do you see where I went wrong? >> >> Thanks, >> Rich > > > Rich: warpimage assumes the image is of global extent. In your example, I > think you can just pass the image to the basemap imshow method with > > from matplotlib.image import imread > import urllib2 > m.imshow(imread(urllib2.urlopen(url)),origin='upper') > > Klo previously mentioned there might be a problem with the png data from the > WMS server being 'chunked', s you might have to use klo's imshow_chunked > function > > http://www.mail-archive.com/mat...@li.../msg25618.html > > > -Jeff > >> >> On Sat, Oct 13, 2012 at 7:26 PM, klo uo <kl...@gm...> wrote: >>> >>> That's also what that snippet I linked does. You can add it to to Basemap >>> and it should work. >>> >>> However Jeff suggested we use this tiny package OWSlib and handle WMS >>> that >>> way, which is better IMHO, but for some reason we did not got further >>> reply. >>> >>> >>> >>> On Fri, Oct 12, 2012 at 1:31 PM, Rich Signell <rsi...@us...> wrote: >>>> >>>> WMS services are required to respond to "GetCapabiltiies" request, >>>> reporting what layers, styles, times, elevations, and projections they >>>> have available. So for example, using the Unidata WMS example below, >>>> if we do: >>>> >>>> >>>> >>>> http://motherlode.ucar.edu:8080/thredds/wms/fmrc/NCEP/NAM/CONUS_12km/NCEP-NAM-CONUS_12km-noaaport_best.ncd?service=WMS&request=GetCapabilities >>>> >>>> we can see from the XML response that the Coordinate Reference Systems >>>> supported are: >>>> >>>> <CRS>EPSG:4326</CRS> >>>> <CRS>CRS:84</CRS> >>>> <CRS>EPSG:41001</CRS> >>>> <CRS>EPSG:3857</CRS> >>>> <CRS>EPSG:27700</CRS> >>>> <CRS>EPSG:3408</CRS> >>>> <CRS>EPSG:3409</CRS> >>>> <CRS>EPSG:32661</CRS> >>>> <CRS>EPSG:32761</CRS> >>>> >>>> And for this server, the supported response types are: >>>> <Format>image/jpeg</Format> >>>> <Format>image/png</Format> >>>> <Format>application/vnd.google-earth.kmz</Format> >>>> <Format>image/gif</Format> >>>> >>>> So I guess one way to proceed if you wanted to use WMS in Matplotlib >>>> and avoid reprojection in python would be to: >>>> 1. do the WMS GetCapabilities request to find the available supported >>>> Coordinate Reference Systems (which will vary with WMS server) >>>> 2. setup Basemap to use one of these CRS >>>> 3. use the bounding box of your current axis (in projection units) as >>>> part of a GetMap request to the WMS. >>>> >>>> -Rich >>>> >>>> On Thu, Oct 11, 2012 at 12:16 AM, klo uo <kl...@gm...> wrote: >>>>> >>>>> I guess that's it? >>>>> >>>>> warpimage() as it is now, checks if passed image is url, so we can add >>>>> additional check if image is url, with urlparse to deduce image >>>>> coordinates >>>>> and projection if present, then overlay it over already created Basemap >>>>> object. >>>>> >>>>> >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> Don't let slow site performance ruin your business. Deploy New Relic >>>>> APM >>>>> Deploy New Relic app performance management and know exactly >>>>> what is happening inside your Ruby, Python, PHP, Java, and .NET app >>>>> Try New Relic at no cost today and get our sweet Data Nerd shirt too! >>>>> http://p.sf.net/sfu/newrelic-dev2dev >>>>> _______________________________________________ >>>>> Matplotlib-users mailing list >>>>> Mat...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>>>> >>>> >>>> >>>> -- >>>> Dr. Richard P. Signell (508) 457-2229 >>>> USGS, 384 Woods Hole Rd. >>>> Woods Hole, MA 02543-1598 >>> >>> >> >> > -- Dr. Richard P. Signell (508) 457-2229 USGS, 384 Woods Hole Rd. Woods Hole, MA 02543-1598 |
From: Benjamin R. <ben...@ou...> - 2012-10-16 16:15:32
|
On Tue, Oct 16, 2012 at 11:25 AM, hari jayaram <ha...@gm...> wrote: > Hi > I am a relative newbie to matplotlib. > > I have a python script that handles a dataset that comprises 384 sets of > data. > > At the present moment , I read in a set of data - process it - and the > create a figure using code shown below. > I am using windows with the default backend ( I think I set it to wx). > > When I run the program, figure after figure shows up..the program > continues from well to well plotting the figure. I can close the figure > window using the X on the right -hand side..while the program chugs along. > > Is there a way to just recycle the figure object , so that the plot shows > up for a brief second and refreshes when the next calculation is complete. > Each process_data function , takes a few minutes. > > Alternatively I just want to close the figure object I show after a brief > lag. I am OK if that happens instantaneously..but I dont know how > to achieve this. > Do I have to use the matplotlib.Figure object to achieve this functionality > > Thanks > Hari > > > Hari, To recycle the figure, try the following: import matplotlib.pyplot as plt def do_my_plot(par1, par2, well_id): processed_data_object = processed_dict[well_id] # Plot all the data par1.plot(processed_data_object.raw_x,processed_data_object.raw_y). par2.plot(.... # finally plt.show() # I tried fig.clf() def plot_and_process_data(): plt.ion() # Turn on interactive mode fig = plt.figure(figsize=(7,7) ax = fig.add_subplot(1,1,1) par1 =ax.twinx() par2 = ax.twinx() for well_id in list_of_384_well_ids: par1.cla() par2.cla() process_data(well_id) do_my_plot(par1, par2, well_id) Note, this is completely untested, but it would be how I would go about it at first. The "plt.ion()" turns on interactive mode to allow your code to continue running even after the plot window appears (but does not end until the last window is closed.). Of course, another approach would simply be to do "fig.savefig()" after every update to the figure and never use show() and ion() (essentially, a non-interactive head-less script). Hopefully, this helps. Ben Root |
From: Damon M. <dam...@gm...> - 2012-10-16 16:13:57
|
On Tue, Oct 16, 2012 at 5:09 PM, Sterling Smith <sm...@fu...> wrote: > Hari, > > You can give a number to figure(), as in figure(1), and it will reuse figure 1. Also, you can close figure 1 with pyplot.close(1). > > -Sterling > > On Oct 16, 2012, at 8:25AM, hari jayaram wrote: > >> Hi >> I am a relative newbie to matplotlib. >> >> I have a python script that handles a dataset that comprises 384 sets of data. >> >> At the present moment , I read in a set of data - process it - and the create a figure using code shown below. >> I am using windows with the default backend ( I think I set it to wx). >> >> When I run the program, figure after figure shows up..the program continues from well to well plotting the figure. I can close the figure window using the X on the right -hand side..while the program chugs along. >> >> Is there a way to just recycle the figure object , so that the plot shows up for a brief second and refreshes when the next calculation is complete. Each process_data function , takes a few minutes. >> >> Alternatively I just want to close the figure object I show after a brief lag. I am OK if that happens instantaneously..but I dont know how to achieve this. >> Do I have to use the matplotlib.Figure object to achieve this functionality >> >> Thanks >> Hari >> >> >> >> >> >> from matplotlib.pyplot import figure >> >> def do_my_plot(well_id): >> processed_data_object = processed_dict[well_id] >> fig = figure(figsize=(7,7) >> ax = fig.add_subplot(1,1,1) >> par1 =ax.twinx() >> par2 = ax.twinx() >> # Plot all the data >> par1.plot(processed_data_object.raw_x,processed_data_object.raw_y). >> par2.plot(.... >> # finally >> fig.show() >> # I tried fig.clf() >> >> >> def plot_and_process_data(): >> for well_id in list_of_384_well_ids: >> process_data(well_id) >> do_my_plot(well_id) Or you can call ax.cla() to clear the axes before plotting the next data set. Then subsequent calls to plot don't need 300+ figure objects. -- Damon McDougall http://www.damon-is-a-geek.com B2.39 Mathematics Institute University of Warwick Coventry West Midlands CV4 7AL United Kingdom |
From: Sterling S. <sm...@fu...> - 2012-10-16 16:10:19
|
Hari, You can give a number to figure(), as in figure(1), and it will reuse figure 1. Also, you can close figure 1 with pyplot.close(1). -Sterling On Oct 16, 2012, at 8:25AM, hari jayaram wrote: > Hi > I am a relative newbie to matplotlib. > > I have a python script that handles a dataset that comprises 384 sets of data. > > At the present moment , I read in a set of data - process it - and the create a figure using code shown below. > I am using windows with the default backend ( I think I set it to wx). > > When I run the program, figure after figure shows up..the program continues from well to well plotting the figure. I can close the figure window using the X on the right -hand side..while the program chugs along. > > Is there a way to just recycle the figure object , so that the plot shows up for a brief second and refreshes when the next calculation is complete. Each process_data function , takes a few minutes. > > Alternatively I just want to close the figure object I show after a brief lag. I am OK if that happens instantaneously..but I dont know how to achieve this. > Do I have to use the matplotlib.Figure object to achieve this functionality > > Thanks > Hari > > > > > > from matplotlib.pyplot import figure > > def do_my_plot(well_id): > processed_data_object = processed_dict[well_id] > fig = figure(figsize=(7,7) > ax = fig.add_subplot(1,1,1) > par1 =ax.twinx() > par2 = ax.twinx() > # Plot all the data > par1.plot(processed_data_object.raw_x,processed_data_object.raw_y). > par2.plot(.... > # finally > fig.show() > # I tried fig.clf() > > > def plot_and_process_data(): > for well_id in list_of_384_well_ids: > process_data(well_id) > do_my_plot(well_id) > > > > > > > > > > > > ------------------------------------------------------------------------------ > Don't let slow site performance ruin your business. Deploy New Relic APM > Deploy New Relic app performance management and know exactly > what is happening inside your Ruby, Python, PHP, Java, and .NET app > Try New Relic at no cost today and get our sweet Data Nerd shirt too! > http://p.sf.net/sfu/newrelic-dev2dev_______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Jeff W. <js...@fa...> - 2012-10-16 15:44:03
|
On 10/16/12 8:48 AM, Rich Signell wrote: > Klo & Jeff, > > I tried making a concrete example of using OWSlib with Basemap, but > althought the WMS image looks good, the warpimage does not. > > http://nbviewer.ipython.org/3899690/ > > Do you see where I went wrong? > > Thanks, > Rich Rich: warpimage assumes the image is of global extent. In your example, I think you can just pass the image to the basemap imshow method with from matplotlib.image import imread import urllib2 m.imshow(imread(urllib2.urlopen(url)),origin='upper') Klo previously mentioned there might be a problem with the png data from the WMS server being 'chunked', s you might have to use klo's imshow_chunked function http://www.mail-archive.com/mat...@li.../msg25618.html -Jeff > > On Sat, Oct 13, 2012 at 7:26 PM, klo uo <kl...@gm...> wrote: >> That's also what that snippet I linked does. You can add it to to Basemap >> and it should work. >> >> However Jeff suggested we use this tiny package OWSlib and handle WMS that >> way, which is better IMHO, but for some reason we did not got further reply. >> >> >> >> On Fri, Oct 12, 2012 at 1:31 PM, Rich Signell <rsi...@us...> wrote: >>> WMS services are required to respond to "GetCapabiltiies" request, >>> reporting what layers, styles, times, elevations, and projections they >>> have available. So for example, using the Unidata WMS example below, >>> if we do: >>> >>> >>> http://motherlode.ucar.edu:8080/thredds/wms/fmrc/NCEP/NAM/CONUS_12km/NCEP-NAM-CONUS_12km-noaaport_best.ncd?service=WMS&request=GetCapabilities >>> >>> we can see from the XML response that the Coordinate Reference Systems >>> supported are: >>> >>> <CRS>EPSG:4326</CRS> >>> <CRS>CRS:84</CRS> >>> <CRS>EPSG:41001</CRS> >>> <CRS>EPSG:3857</CRS> >>> <CRS>EPSG:27700</CRS> >>> <CRS>EPSG:3408</CRS> >>> <CRS>EPSG:3409</CRS> >>> <CRS>EPSG:32661</CRS> >>> <CRS>EPSG:32761</CRS> >>> >>> And for this server, the supported response types are: >>> <Format>image/jpeg</Format> >>> <Format>image/png</Format> >>> <Format>application/vnd.google-earth.kmz</Format> >>> <Format>image/gif</Format> >>> >>> So I guess one way to proceed if you wanted to use WMS in Matplotlib >>> and avoid reprojection in python would be to: >>> 1. do the WMS GetCapabilities request to find the available supported >>> Coordinate Reference Systems (which will vary with WMS server) >>> 2. setup Basemap to use one of these CRS >>> 3. use the bounding box of your current axis (in projection units) as >>> part of a GetMap request to the WMS. >>> >>> -Rich >>> >>> On Thu, Oct 11, 2012 at 12:16 AM, klo uo <kl...@gm...> wrote: >>>> I guess that's it? >>>> >>>> warpimage() as it is now, checks if passed image is url, so we can add >>>> additional check if image is url, with urlparse to deduce image >>>> coordinates >>>> and projection if present, then overlay it over already created Basemap >>>> object. >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Don't let slow site performance ruin your business. Deploy New Relic APM >>>> Deploy New Relic app performance management and know exactly >>>> what is happening inside your Ruby, Python, PHP, Java, and .NET app >>>> Try New Relic at no cost today and get our sweet Data Nerd shirt too! >>>> http://p.sf.net/sfu/newrelic-dev2dev >>>> _______________________________________________ >>>> Matplotlib-users mailing list >>>> Mat...@li... >>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>>> >>> >>> >>> -- >>> Dr. Richard P. Signell (508) 457-2229 >>> USGS, 384 Woods Hole Rd. >>> Woods Hole, MA 02543-1598 >> > > |
From: hari j. <ha...@gm...> - 2012-10-16 15:26:01
|
Hi I am a relative newbie to matplotlib. I have a python script that handles a dataset that comprises 384 sets of data. At the present moment , I read in a set of data - process it - and the create a figure using code shown below. I am using windows with the default backend ( I think I set it to wx). When I run the program, figure after figure shows up..the program continues from well to well plotting the figure. I can close the figure window using the X on the right -hand side..while the program chugs along. Is there a way to just recycle the figure object , so that the plot shows up for a brief second and refreshes when the next calculation is complete. Each process_data function , takes a few minutes. Alternatively I just want to close the figure object I show after a brief lag. I am OK if that happens instantaneously..but I dont know how to achieve this. Do I have to use the matplotlib.Figure object to achieve this functionality Thanks Hari from matplotlib.pyplot import figure def do_my_plot(well_id): processed_data_object = processed_dict[well_id] fig = figure(figsize=(7,7) ax = fig.add_subplot(1,1,1) par1 =ax.twinx() par2 = ax.twinx() # Plot all the data par1.plot(processed_data_object.raw_x,processed_data_object.raw_y). par2.plot(.... # finally fig.show() # I tried fig.clf() def plot_and_process_data(): for well_id in list_of_384_well_ids: process_data(well_id) do_my_plot(well_id) |
From: Rich S. <rsi...@us...> - 2012-10-16 14:48:33
|
Klo & Jeff, I tried making a concrete example of using OWSlib with Basemap, but althought the WMS image looks good, the warpimage does not. http://nbviewer.ipython.org/3899690/ Do you see where I went wrong? Thanks, Rich On Sat, Oct 13, 2012 at 7:26 PM, klo uo <kl...@gm...> wrote: > That's also what that snippet I linked does. You can add it to to Basemap > and it should work. > > However Jeff suggested we use this tiny package OWSlib and handle WMS that > way, which is better IMHO, but for some reason we did not got further reply. > > > > On Fri, Oct 12, 2012 at 1:31 PM, Rich Signell <rsi...@us...> wrote: >> >> WMS services are required to respond to "GetCapabiltiies" request, >> reporting what layers, styles, times, elevations, and projections they >> have available. So for example, using the Unidata WMS example below, >> if we do: >> >> >> http://motherlode.ucar.edu:8080/thredds/wms/fmrc/NCEP/NAM/CONUS_12km/NCEP-NAM-CONUS_12km-noaaport_best.ncd?service=WMS&request=GetCapabilities >> >> we can see from the XML response that the Coordinate Reference Systems >> supported are: >> >> <CRS>EPSG:4326</CRS> >> <CRS>CRS:84</CRS> >> <CRS>EPSG:41001</CRS> >> <CRS>EPSG:3857</CRS> >> <CRS>EPSG:27700</CRS> >> <CRS>EPSG:3408</CRS> >> <CRS>EPSG:3409</CRS> >> <CRS>EPSG:32661</CRS> >> <CRS>EPSG:32761</CRS> >> >> And for this server, the supported response types are: >> <Format>image/jpeg</Format> >> <Format>image/png</Format> >> <Format>application/vnd.google-earth.kmz</Format> >> <Format>image/gif</Format> >> >> So I guess one way to proceed if you wanted to use WMS in Matplotlib >> and avoid reprojection in python would be to: >> 1. do the WMS GetCapabilities request to find the available supported >> Coordinate Reference Systems (which will vary with WMS server) >> 2. setup Basemap to use one of these CRS >> 3. use the bounding box of your current axis (in projection units) as >> part of a GetMap request to the WMS. >> >> -Rich >> >> On Thu, Oct 11, 2012 at 12:16 AM, klo uo <kl...@gm...> wrote: >> > I guess that's it? >> > >> > warpimage() as it is now, checks if passed image is url, so we can add >> > additional check if image is url, with urlparse to deduce image >> > coordinates >> > and projection if present, then overlay it over already created Basemap >> > object. >> > >> > >> > ------------------------------------------------------------------------------ >> > Don't let slow site performance ruin your business. Deploy New Relic APM >> > Deploy New Relic app performance management and know exactly >> > what is happening inside your Ruby, Python, PHP, Java, and .NET app >> > Try New Relic at no cost today and get our sweet Data Nerd shirt too! >> > http://p.sf.net/sfu/newrelic-dev2dev >> > _______________________________________________ >> > Matplotlib-users mailing list >> > Mat...@li... >> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > >> >> >> >> -- >> Dr. Richard P. Signell (508) 457-2229 >> USGS, 384 Woods Hole Rd. >> Woods Hole, MA 02543-1598 > > -- Dr. Richard P. Signell (508) 457-2229 USGS, 384 Woods Hole Rd. Woods Hole, MA 02543-1598 |
From: Alejandro W. <ale...@gm...> - 2012-10-16 14:26:40
|
On Tue, Oct 16, 2012 at 8:03 AM, ra...@0x... <ra...@0x...> wrote: > Is there a way to achieve that with matplotlib? This example is very close to what you want: http://matplotlib.org/examples/pylab_examples/integral_demo.html |