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
(9) |
2
(11) |
3
(2) |
4
|
5
(6) |
6
(1) |
7
(6) |
8
(7) |
9
(16) |
10
(6) |
11
(2) |
12
(13) |
13
(3) |
14
(6) |
15
(6) |
16
(19) |
17
(2) |
18
(1) |
19
(1) |
20
(11) |
21
(5) |
22
(4) |
23
(7) |
24
(14) |
25
(15) |
26
(27) |
27
(26) |
28
(7) |
29
(2) |
30
(7) |
|
From: Eric F. <ef...@ha...> - 2007-11-30 18:29:35
|
José Gómez-Dans wrote: > Hi, > I have written a quick'n'dirty image segmentation algorithm. It seems to work > fine. However, I am interested in getting contours of the segments > (essentially, (x,y) pairs of the edges of each segment). I can plot the > contours with MPL (pylab.contour()), but I'd like to have the locations of > the edges, so that I can actually do something with them. > > Does anyone have any hints on how to go on about this? cs = contour(Z) for lev, col in zip(cs.levels, cs.collections): s = col._segments s will be a list of numpy arrays, each containing the (x,y) vertices defining a contour line at level lev. This illustrates a shortcoming of the contour and/or LineCollection code; to get what I think you want, you have to use a private attribute, _segments. It should be part of the public API. After some other changes and reorganizations in mpl have settled down, I will fix this. Feel free to send me a reminder in a month. Eric |
From: Michael D. <md...@st...> - 2007-11-30 17:25:28
|
Peter I. Hansen wrote: > On Nov 30, 2007 4:58 PM, Michael Droettboom <md...@st...> wrote: >> Peter I. Hansen wrote: >>> Hi >>> >>> I'm typestting some graphs including a few axvspan's with eg. a >>> facecolor='0.6' . This looks very nice if I output a PNG, but when I >>> inculde this in my TeX document the axis labels dosn't scale. Then I >>> try to go the postscript way, and the the labels scale nicely but the >>> colored fields of axvspan prints as a coarse raster color. >> I assume you mean that the axvspan prints as a solid color, rather than >> semi-transparent (alpha-blended). That is an unfortunate limitation of >> the Postscript format -- it can not handle transparency. > > Yes, I'm using a solid color. > >>> Is there a best way of optimizing print quality? >> Each of the output formats has a number of different limitations -- it >> depends a lot on what you're rendering and where you need it to go. >> >> You could try saving as a PDF, and then using pdftex to generate your >> document, if that's an option for you. > > Unfortunately, saving directly as PDF does not work on my (Debian) > system. It gives a "NotImplementedError". I'm using version 0.90.1, > and maybe this will change for 0.91 . Can you please send the full traceback that accompanies this error? PDF should be working is general, but perhaps you are running into a specific feature of the PDF backend that is not working, and there may be a workaround (or 0.91 may work)... Cheers, Mike -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
From: Peter I. H. <pe...@gm...> - 2007-11-30 16:05:30
|
On Nov 30, 2007 4:58 PM, Michael Droettboom <md...@st...> wrote: > Peter I. Hansen wrote: > > Hi > > > > I'm typestting some graphs including a few axvspan's with eg. a > > facecolor='0.6' . This looks very nice if I output a PNG, but when I > > inculde this in my TeX document the axis labels dosn't scale. Then I > > try to go the postscript way, and the the labels scale nicely but the > > colored fields of axvspan prints as a coarse raster color. > > I assume you mean that the axvspan prints as a solid color, rather than > semi-transparent (alpha-blended). That is an unfortunate limitation of > the Postscript format -- it can not handle transparency. Yes, I'm using a solid color. > > Is there a best way of optimizing print quality? > > Each of the output formats has a number of different limitations -- it > depends a lot on what you're rendering and where you need it to go. > > You could try saving as a PDF, and then using pdftex to generate your > document, if that's an option for you. Unfortunately, saving directly as PDF does not work on my (Debian) system. It gives a "NotImplementedError". I'm using version 0.90.1, and maybe this will change for 0.91 . |
From: Michael D. <md...@st...> - 2007-11-30 15:59:28
|
Peter I. Hansen wrote: > Hi > > I'm typestting some graphs including a few axvspan's with eg. a > facecolor='0.6' . This looks very nice if I output a PNG, but when I > inculde this in my TeX document the axis labels dosn't scale. Then I > try to go the postscript way, and the the labels scale nicely but the > colored fields of axvspan prints as a coarse raster color. I assume you mean that the axvspan prints as a solid color, rather than semi-transparent (alpha-blended). That is an unfortunate limitation of the Postscript format -- it can not handle transparency. > Is there a best way of optimizing print quality? Each of the output formats has a number of different limitations -- it depends a lot on what you're rendering and where you need it to go. You could try saving as a PDF, and then using pdftex to generate your document, if that's an option for you. Cheers, Mike -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
From: Peter I. H. <pe...@gm...> - 2007-11-30 15:46:47
|
Hi I'm typestting some graphs including a few axvspan's with eg. a facecolor='0.6' . This looks very nice if I output a PNG, but when I inculde this in my TeX document the axis labels dosn't scale. Then I try to go the postscript way, and the the labels scale nicely but the colored fields of axvspan prints as a coarse raster color. Is there a best way of optimizing print quality? -Peter |
From: <jgo...@gm...> - 2007-11-30 12:47:41
|
Hi, I have written a quick'n'dirty image segmentation algorithm. It seems to work fine. However, I am interested in getting contours of the segments (essentially, (x,y) pairs of the edges of each segment). I can plot the contours with MPL (pylab.contour()), but I'd like to have the locations of the edges, so that I can actually do something with them. Does anyone have any hints on how to go on about this? Thanks! Jose |
From: Stephen G. <ste...@op...> - 2007-11-30 04:30:23
|
I don't know if I dreamed it or was real, but I recall seeing somewhere that it was possible to add a control to the navigation bar, but now cannot seem to find any reference to this. Is is possible to add a control to the navigation bar? (I want to add a drop down box) I am using pyGtk, can add to somewhere else in my form, .. but it makes logical sense if it is on the navigation bar. Any suggestions? Thanks Steve |
From: Mika, D. P (G. Research) <mi...@cr...> - 2007-11-29 18:50:52
|
I am trying to animate the movement of a polygon and thought a sound approach would be to in a loop where I redraw after altering the offsets value. However I seem to not be able to scale the polygon correctly. Here is an example of only trying to place a polygon (square) at 1,1. You can see the translation is correct, but the scaling is wrong--the polygon is only about a pixel high & wide. Dave ------------------------------------------------------------------------ ---------- import pylab as P from matplotlib import collections, axes, transforms import matplotlib.numerix as N fig =3D P.figure() a =3D fig.add_subplot(1,1,1) verts =3D N.array([[0,0],[1,0],[1,1],[0,1]]) offsets =3D [[1,1]] col =3D collections.PolyCollection([verts], offsets=3Doffsets, transOffset=3Da.transData) a.add_collection(col) trans =3D transforms.scale_transform(transforms.Value(1),transforms.Value(1)) col.set_transform(trans)=20 a.set_xlim([-5,5]) a.set_ylim([-5,5]) P.show() ------------------------------------------------------------------------ ---------- |
From: Eric F. <ef...@ha...> - 2007-11-29 17:26:32
|
Martinho MA wrote: > Hello, > I have a contour with a clim smaller than the limits of my data... and > because of this there is an error when I try to add a colorbar. > Can someone help? > Thanks > MMA I think the basic problem is that you are trying to use a colorbar as a legend in a case where it doesn't really makes sense; the colorbar is mapping a range of values to a range of colors, and you have values that are outside that range. There are a couple ways to fix the problem: 1) Try using "colorbar(extend='both')". This is a workaround, but it may do what you want. 2) Explicitly specify a list of contour levels that are within the range of your clim. This is a better solution. Eric > > eg: > > x=arange(20) > y=arange(30) > x,y=meshgrid(x,y) > v=sqrt(x+y) # max=6.928, min=0.0 > > # next is ok > figure() > contour(x,y,v) > clim(0,7) > colorbar() > > # next gives the error: "ValueError: levels are outside colorbar range" > figure() > contour(x,y,v) > clim(2,6) > colorbar() > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: John H. <joh...@gm...> - 2007-11-28 19:00:27
|
I'm a matplotlib newbie and I'm trying to figure out the proper way to draw a bar graph with dates along the x-axis. I am able to draw graph that properly uses dates with the plot_date() call and I can do a bar graph with bar(). I can even use the following code to get the output that I want: plot_date(dates,units,visible = False) bar(dates,units,width=5.0) show() but it seems to me that plotting and invisible plot_date graph is a bit clunky. What is the proper way to do this with the library? thanks, John |
From: Ryan K. <rya...@gm...> - 2007-11-28 17:00:35
|
FYI, I see this same warning in another wxPython program of mine that doesn't use mpl or wxmpl, so it seems like it is a wxPython issue. Solutions are still welcome. Ryan On Nov 28, 2007 8:46 AM, Ryan Krauss <rya...@gm...> wrote: > I just created a small wxmpl example that I really like (attached), > but when I run it, I get these error messages: > > ** (python:18091): WARNING **: Can't create printer "PDF" because the > id "PDF" is already used > > (python:18091): GnomePrintCupsPlugin-WARNING **: The CUPS printer PDF > could not be created > > > (python:18091): GnomePrintCupsPlugin-WARNING **: The data for the CUPS > printer PDF could not be loaded. > > > I don't know if this is wxmpl specific, caused by wxPython, or caused > by matplotlib, but I would like to make it go away. Any thoughts? > > Thanks, > > Ryan > |
From: Rich S. <rsh...@ap...> - 2007-11-28 14:47:49
|
On Wed, 28 Nov 2007, Ryan Krauss wrote: > I may be jumping into this conversation way too late, but I really like > wxmpl. The one bell and whistle that I love is the click-and-drag box > zoom available by default. Attached is my hacked together simple example > of putting a wxmpl.PlotPanel on a wx.notebook. Ryan, Thank you very much. Our application neither needs nor wants user interaction. The plots are strictly for display. Rich -- Richard B. Shepard, Ph.D. | Integrity Credibility Applied Ecosystem Services, Inc. | Innovation <http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863 |
From: Ryan K. <rya...@gm...> - 2007-11-28 14:46:38
|
I just created a small wxmpl example that I really like (attached), but when I run it, I get these error messages: ** (python:18091): WARNING **: Can't create printer "PDF" because the id "PDF" is already used (python:18091): GnomePrintCupsPlugin-WARNING **: The CUPS printer PDF could not be created (python:18091): GnomePrintCupsPlugin-WARNING **: The data for the CUPS printer PDF could not be loaded. I don't know if this is wxmpl specific, caused by wxPython, or caused by matplotlib, but I would like to make it go away. Any thoughts? Thanks, Ryan |
From: Ryan K. <rya...@gm...> - 2007-11-28 14:37:02
|
I may be jumping into this conversation way too late, but I really like wxmpl. The one bell and whistle that I love is the click-and-drag box zoom available by default. Attached is my hacked together simple example of putting a wxmpl.PlotPanel on a wx.notebook. Ryan On Nov 27, 2007 11:06 AM, C M <cmp...@gm...> wrote: > > > > On Nov 27, 2007 11:27 AM, Rich Shepard <rsh...@ap...> wrote: > > > > On Mon, 26 Nov 2007, C M wrote: > > > > > > > Basically what I did (sorry if this is too basic, but I'm pretty new to > > > this and this may jog others to correct deficiencies in this simple > > > approach) was to: > > > > This is all straightforward and clear. The one statement I've not yet > > understood is this: > > > > > > > self.graph = matplotFrame3.PlotPanel(self.panel1 ,xpoints, > ypoints) > > > > I assume that matplotFrame3 is the name of the module in which you've > > written PlotPanel(). Is this assumption correct? > > > > Exactly. That is the module which I mention importing in step 4. > > > > > I'm modifying your approach to suit our application but it seems to be > the > > most parsimonious and elegant solution for simple display of plots in a > > wxPython panel. > > > > Thanks, > > > > > > > > > Glad it will help your application. > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
From: Jesper L. <jl...@dm...> - 2007-11-28 08:30:33
|
Hi matplotlib users I am trying to fit a substantial number of subplots into a single plot. I would therefore like to reduce the font size of my x- and yticks. Some of the plots contain very large numbers on the y-axis. Using the default formatting this means that the exponential will be written above the plot. When the font size of the y-axis is reduced the font size of the exponential above the plot is not reduced as shown in the example code below: import pylab pylab.figure() x = [1, 2, 3] y = [1e13, 2e13, 3e13] pylab.plot(x,y) pylab.xticks(fontsize=6) pylab.yticks(fontsize=6) pylab.savefig('test.png') Has anyone got any suggestions on how to reduce the font size of the exponential as well or is this a bug in matplotlib? - Jesper -- Jesper Larsen, Ph.D. Scientist National Environmental Research Institute University of Aarhus Department of Marine Ecology Frederiksborgvej 399 DK-4000 Roskilde Denmark tel: +45 46301866 http://www.neri.dk |
From: Christopher B. <Chr...@no...> - 2007-11-28 00:39:55
|
J.D. Herron wrote: > The application itself is actually a legacy app whose GUI is done with > WTL (windows template library) which is a thin veneer on top of the > windows API. Darn. > I have matplotlib set to use wxAgg as the backend. I'm > not inclined to rebuild the entire app with a different GUI toolkit so > from your responses it looks like I'm going to have to do something more > complicated using wx directly in the scripts in order to make this type > of plotting work. yup. I'd post on the wxPython lists -- there are way s to pass Window Handles into/out of wx, so you may be able to get them to work together. I think you can also override the wx mainloop, so that you can deal with the two mainloops problem. This is all wx stuff, MPL isn't anything special in that regard. Another option is to use plain Agg back-end, and then render the resulting bitmap with WTL. (which I suppose is like building a limited feature MTL-Agg back-end) -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |
From: J.D. H. <jot...@gm...> - 2007-11-27 20:49:19
|
Thanks for your replies, The application itself is actually a legacy app whose GUI is done with WTL (windows template library) which is a thin veneer on top of the windows API. I have matplotlib set to use wxAgg as the backend. I'm not inclined to rebuild the entire app with a different GUI toolkit so from your responses it looks like I'm going to have to do something more complicated using wx directly in the scripts in order to make this type of plotting work. Unfortunately that requires a lot more of a learning curve than I was hoping. J.D. On Nov 27, 2007 12:33 PM, Christopher Barker <Chr...@no...> wrote: > John Hunter wrote: > > > Eeeeew, that looks really dangerous. For starters, I would never > try > > > to do this using pylab, > > exactly. the question is -- what GUItoolkit are you using with C++? > hopefully it is wx or qt (you'd be using C with GTK, right?). > > If so, then use the appropriate back-end, use it like the embedding_in > examples, and then it's like using GUI toolkit calls with a mixed > C++/Python app without MPL -- use the appropriate GUI mailing list for > questions about that. > > If you're not using a GUI toolkit at all with C++, I'd be inclined to > reverse your approach, and use Python+wx (opr QT, or GTK) to host your > app, and extend with the C++. > > -Chris > > > > -- > Christopher Barker, Ph.D. > Oceanographer > > Emergency Response Division > NOAA/NOS/OR&R (206) 526-6959 voice > 7600 Sand Point Way NE (206) 526-6329 fax > Seattle, WA 98115 (206) 526-6317 main reception > > Chr...@no... > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: John H. <jd...@gm...> - 2007-11-27 20:00:10
|
On Nov 27, 2007 1:56 PM, Tom Johnson <tj...@gm...> wrote: > > Use the subplots_adjust paramters, eg > > fig.subplots_adjust(hspace=0) > This wasn't working for me... Oh, I was assuming you wanted to adjust the space between two subplots stacked one over another. For side-by-side, use wspace f.subplots_adjust(wspace=0) |
From: Tom J. <tj...@gm...> - 2007-11-27 19:58:13
|
Doh! Sorry, I adjusted the wrong space. On Nov 27, 2007 11:56 AM, Tom Johnson <tj...@gm...> wrote: > On Nov 27, 2007 11:48 AM, John Hunter <jd...@gm...> wrote: > > Use the subplots_adjust paramters, eg > > > > fig.subplots_adjust(hspace=0) > > > > This wasn't working for me... > > from pylab import * > f = gcf() > f.subplots_adjust(hspace=0) > f.add_subplot(121) > f.add_subplot(122) > show() > > Adjusting the space after adding the subplots did not work either (using SVN). > |
From: Tom J. <tj...@gm...> - 2007-11-27 19:56:46
|
On Nov 27, 2007 11:48 AM, John Hunter <jd...@gm...> wrote: > Use the subplots_adjust paramters, eg > > fig.subplots_adjust(hspace=0) > This wasn't working for me... from pylab import * f = gcf() f.subplots_adjust(hspace=0) f.add_subplot(121) f.add_subplot(122) show() Adjusting the space after adding the subplots did not work either (using SVN). |
From: John H. <jd...@gm...> - 2007-11-27 19:48:26
|
On Nov 27, 2007 1:46 PM, Tom Johnson <tj...@gm...> wrote: > I'd like to make the separation distance between two subplots to be > much smaller. How can I achieve this? Use the subplots_adjust paramters, eg fig.subplots_adjust(hspace=0) JDH |
From: Tom J. <tj...@gm...> - 2007-11-27 19:46:50
|
I'd like to make the separation distance between two subplots to be much smaller. How can I achieve this? |
From: Christopher B. <Chr...@no...> - 2007-11-27 19:32:54
|
John Hunter wrote: > > Eeeeew, that looks really dangerous. For starters, I would never try > > to do this using pylab, exactly. the question is -- what GUItoolkit are you using with C++? hopefully it is wx or qt (you'd be using C with GTK, right?). If so, then use the appropriate back-end, use it like the embedding_in examples, and then it's like using GUI toolkit calls with a mixed C++/Python app without MPL -- use the appropriate GUI mailing list for questions about that. If you're not using a GUI toolkit at all with C++, I'd be inclined to reverse your approach, and use Python+wx (opr QT, or GTK) to host your app, and extend with the C++. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |
From: John H. <jd...@gm...> - 2007-11-27 18:43:02
|
On Nov 27, 2007 12:10 PM, J.D. Herron <jot...@gm...> wrote: > > > Hello, > > I'm using boost python to run python embedded in a C++ application on > windows. I would like to be able to have the scripts that run in this > embedded environment be able to display matplotlib plots. I have searche= d > in vain for information on the nuances of running matplotlib pylab plots = in > an embedded c++ environment and am hoping someone can help me out. Alexander Schmolck reported similar problems trying to call pylab from an embedded app. My response to him at the time was: > Eeeeew, that looks really dangerous. For starters, I would never try > to do this using pylab, but rather follow the lead of > examples/embedding_in_qt.py. Then you won't be competing for the > mainloop.... I CCd him on this email. Perhaps he has made some progress since his original attempts and can advise... JDH > My C++ application has an event handler to run a python script when the u= ser > so chooses. From this main message thread I execute a script file (using > boost::python::exec_file() ) and if that script does a pylab plot of data > the first time through everything works fine. An example script would be > something like: > > fig =3D pylab.figure() > pylab.imshow( myImage ) > pylab.show() > > I am able to interact with the plot window just fine and close it from th= e > upper right window controls. However, if I run the same script again fro= m > my app the figure window comes up with my data but the window is now dead= . > I am unable to interact or even close the figure window. When I try to m= ove > the window my app crashes. > > I want the plotting to behave synchronously so that control is not return= ed > to my app until the plot is dismissed. However, after the first show it > seems that interactivity is automatically enabled for matplotlib. I've > tried explicitly turning interactivity off in the script ( pylab.ioff() ) > but show seems to automatically turn it back on. > > I'm just not sure of all I need to do to get this working so that I can > bring up the plot over and over. BTW I've configured my matplotlib with = a > wxAgg backend. Can anyone help me out here or point me to information on > embedding matplotlib in c++? Thanks in advance=85. > > J.D. > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
From: Rich S. <rsh...@ap...> - 2007-11-27 18:14:28
|
On Tue, 27 Nov 2007, Anthony Floyd wrote: > Check the class library documentation for the axes() object. > http://matplotlib.sourceforge.net/matplotlib.axes.html Anthony, I've looked at this but didn't absorb it all. Now I'll spend more time with it. > Your best bet is really to explore the object set in the class reference docs. That I will. Thanks very much, Rich -- Richard B. Shepard, Ph.D. | Integrity Credibility Applied Ecosystem Services, Inc. | Innovation <http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863 |