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
|
|
From: Derek T. <der...@gm...> - 2013-04-20 15:33:29
|
This may be known, but the following modified example from http://matplotlib.org/mpl_toolkits/mplot3d/tutorial.html fails with a TypeError at matplotlib/backends/backend_pdf.pyc in draw_path_collection. Is it possible to save pdf files with surface plots? from mpl_toolkits.mplot3d import Axes3D from matplotlib import cm from matplotlib.ticker import LinearLocator, FormatStrFormatter import matplotlib.pyplot as plt import numpy as np fig = plt.figure() ax = fig.gca(projection='3d') X = np.arange(-5, 5, 0.25) Y = np.arange(-5, 5, 0.25) X, Y = np.meshgrid(X, Y) R = np.sqrt(X**2 + Y**2) Z = np.sin(R) surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.coolwarm, linewidth=0, antialiased=False) ax.set_zlim(-1.01, 1.01) ax.zaxis.set_major_locator(LinearLocator(10)) ax.zaxis.set_major_formatter(FormatStrFormatter('%.02f')) fig.colorbar(surf, shrink=0.5, aspect=5) fig.savefig('test.pdf') plt.show() |
|
From: John L. <joh...@sb...> - 2013-04-20 08:27:01
|
On 04/19/2013 03:26 AM, Mark Lawrence wrote: > On 19/04/2013 04:03, John Ladasky wrote: > >> Reading more, I realize that the way I was getting GUI output previously >> (with Python 2.7 and Matplotlib 1.1) was through wxPython. >> Unfortunately, it appears that wxPython's star is fading, and a Python >> 3-compatible version will not be written. In fact, wxPython hasn't >> released a new version in nine months. >> > I'm surprised that you say this as months of work have gone into > updating wxPython to make in Python 3 compatible. Please see > http://wxpython.org/Phoenix/snapshot-builds/ for the latest and greatest. > Well, that is good news. Just before my last message to this list, I visited wxpython.org, as I have done many times over the years. I saw no announcement that there would be a Python 3.x-compatible version. You would think that the developers would want everyone to know! |
|
From: Werner F. B. <wer...@fr...> - 2013-04-20 06:56:58
|
Hi,
I am trying to get matplotlib 1.2.0 to work with wxPython Phoenix - will
provide a patch when it is working.
Made the changes to backend_wx* for things like EmptyImage/EmptyBitmap
and Toolbar but I am stuck on the following.
if bbox is None:
# agg => rgba buffer -> bitmap
if 'phoenix' in wx.PlatformInfo:
return wx.Bitmap.FromBufferRGBA(int(agg.width),
int(agg.height),
memoryview(agg.buffer_rgba()))
else:
return wx.BitmapFromBufferRGBA(int(agg.width), int(agg.height),
agg.buffer_rgba())
else:
# agg => rgba buffer -> bitmap => clipped bitmap
return _WX28_clipped_agg_as_bitmap(agg, bbox)
TypeError: cannot make memory view because object does not have the
buffer interface
File "h:\devProjectsT\aaTests\matplotlib\wxembedding-5.py", line 63, in
<module>
demo()
File "h:\devProjectsT\aaTests\matplotlib\wxembedding-5.py", line 60, in demo
app.MainLoop()
File "c:\Python27\Lib\site-packages\wx-2.9.6-msw-phoenix\wx\core.py",
line 1841, in MainLoop
rv = wx.PyApp.MainLoop(self)
File "c:\Python27\Lib\site-packages\matplotlib\backends\backend_wx.py",
line 1209, in _onPaint
self.draw(drawDC=drawDC)
File
"c:\Python27\Lib\site-packages\matplotlib\backends\backend_wxagg.py",
line 61, in draw
self.bitmap = _convert_agg_to_wx_bitmap(self.get_renderer(), None)
File
"c:\Python27\Lib\site-packages\matplotlib\backends\backend_wxagg.py",
line 173, in _convert_agg_to_wx_bitmap
memoryview(agg.buffer_rgba()))
I tried using "memoryview" based on a suggestion by Robin Dunn, and
based on the following info I see in the debugger that should work no?
agg.buffer_rgba()
<read-write buffer ptr 0x05400638, size 229200 at 0x055FC680>
type(agg.buffer_rgba())
<type 'buffer'>
agg
<matplotlib.backends.backend_agg.RendererAgg instance at 0x04BA0670>
If I don't use "memoryview" (which would probably be preferred) I get
the following exception.
Can someone help us figure this one out.
Thanks
Werner
TypeError: Bitmap.FromBufferRGBA(): argument 3 has unexpected type 'buffer'
File "h:\devProjectsT\aaTests\matplotlib\wxembedding-5.py", line 63, in
<module>
demo()
File "h:\devProjectsT\aaTests\matplotlib\wxembedding-5.py", line 60, in demo
app.MainLoop()
File "c:\Python27\Lib\site-packages\wx-2.9.6-msw-phoenix\wx\core.py",
line 1841, in MainLoop
rv = wx.PyApp.MainLoop(self)
File "c:\Python27\Lib\site-packages\matplotlib\backends\backend_wx.py",
line 1209, in _onPaint
self.draw(drawDC=drawDC)
File
"c:\Python27\Lib\site-packages\matplotlib\backends\backend_wxagg.py",
line 61, in draw
self.bitmap = _convert_agg_to_wx_bitmap(self.get_renderer(), None)
File
"c:\Python27\Lib\site-packages\matplotlib\backends\backend_wxagg.py",
line 173, in _convert_agg_to_wx_bitmap
agg.buffer_rgba())
|
|
From: Christoph G. <cw...@fa...> - 2013-04-19 16:36:31
|
Hello, Is there a way to find out the optimal resolution that an array (of a given aspect ratio) should have, so that imshow will not re-scale it on a pixel-based backend? Some background: I'm preparing an array that has a native resolution, so for PDF output I use imshow with interpolation='none'. For PNG-output, however, the array has to be rescaled. I would prefer to prepare the array in the correct resolution right away. Thanks in advance, Christoph |
|
From: Michael D. <md...@st...> - 2013-04-19 16:14:38
|
On 04/19/2013 01:59 AM, C M wrote:
>
>
> On Thu, Apr 18, 2013 at 11:03 PM, John Ladasky
> <joh...@sb... <mailto:joh...@sb...>> wrote:
>
> .
> Reading more, I realize that the way I was getting GUI output
> previously
> (with Python 2.7 and Matplotlib 1.1) was through wxPython.
> Unfortunately, it appears that wxPython's star is fading, and a Python
> 3-compatible version will not be written. In fact, wxPython hasn't
> released a new version in nine months.
>
>
> wxPython is alive and well and the newest developmental version of it
> ("Phoenix") runs on Python 3. It should be released fairly soon. One
> of the wxPython list regulars mentioned getting his software to run
> with it, with a few minor issues, just six days ago. So you might
> want to give Phoenix a try.
That's great news. Unfortunately, I'm not aware of any testing with it
and matplotlib on Python 3, so for someone who just wants to get things
to work, I would still recommend Tk, gtk or Qt4 on Python3.
Mike
|
|
From: Werner F. B. <wer...@fr...> - 2013-04-19 11:00:14
|
On 19/04/2013 12:26, Mark Lawrence wrote: > On 19/04/2013 04:03, John Ladasky wrote: > >> Reading more, I realize that the way I was getting GUI output previously >> (with Python 2.7 and Matplotlib 1.1) was through wxPython. >> Unfortunately, it appears that wxPython's star is fading, and a Python >> 3-compatible version will not be written. In fact, wxPython hasn't >> released a new version in nine months. >> > I'm surprised that you say this as months of work have gone into > updating wxPython to make in Python 3 compatible. Please see > http://wxpython.org/Phoenix/snapshot-builds/ for the latest and greatest. This one to the list - sorry Mark used the wrong reply button. I don't work on Python 3 yet but I am trying to get Phoenix to work with matplotlib. Made a few changes to backend_wx: Following don't exist in Phoenix (build r73823) - will research later if they should exist. #wx.WXK_PRIOR : 'pageup', #wx.WXK_NEXT : 'pagedown', #wx.WXK_NUMPAD_PRIOR : 'pageup', #wx.WXK_NUMPAD_NEXT : 'pagedown', There are a few EmptyBitMap creates which need to be changed to: if 'phoenix' in wx.PlatformInfo: self.bitmap = wx.Bitmap(w, h) else: self.bitmap = wx.EmptyBitmap(w, h) But now I am stuck on the following exception and I haven't found a solution to this yet - any pointers would be very welcome. Werner AttributeError: 'BaseApp' object has no attribute 'ProcessIdle' File "c:\dev\twcbv4\twcbsrc\controllers\app_stats.py", line 864, in <module> apprb = Appstats(None, standalone=True) File "c:\dev\twcbv4\twcbsrc\controllers\app_stats.py", line 203, in __init__ self.setupControls() File "c:\dev\twcbv4\twcbsrc\controllers\app_stats.py", line 236, in setupControls self.createStatsPanes() File "c:\dev\twcbv4\twcbsrc\controllers\app_stats.py", line 401, in createStatsPanes self.paneStatsDtypeCons.axes = self.paneStatsDtypeCons.figure.add_subplot(noRow, noCol, 1) File "c:\Python27\Lib\site-packages\matplotlib\figure.py", line 882, in add_subplot a = subplot_class_factory(projection_class)(self, *args, **kwargs) File "c:\Python27\Lib\site-packages\matplotlib\axes.py", line 8938, in __init__ self._axes_class.__init__(self, fig, self.figbox, **kwargs) File "c:\Python27\Lib\site-packages\matplotlib\axes.py", line 461, in __init__ self._init_axis() File "c:\Python27\Lib\site-packages\matplotlib\axes.py", line 523, in _init_axis self.spines['right'].register_axis(self.yaxis) File "c:\Python27\Lib\site-packages\matplotlib\spines.py", line 151, in register_axis self.axis.cla() File "c:\Python27\Lib\site-packages\matplotlib\axis.py", line 732, in cla self.reset_ticks() File "c:\Python27\Lib\site-packages\matplotlib\axis.py", line 746, in reset_ticks self.minorTicks.extend([self._get_tick(major=False)]) File "c:\Python27\Lib\site-packages\matplotlib\axis.py", line 1839, in _get_tick return YTick(self.axes, 0, '', major=major, **tick_kw) File "c:\Python27\Lib\site-packages\matplotlib\axis.py", line 140, in __init__ self.tick2line = self._get_tick2line() File "c:\Python27\Lib\site-packages\matplotlib\axis.py", line 541, in _get_tick2line l.set_transform(self.axes.get_yaxis_transform(which='tick2')) File "c:\Python27\Lib\site-packages\matplotlib\lines.py", line 476, in set_transform Artist.set_transform(self, t) File "c:\Python27\Lib\site-packages\matplotlib\artist.py", line 235, in set_transform self.pchanged() File "c:\Python27\Lib\site-packages\matplotlib\artist.py", line 216, in pchanged for oid, func in self._propobservers.iteritems(): |
|
From: Mark L. <bre...@ya...> - 2013-04-19 10:26:42
|
On 19/04/2013 04:03, John Ladasky wrote: > Reading more, I realize that the way I was getting GUI output previously > (with Python 2.7 and Matplotlib 1.1) was through wxPython. > Unfortunately, it appears that wxPython's star is fading, and a Python > 3-compatible version will not be written. In fact, wxPython hasn't > released a new version in nine months. > I'm surprised that you say this as months of work have gone into updating wxPython to make in Python 3 compatible. Please see http://wxpython.org/Phoenix/snapshot-builds/ for the latest and greatest. -- If you're using GoogleCrap™ please read this http://wiki.python.org/moin/GoogleGroupsPython. Mark Lawrence |
|
From: Francesco M. <fra...@gm...> - 2013-04-19 09:52:46
|
Hi John, on Kubuntu Precise the standard repo has at least: python3-pyqt4 python3-pyside python3-tk The first two should enable Qt4Agg backend, the last TkAgg Fra 2013/4/19 Sterling Smith <sm...@fu...> > I have used the TkAgg backend in python2, installing the dependencies by > hand. Is this backend not available for python3? > > -Sterling > > On Apr 18, 2013, at 8:03PM, John Ladasky wrote: > > > Thanks to both Francesco Montesano and Benjamin Root. I have done some > > reading. And I have made some progress, though I am not quite where I > > want to be yet. > > > > So the problem appears to be that the only backend for which I had > > suitable Python 3 libraries was agg. It only requires libpng, which I > > have. I can render a Matplotlib canvas, but it appears that the only > > output that agg offers is in the form of PNG files to disk. I cannot > > create a live window on the screen. > > > > Reading more, I realize that the way I was getting GUI output previously > > (with Python 2.7 and Matplotlib 1.1) was through wxPython. > > Unfortunately, it appears that wxPython's star is fading, and a Python > > 3-compatible version will not be written. In fact, wxPython hasn't > > released a new version in nine months. > > > > The other choices for Matplotlib GUI output on Linux appear to be > > through GTK, PySide, and PyQt. I am not familiar with GTK, but I know > > that it is widely-used. Also, GTK appears to be Python 3-compatible, > > and so that is where I need to go. > > > > I'm going through a trial and error process. Unfortunately, the names > > of the repositories in Ubuntu are not very helpful. I installed a few > > GTK and python-gtk related packages that I thought were relevant. On my > > first build attempt I got no errors, but also, I didn't get a GTKAgg > > backend. Upon re-reading, I saw that I should modify matplotlib's > > setup.cfg file to force a GTK build attempt, and to report errors if it > > fails. That's what it does. In the "optional backend dependencies" > > section I am not seeing any GTK libraries listed, even though I have > > installed python-gtk2-dev (2.24.0), python-gobject-2-dev (2.28.6), > > libgtk2.0-dev (2.24.10), libglib2.0-dev (2.32.3), python-gi-dev (3.2.2), > > python-gobject-dev (3.2.2), python3-gi (3.2.2), and a few DOZEN packages > > on which these depend. > > > > If anyone knows the way forward from here, I would appreciate your > > advice. Thanks again. > > > > > ------------------------------------------------------------------------------ > > Precog is a next-generation analytics platform capable of advanced > > analytics on semi-structured data. The platform includes APIs for > building > > apps and a phenomenal toolset for data science. Developers can use > > our toolset for easy data analysis & visualization. Get a free account! > > http://www2.precog.com/precogplatform/slashdotnewsletter > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Sterling S. <sm...@fu...> - 2013-04-19 06:27:16
|
I have used the TkAgg backend in python2, installing the dependencies by hand. Is this backend not available for python3? -Sterling On Apr 18, 2013, at 8:03PM, John Ladasky wrote: > Thanks to both Francesco Montesano and Benjamin Root. I have done some > reading. And I have made some progress, though I am not quite where I > want to be yet. > > So the problem appears to be that the only backend for which I had > suitable Python 3 libraries was agg. It only requires libpng, which I > have. I can render a Matplotlib canvas, but it appears that the only > output that agg offers is in the form of PNG files to disk. I cannot > create a live window on the screen. > > Reading more, I realize that the way I was getting GUI output previously > (with Python 2.7 and Matplotlib 1.1) was through wxPython. > Unfortunately, it appears that wxPython's star is fading, and a Python > 3-compatible version will not be written. In fact, wxPython hasn't > released a new version in nine months. > > The other choices for Matplotlib GUI output on Linux appear to be > through GTK, PySide, and PyQt. I am not familiar with GTK, but I know > that it is widely-used. Also, GTK appears to be Python 3-compatible, > and so that is where I need to go. > > I'm going through a trial and error process. Unfortunately, the names > of the repositories in Ubuntu are not very helpful. I installed a few > GTK and python-gtk related packages that I thought were relevant. On my > first build attempt I got no errors, but also, I didn't get a GTKAgg > backend. Upon re-reading, I saw that I should modify matplotlib's > setup.cfg file to force a GTK build attempt, and to report errors if it > fails. That's what it does. In the "optional backend dependencies" > section I am not seeing any GTK libraries listed, even though I have > installed python-gtk2-dev (2.24.0), python-gobject-2-dev (2.28.6), > libgtk2.0-dev (2.24.10), libglib2.0-dev (2.32.3), python-gi-dev (3.2.2), > python-gobject-dev (3.2.2), python3-gi (3.2.2), and a few DOZEN packages > on which these depend. > > If anyone knows the way forward from here, I would appreciate your > advice. Thanks again. > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: C M <cmp...@gm...> - 2013-04-19 06:00:24
|
On Thu, Apr 18, 2013 at 11:03 PM, John Ladasky
<joh...@sb...>wrote:
> .
> Reading more, I realize that the way I was getting GUI output previously
> (with Python 2.7 and Matplotlib 1.1) was through wxPython.
> Unfortunately, it appears that wxPython's star is fading, and a Python
> 3-compatible version will not be written. In fact, wxPython hasn't
> released a new version in nine months.
>
wxPython is alive and well and the newest developmental version of it
("Phoenix") runs on Python 3. It should be released fairly soon. One of
the wxPython list regulars mentioned getting his software to run with it,
with a few minor issues, just six days ago. So you might want to give
Phoenix a try.
Che
|
|
From: John L. <joh...@sb...> - 2013-04-19 03:03:19
|
Thanks to both Francesco Montesano and Benjamin Root. I have done some reading. And I have made some progress, though I am not quite where I want to be yet. So the problem appears to be that the only backend for which I had suitable Python 3 libraries was agg. It only requires libpng, which I have. I can render a Matplotlib canvas, but it appears that the only output that agg offers is in the form of PNG files to disk. I cannot create a live window on the screen. Reading more, I realize that the way I was getting GUI output previously (with Python 2.7 and Matplotlib 1.1) was through wxPython. Unfortunately, it appears that wxPython's star is fading, and a Python 3-compatible version will not be written. In fact, wxPython hasn't released a new version in nine months. The other choices for Matplotlib GUI output on Linux appear to be through GTK, PySide, and PyQt. I am not familiar with GTK, but I know that it is widely-used. Also, GTK appears to be Python 3-compatible, and so that is where I need to go. I'm going through a trial and error process. Unfortunately, the names of the repositories in Ubuntu are not very helpful. I installed a few GTK and python-gtk related packages that I thought were relevant. On my first build attempt I got no errors, but also, I didn't get a GTKAgg backend. Upon re-reading, I saw that I should modify matplotlib's setup.cfg file to force a GTK build attempt, and to report errors if it fails. That's what it does. In the "optional backend dependencies" section I am not seeing any GTK libraries listed, even though I have installed python-gtk2-dev (2.24.0), python-gobject-2-dev (2.28.6), libgtk2.0-dev (2.24.10), libglib2.0-dev (2.32.3), python-gi-dev (3.2.2), python-gobject-dev (3.2.2), python3-gi (3.2.2), and a few DOZEN packages on which these depend. If anyone knows the way forward from here, I would appreciate your advice. Thanks again. |
|
From: Michael D. <md...@st...> - 2013-04-18 17:06:14
|
Can you please provide a complete, minimal and self-contained script
that reproduces the error? The example below has many undefined
variables etc.
Cheers,
Mike
On 04/16/2013 07:09 PM, Christophe Pettus wrote:
> # preamble code collecting data
>
> ind = np.arange(len(table_name))
>
> width = 0.35
>
> fig = plot.figure(figsize=DEFAULT_FIGURE_SIZE)
> ax = fig.add_subplot(111, axisbg='#fafafa', alpha=0.9)
>
> ax.set_title('Largest Tables')
>
> ax.set_xlabel('Size (log scale)')
>
> ax.set_xscale('log')
> ax.grid(True)
>
> ax.xaxis.set_major_formatter(FuncFormatter(magnitude_ticks))
>
> dbar = ax.barh(ind, data_size, width, linewidth=0, color='blue', label='Main Data') # exception here
> ibar = ax.barh(ind, index_toast_size, width, left=data_size, linewidth=0, color='red', label='Toast/Indexes')
> ax.set_yticks(ind + width/2)
> ax.set_yticklabels(table_name, fontproperties=xx_small_font)
>
> ax.legend(loc='lower right', prop=x_small_font)
>
> plot.tight_layout()
>
> plot.savefig(REPORT_DIR_PATH + '/table_sizes.pdf')
>
> plot.close()
|
|
From: Benjamin R. <ben...@ou...> - 2013-04-18 14:36:00
|
On Thu, Apr 18, 2013 at 3:34 AM, John Ladasky <joh...@sb...>wrote: > Hello everyone, > > After not using Matplotlib for over a year, I'm returning to it. > Meanwhile, I have upgraded from Python 2.7 to Python 3.2, and I want to > do all of my software development in Python 3 from now on. > > My OS is Ubuntu 12.04.1. Python 2.7 is still the default Python for > Ubuntu, and many of the Python 3 packages are not offered as official > repositories yet. I downloaded Matplotlib 1.2.1, then built it using > Python 3. Eventually, I got no build error messages, and proceeded to > install. (I always have to pick through dependency problems one error > message at a time. I wish there was a better way. The Matplotlib docs > could be a little better in this respect.) > > When I open a Python3 interpreter, I can import matplotlib. But I am > not seeing ANYTHING with commands like plt.show(). It executes, and > then returns. No output is generated. > > This very short and simple test program of mine used to produce output > with Python 2.7 and Matplotlib 1.1.0. But with Python 3 and Matplolib > 1.2.1, I am getting nothing... > > import numpy as np > import matplotlib.pyplot as plt > > x = np.arange(0, 5, 0.1); > y = np.sin(x) > plt.plot(x, y) > plt.show() > > It runs. No error messages are generated. But I don't get a graph. I > don't even see a graph flicker on to the screen and disappear an instant > later. > > Any advice will be appreciated! > > You will need to make sure you install the gtk packages (both the libraries and the dev packages) *before* building from source. If it can't find the dev packages, then it won't build the interactive backend for it. I can't remember if there are python3 specific packages for gtk (or any other gui for that matter). |
|
From: Francesco M. <fra...@gm...> - 2013-04-18 09:44:08
|
Hi John,
2013/4/18 John Ladasky <joh...@sb...>
> On 04/18/2013 01:01 AM, Francesco Montesano wrote:
>
>> does plt.savefig('test.png') work?
>>
> Yes, it does! Thank you, that was a useful hint.
Good, than I would say that is a clear sign that you have a non interactive
backend.
Can you please give use the output of plt.get_backend() ?
>
> If the figure get saved, it can be that you are using a non interactive
>> backend
>>
> Ugh, the one thing that I never understood about Matplotlib was backends.
> So, what am I missing? (Whatever I am missing now, I had it working a
> year ago when I was using matplotlib 1.1.0 on Python 2.7.)
>
This link http://matplotlib.org/faq/usage_faq.html#what-is-a-backend should
explain you what a backend is.
If you want to use always a specific backend, you should select it in the
matplotlibrc file
You should have a line like this
#backend : TkAgg
Just uncomment it and put the backend that you want to use
> I have also just tried ipython3. Nothing that I do in the live
> interpreter displays any graphs.
>
>
That is not surprising: if matplotlib doesn't use an interactive backend,
you can't show the figures, whatever interpreter you use.
I hope that now is clearer,
Fra
ps: try to remember to reply to the list :D
|
|
From: Francesco M. <fra...@gm...> - 2013-04-18 08:02:08
|
Hi John,
does plt.savefig('test.png') work?
If the figure get saved, it can be that you are using a non interactive
backend
Cheers
Fra
2013/4/18 John Ladasky <joh...@sb...>
> Hello everyone,
>
> After not using Matplotlib for over a year, I'm returning to it.
> Meanwhile, I have upgraded from Python 2.7 to Python 3.2, and I want to
> do all of my software development in Python 3 from now on.
>
> My OS is Ubuntu 12.04.1. Python 2.7 is still the default Python for
> Ubuntu, and many of the Python 3 packages are not offered as official
> repositories yet. I downloaded Matplotlib 1.2.1, then built it using
> Python 3. Eventually, I got no build error messages, and proceeded to
> install. (I always have to pick through dependency problems one error
> message at a time. I wish there was a better way. The Matplotlib docs
> could be a little better in this respect.)
>
> When I open a Python3 interpreter, I can import matplotlib. But I am
> not seeing ANYTHING with commands like plt.show(). It executes, and
> then returns. No output is generated.
>
> This very short and simple test program of mine used to produce output
> with Python 2.7 and Matplotlib 1.1.0. But with Python 3 and Matplolib
> 1.2.1, I am getting nothing...
>
> import numpy as np
> import matplotlib.pyplot as plt
>
> x = np.arange(0, 5, 0.1);
> y = np.sin(x)
> plt.plot(x, y)
> plt.show()
>
> It runs. No error messages are generated. But I don't get a graph. I
> don't even see a graph flicker on to the screen and disappear an instant
> later.
>
> Any advice will be appreciated!
>
>
>
> ------------------------------------------------------------------------------
> Precog is a next-generation analytics platform capable of advanced
> analytics on semi-structured data. The platform includes APIs for building
> apps and a phenomenal toolset for data science. Developers can use
> our toolset for easy data analysis & visualization. Get a free account!
> http://www2.precog.com/precogplatform/slashdotnewsletter
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
|
|
From: John L. <joh...@sb...> - 2013-04-18 07:34:28
|
Hello everyone, After not using Matplotlib for over a year, I'm returning to it. Meanwhile, I have upgraded from Python 2.7 to Python 3.2, and I want to do all of my software development in Python 3 from now on. My OS is Ubuntu 12.04.1. Python 2.7 is still the default Python for Ubuntu, and many of the Python 3 packages are not offered as official repositories yet. I downloaded Matplotlib 1.2.1, then built it using Python 3. Eventually, I got no build error messages, and proceeded to install. (I always have to pick through dependency problems one error message at a time. I wish there was a better way. The Matplotlib docs could be a little better in this respect.) When I open a Python3 interpreter, I can import matplotlib. But I am not seeing ANYTHING with commands like plt.show(). It executes, and then returns. No output is generated. This very short and simple test program of mine used to produce output with Python 2.7 and Matplotlib 1.1.0. But with Python 3 and Matplolib 1.2.1, I am getting nothing... import numpy as np import matplotlib.pyplot as plt x = np.arange(0, 5, 0.1); y = np.sin(x) plt.plot(x, y) plt.show() It runs. No error messages are generated. But I don't get a graph. I don't even see a graph flicker on to the screen and disappear an instant later. Any advice will be appreciated! |
|
From: <car...@ya...> - 2013-04-17 19:19:01
|
Hi guys,
Im new in matplotlib and having some hard times. From the user point of view
everything works fine.
I have a window with a button. Pressing the button a new window pops showing
the plot. After play
with it i click at X to close this window. And click at X again to close the
window with the button.
BUT im not dropped back to a free prompt. The main window is locked and
still running in background.
Here goes the important parts of code:
import matplotlib
import matplotlib.pyplot as Plt
from matplotlib.figure import Figure
class MainPanel(wx.Panel):
def __init__(self, parent): #=None
wx.Panel.__init__(self, parent)
.... wxpython stuff goes here....
self.btn1.Bind(wx.EVT_BUTTON, self.cplot)
....
def cplot(self, event):
self.new = NewWindow(self)
self.new.cidplot(self)
self.new.Show()
return
class NewWindow(wx.Frame):
def __init__(self,event):
wx.Frame.__init__(self, None, -1, 'Plot', size=(556, 618))
wx.Frame.CenterOnScreen(self)
self.Bind(wx.EVT_CLOSE, self.OnClose)
def OnClose(self,event):
self.Destroy()
def cidplot(self,event):
self.fig = Figure()
self.axes = self.fig.add_subplot(111)
self.canvas = FigCanvas(self, -1, self.fig)
self.axes.set_ylabel("Parts")
self.axes.set_ylim(0,100)
self.axes.grid(True)
....more axes settings...
bars = self.axes.bar(left=self.ii, height=self.tt, width=0.2,
align='center', alpha=0.8)
....
self.canvas.draw()
Plt.savefig("Parts.pdf", dpi=300)
class MainFrame(wx.Frame):
def __init__(self):
wx.Frame.__init__(self, None, title = "System Test")
self.SetSize((556, 618))
panel = MainPanel(self)
self.Show()
if __name__ == "__main__":
app = wx.App(False)
frame = MainFrame()
app.MainLoop()
I think the problem is at self.fig = Figure() (Same happens if i use
Plt.figure())
Im doing something wrong when i create a new window or is at my matplotlib
part?
Some better way to do it?
Thanks in advance. Any ideia is welcome.
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/After-close-the-plot-window-the-process-keeps-running-tp40919.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
|
|
From: Alexa <ale...@gm...> - 2013-04-17 16:34:56
|
Hi Ben, Thank you for your quick reply. That did the trick! I will into ax.label_outer() , thanks for the suggestion. - Alexa -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Trouble-with-x-axis-labeling-tp40916p40918.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Benjamin R. <ben...@ou...> - 2013-04-17 16:04:23
|
On Wed, Apr 17, 2013 at 11:54 AM, Alexa <ale...@gm...> wrote:
> Hello All!
>
> I searched for my problem and while I found similar questions this seemed
> to
> be a unique problem.
>
> I am creating an image that is six vertically stacked subplots and I want
> only the axis of the bottom subplot to be labelled. However, as you can see
> from the image I attached it's picking the wrong subplot to label. It's as
> if the program is not understanding that there is one more plot. If I just
> plot five plots than everything works. I'm not sure what is going wrong
> with
> me code. It would be extremely helpful if someone could take a look.
>
> xlabel = ["",5000,5500,6000,6500,7000,""]
> plt.figure()
>
> night = (glob.glob('*_sci.txt'))
> for i in range(0,len(night)):
> # Read in data for each night
> wave = np.loadtxt(night[i], usecols=[0])
> flux = np.loadtxt(night[i], usecols=[1])
> # Create subplots
> temp = 610 +i
> spect = plt.subplot(temp,sharex=True)
> # Draw plot
> plt.plot(wave, flux, color="green")
> plt.subplots_adjust(hspace = 0.001)
> spect.set_autoscaley_on(False)
> pylab.ylim([0,0.5e-13])
> # Make y tick makers
> temp = tic.MaxNLocator(3)
> plt.gca().yaxis.set_major_locator(tic.MaxNLocator(prune='lower'))
> plt.gca().yaxis.set_major_locator(tic.MaxNLocator(prune='upper'))
> spect.yaxis.set_major_locator(temp)
> # Get rid of redundant x tick labels
> if i < len(night)-1:
> plt.setp(spect.get_xticklabels(), visible=False)
>
>
> spect.set_xticklabels(xlabel, minor=False)
> plt.xlabel("Observed Wavelength $(\AA)$",fontsize=16)
>
>
> <http://matplotlib.1069221.n5.nabble.com/file/n40916/Example.png>
>
>
>
plt.subplot() uses 1-based indexing. So, the first plot you make is "610"
because i == 0 in the first iteration. This corresponds to the *last"
subplot you actually want (i.e., the bottom one). If you just have a 611 +
i, the problem would be fixed. Btw, there is an ax.label_outer() function
that would make the code easier to read.
Ben Root
|
|
From: Alexa <ale...@gm...> - 2013-04-17 15:54:50
|
Hello All!
I searched for my problem and while I found similar questions this seemed to
be a unique problem.
I am creating an image that is six vertically stacked subplots and I want
only the axis of the bottom subplot to be labelled. However, as you can see
from the image I attached it's picking the wrong subplot to label. It's as
if the program is not understanding that there is one more plot. If I just
plot five plots than everything works. I'm not sure what is going wrong with
me code. It would be extremely helpful if someone could take a look.
xlabel = ["",5000,5500,6000,6500,7000,""]
plt.figure()
night = (glob.glob('*_sci.txt'))
for i in range(0,len(night)):
# Read in data for each night
wave = np.loadtxt(night[i], usecols=[0])
flux = np.loadtxt(night[i], usecols=[1])
# Create subplots
temp = 610 +i
spect = plt.subplot(temp,sharex=True)
# Draw plot
plt.plot(wave, flux, color="green")
plt.subplots_adjust(hspace = 0.001)
spect.set_autoscaley_on(False)
pylab.ylim([0,0.5e-13])
# Make y tick makers
temp = tic.MaxNLocator(3)
plt.gca().yaxis.set_major_locator(tic.MaxNLocator(prune='lower'))
plt.gca().yaxis.set_major_locator(tic.MaxNLocator(prune='upper'))
spect.yaxis.set_major_locator(temp)
# Get rid of redundant x tick labels
if i < len(night)-1:
plt.setp(spect.get_xticklabels(), visible=False)
spect.set_xticklabels(xlabel, minor=False)
plt.xlabel("Observed Wavelength $(\AA)$",fontsize=16)
<http://matplotlib.1069221.n5.nabble.com/file/n40916/Example.png>
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Trouble-with-x-axis-labeling-tp40916.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
|
|
From: Jae-Joon L. <lee...@gm...> - 2013-04-17 01:11:28
|
The anchored_artists needs improvements and things are still opaque.
For now you can do something like below,
```
a = AnchoredSizeBar(ax.transData, 0.1, "test",
loc=8, pad=0.1, borderpad=0.1, sep=2, prop=None,
frameon=False)
rect = a.size_bar._children[0]
rect.set_ec("g")
```
`rect` is a patch instance responsible for the bar. By default its height
is 0 and facecolor="none".
Similarly, the text label can be accessed via `a.txt_label._text`.
Regards,
-JJ
On Wed, Apr 17, 2013 at 1:47 AM, Mathew Topper <mat...@ed...>wrote:
> Hi,
>
> Is there anyway to set the color of an AnchoredSizeBar artist from the
> mpl_toolkits.axes_grid.anchored_artists toolkit?
>
> Thanks,
>
> Mat
> --
> Dr. Mathew Topper
> Institute for Energy Systems
> School of Engineering
> The University of Edinburgh
> Faraday Building
> The King’s Buildings
> Edinburgh EH9 3JL
> Tel: +44 (0)131 650 5570
> School fax: +44 (0)131 650 6554
> mat...@ed... <mailto:mat...@ed...>
> http://www.see.ed.ac.uk <http://www.see.ed.ac.uk/>
>
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>
>
>
> ------------------------------------------------------------------------------
> Precog is a next-generation analytics platform capable of advanced
> analytics on semi-structured data. The platform includes APIs for building
> apps and a phenomenal toolset for data science. Developers can use
> our toolset for easy data analysis & visualization. Get a free account!
> http://www2.precog.com/precogplatform/slashdotnewsletter
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
|
|
From: Christophe P. <xo...@th...> - 2013-04-16 23:26:40
|
After upgrading to 1.2.1 from 1.1, I'm getting an exception on the below-noted line; any thoughts what might have changed?
File "/Users/xof/Documents/Dev/tuneup/reports/tables.py", line 60, in table_sizes
dbar = ax.barh(ind, data_size, width, linewidth=0, color='blue', label='Main Data')
File "/Users/xof/Documents/Dev/environments/tuneup/lib/python2.6/site-packages/matplotlib/axes.py", line 5021, in barh
orientation='horizontal', **kwargs)
File "/Users/xof/Documents/Dev/environments/tuneup/lib/python2.6/site-packages/matplotlib/axes.py", line 4901, in bar
self.add_patch(r)
File "/Users/xof/Documents/Dev/environments/tuneup/lib/python2.6/site-packages/matplotlib/axes.py", line 1570, in add_patch
self._update_patch_limits(p)
File "/Users/xof/Documents/Dev/environments/tuneup/lib/python2.6/site-packages/matplotlib/axes.py", line 1588, in _update_patch_limits
xys = patch.get_patch_transform().transform(vertices)
File "/Users/xof/Documents/Dev/environments/tuneup/lib/python2.6/site-packages/matplotlib/patches.py", line 581, in get_patch_transform
self._update_patch_transform()
File "/Users/xof/Documents/Dev/environments/tuneup/lib/python2.6/site-packages/matplotlib/patches.py", line 577, in _update_patch_transform
bbox = transforms.Bbox.from_bounds(x, y, width, height)
File "/Users/xof/Documents/Dev/environments/tuneup/lib/python2.6/site-packages/matplotlib/transforms.py", line 786, in from_bounds
return Bbox.from_extents(x0, y0, x0 + width, y0 + height)
TypeError: unsupported operand type(s) for +: 'NoneType' and 'float'
The code is:
# preamble code collecting data
ind = np.arange(len(table_name))
width = 0.35
fig = plot.figure(figsize=DEFAULT_FIGURE_SIZE)
ax = fig.add_subplot(111, axisbg='#fafafa', alpha=0.9)
ax.set_title('Largest Tables')
ax.set_xlabel('Size (log scale)')
ax.set_xscale('log')
ax.grid(True)
ax.xaxis.set_major_formatter(FuncFormatter(magnitude_ticks))
dbar = ax.barh(ind, data_size, width, linewidth=0, color='blue', label='Main Data') # exception here
ibar = ax.barh(ind, index_toast_size, width, left=data_size, linewidth=0, color='red', label='Toast/Indexes')
ax.set_yticks(ind + width/2)
ax.set_yticklabels(table_name, fontproperties=xx_small_font)
ax.legend(loc='lower right', prop=x_small_font)
plot.tight_layout()
plot.savefig(REPORT_DIR_PATH + '/table_sizes.pdf')
plot.close()
--
-- Christophe Pettus
xo...@th...
|
|
From: Mathew T. <mat...@ed...> - 2013-04-16 16:48:05
|
Hi, Is there anyway to set the color of an AnchoredSizeBar artist from the mpl_toolkits.axes_grid.anchored_artists toolkit? Thanks, Mat -- Dr. Mathew Topper Institute for Energy Systems School of Engineering The University of Edinburgh Faraday Building The King’s Buildings Edinburgh EH9 3JL Tel: +44 (0)131 650 5570 School fax: +44 (0)131 650 6554 mat...@ed... <mailto:mat...@ed...> http://www.see.ed.ac.uk <http://www.see.ed.ac.uk/> The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. |
|
From: Joe K. <jof...@gm...> - 2013-04-15 11:57:54
|
> Apart from implementing this natively in matplotlib, I was thinking if > I could work around this limitation for our purposes in the following > way: My objects to draw will always sit in a Collection. I could derive > my own Collection class with a draw() method that changes the > linewidth of the collections, taking into account the current > axes.transData and figure.dpi. Using that I should be able to > achieve my goal, right? (given that I restrict myself to plots with > the same scaling in all directions) > > Not to plug one of my own answers, but there's an example of using a callback to keep linewidths in data coordinates here: http://stackoverflow.com/a/15673254/325565 Have a look at the second example in the answer for the callback approach. Using something like ``shapely`` to buffer your lines as the first example does is also an option. Hope that helps a bit anyway, -Joe |
|
From: Michael W. <wim...@gm...> - 2013-04-15 10:04:54
|
Dear Mike, thanks for your quick answer! Sorry for the late reply, I was away over the weekend. We are using matplotlib to plot two-dimensional and three-dimensional (mostly regular) lattices (it's a physics application), with grid sites being represented by a symbol and links representes by lines. The size of these grids varies strongly (i.e. how many symbols and lines are plotted), and it would be easiest if I could specify linewidths relative to some data coordinate system (e.g. the line width being 5% of the grid spacing). Arguably, this is not what matplotlib is intended for, but sometimes we also want to plot data information on top of that lattice, and then the tools of matplotlib are extremely handy. Also, what I have in mind will always be for a linear-scale, unit aspect-ratio plot, so that the problems you mentioned (log-scale, different scaling in different directions) would not be applicable. In the general case I agree one would need to make the lines actually a filled stroke. I'll nevertheless file a ticket. On github? Apart from implementing this natively in matplotlib, I was thinking if I could work around this limitation for our purposes in the following way: My objects to draw will always sit in a Collection. I could derive my own Collection class with a draw() method that changes the linewidth of the collections, taking into account the current axes.transData and figure.dpi. Using that I should be able to achieve my goal, right? (given that I restrict myself to plots with the same scaling in all directions) Michael 2013/4/12 Michael Droettboom <md...@st...>: > Unfortunately, I don't think there is a way to do this at present. Out > of curiosity, what is the use case? > > I wonder if the best way to do this would be to expose the stroking to > the Python level, so given a line one could get a filled path that is > the stroked line. I'm not sure how else this could work, since the > zooming could be different in each direction, etc., or could even by > log-scaled etc. > > Would you mind creating an issue ticket for this? (Patches welcome, > too, of course, and I can provide pointers if you want to take this on > yourself...) > > Mike > > On 04/12/2013 05:34 AM, Michael Wimmer wrote: >> I have a collection of Patches and Lines that have their coordinates in >> data space, i.e. like in the following example: >> >> >> import matplotlib.pyplot as plt >> import matplotlib.patches as mpatches >> import matplotlib.collections as mcollections >> import matplotlib.lines as mlines >> >> fig = plt.figure() >> ax = fig.add_subplot(111) >> >> patches = [] >> patches.append(mlines.Line2D((0,1),(0,1), linewidth=1)) >> patches.append(mpatches.Circle((0,0), 0.25, linewidth=1)) >> patches.append(mpatches.Circle((1,1), 0.25, linewidth=1)) >> >> coll = mcollections.PatchCollection(patches) >> ax.add_collection(coll) >> ax.autoscale_view() >> >> plt.show() >> >> >> Now, in this example the line width is always given with respect to the >> screen space, i.e. does not change when I zoom into the plot. Is it >> possible to specify a linewidth with respect to data space? I.e. to say >> that a line (in both the Line2D and the Circle) should be let's say 0.1 >> in data space, and thus scale accordingly if I zoom in? >> >> -Michael >> >> ------------------------------------------------------------------------------ >> Precog is a next-generation analytics platform capable of advanced >> analytics on semi-structured data. The platform includes APIs for building >> apps and a phenomenal toolset for data science. Developers can use >> our toolset for easy data analysis & visualization. Get a free account! >> http://www2.precog.com/precogplatform/slashdotnewsletter >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |