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
(8) |
2
(4) |
3
(21) |
4
(23) |
5
(3) |
6
|
7
(8) |
8
(2) |
9
|
10
(6) |
11
(4) |
12
(6) |
13
(1) |
14
(9) |
15
(10) |
16
(11) |
17
(3) |
18
(10) |
19
(9) |
20
(2) |
21
(10) |
22
(16) |
23
(8) |
24
(6) |
25
(6) |
26
(3) |
27
(5) |
28
(1) |
29
(14) |
30
(5) |
31
(14) |
|
|
From: Nelson M. <ne...@mo...> - 2006-08-16 21:08:24
|
Thanks for the answers. I was glad to see Steven Chaplin suggest that it is possible to get libpng to write directly to a stream like StringIO; seems like a good thing. In the meantime I came up with the following little helper functions to render a Figure to PNG (via Agg) or SVG (via SVG). def getPngFromFigure(figure, imageSize): canvas = FigureCanvasAgg(figure) canvas.draw() imageSize = canvas.get_width_height() imageRgb = canvas.tostring_rgb() pilImage = PIL.Image.fromstring("RGB", imageSize, imageRgb) buffer = StringIO.StringIO() pilImage.save(buffer, "PNG") return buffer.getvalue() def getSvgFromFigure(figure, imageSize): canvas = FigureCanvasSVG(figure) canvas.draw() svgwriter = StringIO.StringIO() renderer = RendererSVG(imageSize[0], imageSize[1], svgwriter) figure.draw(renderer) renderer.finish() return svgwriter.getvalue() This code works, and while I don't really understand matplotlib internals I think I'm mostly doing things right. Two minor problems: The Agg images are RGB, no alpha channel. Amusingly enough Agg gives you ARGB but PIL only understands RGBA. My code is ignoring whatever size the Figure itself thinks it should be. Jouni K Seppanen wrote: > Nelson Minar <ne...@mo...> writes: > > >> matplotlib is great, particularly the image quality. I'm using >> matplotlib to generate images in a webapp and have run into a problem. >> How do I get it to give me the rendered image bytes in a string rather >> than writing the image to a file? >> > > FigureCanvasAgg has the undocumented methods buffer_rgba, > tostring_argb, and tostring_rgb, which might help here. > > >> The docs for FigureCanvasAgg.print_figure() says that if the filename >> is actually a file object then it will write the bytes to that file >> object. This works great if I pass in sys.stdout, but as soon as I try >> to use a StringIO() instance to capture the bytes in Python I get an >> error: >> > [...] > >> TypeError: Could not convert object to file pointer >> > > libpng seems to require an actual file pointer. This was discussed in > http://thread.gmane.org/gmane.comp.python.matplotlib.general/3118/ > > |
From: Steven C. <ste...@ya...> - 2006-08-16 14:59:14
|
> Nelson Minar <ne...@mo...> writes: > > > matplotlib is great, particularly the image quality. I'm using > > matplotlib to generate images in a webapp and have run into a problem. > > How do I get it to give me the rendered image bytes in a string rather > > than writing the image to a file? > > FigureCanvasAgg has the undocumented methods buffer_rgba, > tostring_argb, and tostring_rgb, which might help here. > > > The docs for FigureCanvasAgg.print_figure() says that if the filename > > is actually a file object then it will write the bytes to that file > > object. This works great if I pass in sys.stdout, but as soon as I try > > to use a StringIO() instance to capture the bytes in Python I get an > > error: > [...] > > TypeError: Could not convert object to file pointer > > libpng seems to require an actual file pointer. This was discussed in > http://thread.gmane.org/gmane.comp.python.matplotlib.general/3118/ libpng does not require a file pointer. It can write to streams (or StringIO objects) too. Cairo uses libpng to write to streams, and PyCairo uses cairo (and libpng) to write to file-like objects (like StringIO), so it is possible. But I don't know the details, the technique is buried somewhere in the cairo and libpng C code. Steve Send instant messages to your online friends http://au.messenger.yahoo.com |
From: Samuel G. <sg...@ol...> - 2006-08-16 13:33:37
|
Sorry for the mistake. Darren Dale wrote: > On Wednesday 16 August 2006 08:49, Samuel GARCIA wrote: > >> I am not good enougth track and solve the problem. >> Maybe I can be a beta tester. >> >> I saw in svn that the author of qt4 backend is Charlie Moad. >> And it is very young (6 weeks). >> > > I think you misread the svn entry. James Amundson ported the qt3 backend to > qt4, but it was not quite finished. I finished the port and committed it. > Charlie added blitting. > |
From: Charlie M. <cw...@gm...> - 2006-08-16 13:04:01
|
I am not the author of it. I just may of made the last commits to it. I am pretty sure Darren wrote the initial implimentatin. The only example that exists right now is animation_blit_qt4.py. On 8/16/06, Samuel GARCIA <sg...@ol...> wrote: > > I am not good enougth track and solve the problem. > Maybe I can be a beta tester. > > I saw in svn that the author of qt4 backend is Charlie Moad. > And it is very young (6 weeks). > > So a question for Charlie moad : do you have a example which could work on > my debian unstable station for embedding_in_qt4.py ? > > thank you > > Samuel > > > > Darren Dale wrote: > On Wednesday 16 August 2006 04:54, Samuel GARCIA wrote: > > > I still have a problem. This is my code : > > import sys > > from PyQt4.QtCore import * > from PyQt4.QtGui import * > > from matplotlib.backends.backend_qt4agg import > FigureCanvasQTAgg as > FigureCanvas > from matplotlib.figure import Figure > > #-------------------------------------------------------------------------- > ---- class MyWidget(QWidget): > def __init__(self, parent=None): > QWidget.__init__(self, parent) > self.menuBar = QMenuBar() > self.fileMenu = QMenu(self.tr("&File"), self) > self.menuBar.addMenu(self.fileMenu) > > mainLayout = QVBoxLayout() > mainLayout.setMenuBar(self.menuBar) > > self.setLayout(mainLayout) > > #-------------------------------------------------------------------------- > ---- if __name__ == "__main__": > app = QApplication(sys.argv) > dialog = MyWidget() > dialog.show() > sys.exit(app.exec_()) > > and it does not works because the main window is blocking. > But when I comment this line : > #from matplotlib.backends.backend_qt4agg import > FigureCanvasQTAgg as > FigureCanvas > it works ! > What am I doing wrong ? > > You may not be doing anything wrong. The qt4 backend is new and hasn't seen > much use. I think you are the first to try to embed in your own qt4 > application. If you feel up to it, maybe you could try to track down the > problem. > > Darren > > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > |
From: Darren D. <dd...@co...> - 2006-08-16 13:00:01
|
On Wednesday 16 August 2006 08:49, Samuel GARCIA wrote: > I am not good enougth track and solve the problem. > Maybe I can be a beta tester. > > I saw in svn that the author of qt4 backend is Charlie Moad. > And it is very young (6 weeks). I think you misread the svn entry. James Amundson ported the qt3 backend to qt4, but it was not quite finished. I finished the port and committed it. Charlie added blitting. |
From: Samuel G. <sg...@ol...> - 2006-08-16 12:50:09
|
I am not good enougth track and solve the problem. Maybe I can be a beta tester. I saw in svn that the author of qt4 backend is Charlie Moad. And it is very young (6 weeks). So a question for Charlie moad : do you have a example which could work on my debian unstable station for embedding_in_qt4.py ? thank you Samuel Darren Dale wrote: > On Wednesday 16 August 2006 04:54, Samuel GARCIA wrote: > >> I still have a problem. This is my code : >> >> import sys >> >> from PyQt4.QtCore import * >> from PyQt4.QtGui import * >> >> from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as >> FigureCanvas >> from matplotlib.figure import Figure >> >> #-------------------------------------------------------------------------- >> ---- class MyWidget(QWidget): >> def __init__(self, parent=None): >> QWidget.__init__(self, parent) >> self.menuBar = QMenuBar() >> self.fileMenu = QMenu(self.tr("&File"), self) >> self.menuBar.addMenu(self.fileMenu) >> >> mainLayout = QVBoxLayout() >> mainLayout.setMenuBar(self.menuBar) >> >> self.setLayout(mainLayout) >> >> #-------------------------------------------------------------------------- >> ---- if __name__ == "__main__": >> app = QApplication(sys.argv) >> dialog = MyWidget() >> dialog.show() >> sys.exit(app.exec_()) >> >> and it does not works because the main window is blocking. >> But when I comment this line : >> #from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as >> FigureCanvas >> it works ! >> What am I doing wrong ? >> > > You may not be doing anything wrong. The qt4 backend is new and hasn't seen > much use. I think you are the first to try to embed in your own qt4 > application. If you feel up to it, maybe you could try to track down the > problem. > > Darren > |
From: Darren D. <dd...@co...> - 2006-08-16 12:16:23
|
On Wednesday 16 August 2006 02:26, Brendan Barnwell wrote: > Hi, I'm trying to get matplotlib to give me a plot where the legend is > outside the axes. > > I saw several posts about this in the mailing list archives, but none of > them really seem to provide workable solutions. Try passing the loc kwarg to legend(). Like legend([...], loc=(1.01, 0.25)) > Or, alternatively, is there some easier way to get legends to NEVER > overlap lines? try legend([...], loc='best') Darren |
From: Darren D. <dd...@co...> - 2006-08-16 12:14:12
|
On Wednesday 16 August 2006 04:54, Samuel GARCIA wrote: > I still have a problem. This is my code : > > import sys > > from PyQt4.QtCore import * > from PyQt4.QtGui import * > > from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as > FigureCanvas > from matplotlib.figure import Figure > > #-------------------------------------------------------------------------- >---- class MyWidget(QWidget): > def __init__(self, parent=None): > QWidget.__init__(self, parent) > self.menuBar = QMenuBar() > self.fileMenu = QMenu(self.tr("&File"), self) > self.menuBar.addMenu(self.fileMenu) > > mainLayout = QVBoxLayout() > mainLayout.setMenuBar(self.menuBar) > > self.setLayout(mainLayout) > > #-------------------------------------------------------------------------- >---- if __name__ == "__main__": > app = QApplication(sys.argv) > dialog = MyWidget() > dialog.show() > sys.exit(app.exec_()) > > and it does not works because the main window is blocking. > But when I comment this line : > #from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as > FigureCanvas > it works ! > What am I doing wrong ? You may not be doing anything wrong. The qt4 backend is new and hasn't seen much use. I think you are the first to try to embed in your own qt4 application. If you feel up to it, maybe you could try to track down the problem. Darren |
From: Samuel G. <sg...@ol...> - 2006-08-16 08:54:23
|
Thank you, Sorry I did known the existence of matplotlib.backends.backend_qt4agg. It is more easy than I thought. but I still have a problem. This is my code : import sys from PyQt4.QtCore import * from PyQt4.QtGui import * from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.figure import Figure #------------------------------------------------------------------------------ class MyWidget(QWidget): def __init__(self, parent=None): QWidget.__init__(self, parent) self.menuBar = QMenuBar() self.fileMenu = QMenu(self.tr("&File"), self) self.menuBar.addMenu(self.fileMenu) mainLayout = QVBoxLayout() mainLayout.setMenuBar(self.menuBar) self.setLayout(mainLayout) #------------------------------------------------------------------------------ if __name__ == "__main__": app = QApplication(sys.argv) dialog = MyWidget() dialog.show() sys.exit(app.exec_()) and it does not works because the main window is blocking. But when I comment this line : #from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas it works ! What am I doing wrong ? PyQT4 is 4.0.1 Matplotlib is 0.87.4 Samuel Darren Dale wrote: > On Tuesday 15 August 2006 16:05, sg...@ol... wrote: > >> Thank you very much. >> >> What I would like is example for embedding_in_qt.py but whith qt4 >> >> when I tried : >> >> import PyQt4 >> from PyQt4.QtCore import * >> from PyQt4.QtGui import * >> >> from matplotlib.backends.backend_qtagg import FigureCanvasQTAgg as >> FigureCanvas >> from matplotlib.figure import Figure >> >> but I have : >> >> Traceback (most recent call last): >> > > You should be doing this instead: > > from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas > > Darren > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Brendan B. <bre...@br...> - 2006-08-16 06:26:20
|
Hi, I'm trying to get matplotlib to give me a plot where the legend is outside the axes. I saw several posts about this in the mailing list archives, but none of them really seem to provide workable solutions. Using Figure.legend() doesn't really put the legend outside the figure, because it doesn't resize the axes, so the legend just overlaps the figure. In the spirit of open source, I thought I'd try to do it myself. But I can't even figure out how the various matplotlib objects are being positioned in the window. Like, I can get some info about the axes with axes.get_position(), and I can get some info about the legend with legend.get_window_extent().get_bounds(), but the former is just proportional size information relative to the figure as a whole, and the second is in some coordinates I don't know how to interpret. How can I get information about the bounding boxes of the actual plot (i.e., the axes and plot area including ticks and labels) and the legend, in compatible numbers that will allow me to determine whether they overlap? Or, alternatively, is there some easier way to get legends to NEVER overlap lines? I'm rather surprised that there seems to be no way to guarantee this, since it seems like an obvious thing to want, and also since there seem to be a bunch of requests for it on the mailing list. Thanks for the help. -- --Brendan Barnwell "Do not follow where the path may lead. Go, instead, where there is no path, and leave a trail." --author unknown |
From: Jouni K S. <jk...@ik...> - 2006-08-16 04:14:27
|
Nelson Minar <ne...@mo...> writes: > matplotlib is great, particularly the image quality. I'm using > matplotlib to generate images in a webapp and have run into a problem. > How do I get it to give me the rendered image bytes in a string rather > than writing the image to a file? FigureCanvasAgg has the undocumented methods buffer_rgba, tostring_argb, and tostring_rgb, which might help here. > The docs for FigureCanvasAgg.print_figure() says that if the filename > is actually a file object then it will write the bytes to that file > object. This works great if I pass in sys.stdout, but as soon as I try > to use a StringIO() instance to capture the bytes in Python I get an > error: [...] > TypeError: Could not convert object to file pointer libpng seems to require an actual file pointer. This was discussed in http://thread.gmane.org/gmane.comp.python.matplotlib.general/3118/ -- Jouni |