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
(14) |
2
(11) |
3
(5) |
4
(17) |
5
(11) |
6
(37) |
7
(35) |
8
(9) |
9
(1) |
10
(9) |
11
(7) |
12
(22) |
13
(34) |
14
(24) |
15
(27) |
16
(13) |
17
(19) |
18
(43) |
19
(36) |
20
(12) |
21
(9) |
22
(21) |
23
(3) |
24
(5) |
25
(30) |
26
(14) |
27
(23) |
28
(19) |
29
(19) |
30
(10) |
31
(6) |
|
|
|
|
|
|
Well.. that worked. I didn't tried at first because the docs says it can't be filled... cheers 2009年5月18日 Roban Hultman Kramer <ro...@as...>: > Have you tried specifying a value for fill? > > 2009年5月18日 Carlos "Guâno" Grohmann <car...@gm...>: >> Hello all >> >> I'm having some troubles with Arcs in MPL. Using the following code: >> >> circ = Arc( (0,0), width=2, height=2, angle=0.0, >> theta1=0.0, theta2=360.0, ec=None, fc=None) >> axes.add_patch(circ) >> >> gives: >> >> Traceback (most recent call last): >> File "pystereo22.py", line 524, in onPlotRose >> circ = Arc( (0,0), width=2, height=2, angle=0.0, theta1=0.0, >> theta2=360.0, ec=None, fc='none') >> File "/usr/lib/python2.5/site-packages/matplotlib/patches.py", line >> 1043, in __init__ >> fill = kwargs.pop('fill') >> KeyError: 'fill' >> >> >> It's working fine with Circle or Ellipse. I'm trying to use Arc >> because I only want a half-circle. >> >> Thanks all >> >> -- >> Carlos Henrique Grohmann - Geologist D.Sc. >> a.k.a. Guano - Linux User #89721 >> ResearcherID: A-9030-2008 >> carlos dot grohmann at gmail dot com >> http://www.igc.usp.br/pessoais/guano/ >> _________________ >> "Good morning, doctors. I have taken the liberty of removing Windows >> 95 from my hard drive." >> --The winning entry in a "What were HAL's first words" contest judged >> by 2001: A SPACE ODYSSEY creator Arthur C. Clarke >> >> Can’t stop the signal. >> >> ------------------------------------------------------------------------------ >> Crystal Reports - New Free Runtime and 30 Day Trial >> Check out the new simplified licensing option that enables >> unlimited royalty-free distribution of the report engine >> for externally facing server and web deployment. >> http://p.sf.net/sfu/businessobjects >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > -- Carlos Henrique Grohmann - Geologist D.Sc. a.k.a. Guano - Linux User #89721 ResearcherID: A-9030-2008 carlos dot grohmann at gmail dot com http://www.igc.usp.br/pessoais/guano/ _________________ "Good morning, doctors. I have taken the liberty of removing Windows 95 from my hard drive." --The winning entry in a "What were HAL's first words" contest judged by 2001: A SPACE ODYSSEY creator Arthur C. Clarke Can’t stop the signal.
Thanks Mike, Actually, I don't want it to be filled, but the wedge did what I wanted, so I'm sticking with it. cheers 2009年5月18日 Michael Droettboom <md...@st...>: > Arcs exist as an optimization to render really large circles and ellipses > with high accuracy. > > An elliptical arc. Because it performs various optimizations, it > can not be filled. > > If you want to draw a filled, yet partial, circle, I believe you want to use > Wedge. > > Cheers, > Mike > > > Carlos Guâno Grohmann wrote: >> >> Hello all >> >> I'm having some troubles with Arcs in MPL. Using the following code: >> >> circ = Arc( (0,0), width=2, height=2, angle=0.0, >> theta1=0.0, theta2=360.0, ec=None, fc=None) >> axes.add_patch(circ) >> >> gives: >> >> Traceback (most recent call last): >> File "pystereo22.py", line 524, in onPlotRose >> circ = Arc( (0,0), width=2, height=2, angle=0.0, theta1=0.0, >> theta2=360.0, ec=None, fc='none') >> File "/usr/lib/python2.5/site-packages/matplotlib/patches.py", line >> 1043, in __init__ >> fill = kwargs.pop('fill') >> KeyError: 'fill' >> >> >> It's working fine with Circle or Ellipse. I'm trying to use Arc >> because I only want a half-circle. >> >> Thanks all >> >> > > -- > Michael Droettboom > Science Software Branch > Operations and Engineering Division > Space Telescope Science Institute > Operated by AURA for NASA > > -- Carlos Henrique Grohmann - Geologist D.Sc. a.k.a. Guano - Linux User #89721 ResearcherID: A-9030-2008 carlos dot grohmann at gmail dot com http://www.igc.usp.br/pessoais/guano/ _________________ "Good morning, doctors. I have taken the liberty of removing Windows 95 from my hard drive." --The winning entry in a "What were HAL's first words" contest judged by 2001: A SPACE ODYSSEY creator Arthur C. Clarke Can’t stop the signal.
Have you tried specifying a value for fill? 2009年5月18日 Carlos "Guâno" Grohmann <car...@gm...>: > Hello all > > I'm having some troubles with Arcs in MPL. Using the following code: > > circ = Arc( (0,0), width=2, height=2, angle=0.0, > theta1=0.0, theta2=360.0, ec=None, fc=None) > axes.add_patch(circ) > > gives: > > Traceback (most recent call last): > File "pystereo22.py", line 524, in onPlotRose > circ = Arc( (0,0), width=2, height=2, angle=0.0, theta1=0.0, > theta2=360.0, ec=None, fc='none') > File "/usr/lib/python2.5/site-packages/matplotlib/patches.py", line > 1043, in __init__ > fill = kwargs.pop('fill') > KeyError: 'fill' > > > It's working fine with Circle or Ellipse. I'm trying to use Arc > because I only want a half-circle. > > Thanks all > > -- > Carlos Henrique Grohmann - Geologist D.Sc. > a.k.a. Guano - Linux User #89721 > ResearcherID: A-9030-2008 > carlos dot grohmann at gmail dot com > http://www.igc.usp.br/pessoais/guano/ > _________________ > "Good morning, doctors. I have taken the liberty of removing Windows > 95 from my hard drive." > --The winning entry in a "What were HAL's first words" contest judged > by 2001: A SPACE ODYSSEY creator Arthur C. Clarke > > Can’t stop the signal. > > ------------------------------------------------------------------------------ > Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensing option that enables > unlimited royalty-free distribution of the report engine > for externally facing server and web deployment. > http://p.sf.net/sfu/businessobjects > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
Arcs exist as an optimization to render really large circles and ellipses with high accuracy. An elliptical arc. Because it performs various optimizations, it can not be filled. If you want to draw a filled, yet partial, circle, I believe you want to use Wedge. Cheers, Mike Carlos Guâno Grohmann wrote: > Hello all > > I'm having some troubles with Arcs in MPL. Using the following code: > > circ = Arc( (0,0), width=2, height=2, angle=0.0, > theta1=0.0, theta2=360.0, ec=None, fc=None) > axes.add_patch(circ) > > gives: > > Traceback (most recent call last): > File "pystereo22.py", line 524, in onPlotRose > circ = Arc( (0,0), width=2, height=2, angle=0.0, theta1=0.0, > theta2=360.0, ec=None, fc='none') > File "/usr/lib/python2.5/site-packages/matplotlib/patches.py", line > 1043, in __init__ > fill = kwargs.pop('fill') > KeyError: 'fill' > > > It's working fine with Circle or Ellipse. I'm trying to use Arc > because I only want a half-circle. > > Thanks all > > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA
> > Sure, I'll keep that in mind. > I'll revise the patch (I'll also think about the contains method) and > submit it soon. > Thanks, > > -JJ > The patch is now committed to svn with relevant changes (r7119). -JJ
On Mon, May 18, 2009 at 11:20 AM, guillaume ranquet <gra...@wy...> wrote: > I'm using the axvlines to mark some events that I need to know about in > order to have an explanation of the variations of the curves. > any advice on what to use to replace those? There is no function axvlines -- there is vlines and axvline. If you are making repeated calls to axvline you may be creating a whole bunch of individual line objects and that will kill your performance. A LineCollection will help here http://matplotlib.sourceforge.net/search.html?q=codex+LineCollection
Hello all I'm having some troubles with Arcs in MPL. Using the following code: circ = Arc( (0,0), width=2, height=2, angle=0.0, theta1=0.0, theta2=360.0, ec=None, fc=None) axes.add_patch(circ) gives: Traceback (most recent call last): File "pystereo22.py", line 524, in onPlotRose circ = Arc( (0,0), width=2, height=2, angle=0.0, theta1=0.0, theta2=360.0, ec=None, fc='none') File "/usr/lib/python2.5/site-packages/matplotlib/patches.py", line 1043, in __init__ fill = kwargs.pop('fill') KeyError: 'fill' It's working fine with Circle or Ellipse. I'm trying to use Arc because I only want a half-circle. Thanks all -- Carlos Henrique Grohmann - Geologist D.Sc. a.k.a. Guano - Linux User #89721 ResearcherID: A-9030-2008 carlos dot grohmann at gmail dot com http://www.igc.usp.br/pessoais/guano/ _________________ "Good morning, doctors. I have taken the liberty of removing Windows 95 from my hard drive." --The winning entry in a "What were HAL's first words" contest judged by 2001: A SPACE ODYSSEY creator Arthur C. Clarke Can’t stop the signal.
Do not reply to me only, but always leave the list in CC. On Mon, May 18, 2009 at 18:41, M Uhlenhuth <uhl...@ho...> wrote: > Thanks for your response! > > Yes, have installed: > python2.5: version 2.5.4-1ubuntu4 > python-dev: version 2.6.2-0ubuntu1 > python-numpy: version 1:1.2.1-1ubuntu1 > libpng12-0: version 1.2.27-2ubuntu2 > libfreetype6: version 2.3.9-4ubuntu-0.1 > libfreetype6-dev: version 2.3.9-4ubuntu-0.1 > > Is the issue that I'm using python-dev version 2.6 for python version 2.5? > If so... I can't figure out how to add python-dev version 2.5... in Synaptic > Package Manager the only available python-dev package is 2.6 - I can't > "Force Version" to get 2.5 and I'm not sure whether I would mess anything up > elsewhere on my system by substituting 2.5 for 2.6. Sorry, I'm not a ubuntu user, so I can't exactly tell how to do it. Of course the devel package version mismatch the interpreter one, and that's a problem for sure. if you don't have a python2.5-dev or a python-all-dev IO think you can't find an easy solution; since numpy does not yet support py2.6, building mpl with 2.6 is still not a solution. -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi
M Uhlenhuth <uhl...@ho...> writes: > I'm running into some problems building from source. I'm running > 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:57:59 UTC 2009 i686 > GNU/Linux. I just checked out revision 7118 from svn. When I run > 'python setup.py build', I get the error I've pasted below. First run "apt-get build-dep python-matplotlib" to install the packages that are needed to build matplotlib. Or, if you think you may want to uninstall them later, see http://www.enricozini.org/2008/tips/undoable-aptget-builddep.html -- Jouni K. Seppänen http://www.iki.fi/jks
> On Mon, May 18, 2009 at 10:23 AM, guillaume ranquet <gra...@wy...> wrote: >> > I'm trying to get approx 4k points plotted into 5 subplots which I would >> > like interactive (ie: ability to zoom/pan ...). >> > there's nothing special except that the subplots share axe x. >> > >> > >> > It gets some seconds (3 to 5) on a p4 dual core @ 3Ghz to pan/zoom. It >> > seems utterly slow to me: what do you think? normal "rate" or flawed code? >> > I tried using various backend, embedding it into qt4 ... nothing helped >> > much. >> > >> > the code is quite fat atm (500 lines or so). I'll try to cut through the >> > code to get an example in a few lines if it's said my code is flawed and >> > the plotting rate should be way faster! > > Instead of starting with your cod,e start from scratch and see if you > can reproduce the problem. If not, figure out what is different and > work your way up. Here is some test code -- note that Eric Firing > made a contribution on the svn trunk that significantly speeds up this > use case: > > import numpy as np > import matplotlib.pyplot as plt > fig = plt.figure() > Nplots = 5 > Npoints = 5000 > for i in range(Nplots): > if i==0: > ax = ax1 = fig.add_subplot(Nplots,1,i+1) > else: > ax = fig.add_subplot(Nplots,1,i+1, sharex=ax1) > > ax.plot(np.random.rand(Npoints)) > > ax.set_xlim(100, 200) > plt.show() I think I put a finger on what breaks the performance, thx to your snippet of code. I forgot to mention that I'm using some axvlines here and there (500 per subplot). it goes from slow to _unacceptably_ slow with the axvlines. I'm using the axvlines to mark some events that I need to know about in order to have an explanation of the variations of the curves. any advice on what to use to replace those? ---- This message contains confidential information and may contain information that is legally privileged. If you have received this message by mistake, please immediately notify us and delete the original message. Thank you. Ce message contient des informations confidentielles. S'il vous est parvenu par erreur, merci de bien vouloir nous en aviser par retour, de n'en faire aucun usage et de n'en garder aucune copie. ----
Try to replace '1.0' with 1.0 for mew. Regards, -JJ On Mon, May 18, 2009 at 11:47 AM, Chaitanya Krishna <ic...@gm...> wrote: > Hi all, > > I guess I am doing something silly, but it is not obvious. Guess one of you > can help!! > > I am using NumPy 1.3.0 and matplotlib 0.98.5.2 > > I am using the following to plot, > > ... > plt.rc('lines', linewidth=1.5) > ... > sym = cycle([{'c':'b', 'ls':'-', 'marker':'o', 'mfc':'b', 'mec':'b', > 'mew':'1.0'}, > {'c':'b', 'ls':'-', 'marker':'o', 'mfc':'w', 'mec':'b', > 'mew':'1.0'}, > {'c':'g', 'ls':'-', 'marker':'s', 'mfc':'g', 'mec':'g', > 'mew':'1.0'}, > {'c':'g', 'ls':'-', 'marker':'s', 'mfc':'w', 'mec':'g', > 'mew':'1.0'}]) > ... > ax.plot(range(len(eles)), y, **sym.next()) > plt.savefig('fig.eps') > plt.show() > > The above fails even when I explicitly set lw in sym with the following, > > Traceback (most recent call last): > File "plot.py", line 67, in <module> > plt.savefig('dM_single.eps') > File "/usr/lib/python2.5/site-packages/matplotlib/pyplot.py", line 345, in > savefig > return fig.savefig(*args, **kwargs) > File "/usr/lib/python2.5/site-packages/matplotlib/figure.py", line 990, in > savefig > self.canvas.print_figure(*args, **kwargs) > File "/usr/lib/python2.5/site-packages/matplotlib/backend_bases.py", line > 1419, in print_figure > **kwargs) > File "/usr/lib/python2.5/site-packages/matplotlib/backend_bases.py", line > 1308, in print_eps > return ps.print_eps(*args, **kwargs) > File "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_ps.py", > line 869, in print_eps > return self._print_ps(outfile, 'eps', *args, **kwargs) > File "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_ps.py", > line 895, in _print_ps > orientation, isLandscape, papertype) > File "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_ps.py", > line 969, in _print_figure > self.figure.draw(renderer) > File "/usr/lib/python2.5/site-packages/matplotlib/figure.py", line 772, in > draw > for a in self.axes: a.draw(renderer) > File "/usr/lib/python2.5/site-packages/matplotlib/axes.py", line 1601, in > draw > a.draw(renderer) > File "/usr/lib/python2.5/site-packages/matplotlib/lines.py", line 476, in > draw > markerFunc(renderer, gc, tpath, affine.frozen()) > File "/usr/lib/python2.5/site-packages/matplotlib/lines.py", line 872, in > _draw_circle > rgbFace) > File "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_ps.py", > line 529, in draw_markers > self._draw_ps(ps, gc, rgbFace, fill=False, stroke=False) > File "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_ps.py", > line 794, in _draw_ps > self.set_linewidth(gc.get_linewidth()) > File "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_ps.py", > line 198, in set_linewidth > self._pswriter.write("%1.3f setlinewidth\n"%linewidth) > TypeError: float argument required > > Can someone tell me what I am doing wrong? > > Regards, > Chaitanya > > ------------------------------------------------------------------------------ > Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensing option that enables > unlimited royalty-free distribution of the report engine > for externally facing server and web deployment. > http://p.sf.net/sfu/businessobjects > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >
Hi all, I guess I am doing something silly, but it is not obvious. Guess one of you can help!! I am using NumPy 1.3.0 and matplotlib 0.98.5.2 I am using the following to plot, ... plt.rc('lines', linewidth=1.5) ... sym = cycle([{'c':'b', 'ls':'-', 'marker':'o', 'mfc':'b', 'mec':'b', 'mew':'1.0'}, {'c':'b', 'ls':'-', 'marker':'o', 'mfc':'w', 'mec':'b', 'mew':'1.0'}, {'c':'g', 'ls':'-', 'marker':'s', 'mfc':'g', 'mec':'g', 'mew':'1.0'}, {'c':'g', 'ls':'-', 'marker':'s', 'mfc':'w', 'mec':'g', 'mew':'1.0'}]) ... ax.plot(range(len(eles)), y, **sym.next()) plt.savefig('fig.eps') plt.show() The above fails even when I explicitly set lw in sym with the following, Traceback (most recent call last): File "plot.py", line 67, in <module> plt.savefig('dM_single.eps') File "/usr/lib/python2.5/site-packages/matplotlib/pyplot.py", line 345, in savefig return fig.savefig(*args, **kwargs) File "/usr/lib/python2.5/site-packages/matplotlib/figure.py", line 990, in savefig self.canvas.print_figure(*args, **kwargs) File "/usr/lib/python2.5/site-packages/matplotlib/backend_bases.py", line 1419, in print_figure **kwargs) File "/usr/lib/python2.5/site-packages/matplotlib/backend_bases.py", line 1308, in print_eps return ps.print_eps(*args, **kwargs) File "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_ps.py", line 869, in print_eps return self._print_ps(outfile, 'eps', *args, **kwargs) File "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_ps.py", line 895, in _print_ps orientation, isLandscape, papertype) File "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_ps.py", line 969, in _print_figure self.figure.draw(renderer) File "/usr/lib/python2.5/site-packages/matplotlib/figure.py", line 772, in draw for a in self.axes: a.draw(renderer) File "/usr/lib/python2.5/site-packages/matplotlib/axes.py", line 1601, in draw a.draw(renderer) File "/usr/lib/python2.5/site-packages/matplotlib/lines.py", line 476, in draw markerFunc(renderer, gc, tpath, affine.frozen()) File "/usr/lib/python2.5/site-packages/matplotlib/lines.py", line 872, in _draw_circle rgbFace) File "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_ps.py", line 529, in draw_markers self._draw_ps(ps, gc, rgbFace, fill=False, stroke=False) File "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_ps.py", line 794, in _draw_ps self.set_linewidth(gc.get_linewidth()) File "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_ps.py", line 198, in set_linewidth self._pswriter.write("%1.3f setlinewidth\n"%linewidth) TypeError: float argument required Can someone tell me what I am doing wrong? Regards, Chaitanya
On Mon, May 18, 2009 at 10:23 AM, guillaume ranquet <gra...@wy...> wrote: > I'm trying to get approx 4k points plotted into 5 subplots which I would > like interactive (ie: ability to zoom/pan ...). > there's nothing special except that the subplots share axe x. > > > It gets some seconds (3 to 5) on a p4 dual core @ 3Ghz to pan/zoom. It > seems utterly slow to me: what do you think? normal "rate" or flawed code? > I tried using various backend, embedding it into qt4 ... nothing helped > much. > > the code is quite fat atm (500 lines or so). I'll try to cut through the > code to get an example in a few lines if it's said my code is flawed and > the plotting rate should be way faster! Instead of starting with your cod,e start from scratch and see if you can reproduce the problem. If not, figure out what is different and work your way up. Here is some test code -- note that Eric Firing made a contribution on the svn trunk that significantly speeds up this use case: import numpy as np import matplotlib.pyplot as plt fig = plt.figure() Nplots = 5 Npoints = 5000 for i in range(Nplots): if i==0: ax = ax1 = fig.add_subplot(Nplots,1,i+1) else: ax = fig.add_subplot(Nplots,1,i+1, sharex=ax1) ax.plot(np.random.rand(Npoints)) ax.set_xlim(100, 200) plt.show()
I'm trying to get approx 4k points plotted into 5 subplots which I would like interactive (ie: ability to zoom/pan ...). there's nothing special except that the subplots share axe x. It gets some seconds (3 to 5) on a p4 dual core @ 3Ghz to pan/zoom. It seems utterly slow to me: what do you think? normal "rate" or flawed code? I tried using various backend, embedding it into qt4 ... nothing helped much. the code is quite fat atm (500 lines or so). I'll try to cut through the code to get an example in a few lines if it's said my code is flawed and the plotting rate should be way faster! ---- This message contains confidential information and may contain information that is legally privileged. If you have received this message by mistake, please immediately notify us and delete the original message. Thank you. Ce message contient des informations confidentielles. S'il vous est parvenu par erreur, merci de bien vouloir nous en aviser par retour, de n'en faire aucun usage et de n'en garder aucune copie. ----
Hello all, I'm running into some problems building from source. I'm running 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:57:59 UTC 2009 i686 GNU/Linux. I just checked out revision 7118 from svn. When I run 'python setup.py build', I get the error I've pasted below. When I do: maximus@maximus-laptop:/usr/lib/python2.5/site-packages/matplotlib$ sudo python setup.py build > ~/matploterr.txt This gets sent to the matploterr.txt file: ============================================================================ BUILDING MATPLOTLIB matplotlib: 0.98.6svn python: 2.5.4 (r254:67916, Apr 4 2009, 17:55:16) [GCC 4.3.3] platform: linux2 REQUIRED DEPENDENCIES numpy: 1.2.1 freetype2: found, but unknown version (no pkg-config) * WARNING: Could not find 'freetype2' headers in any * of '/usr/local/include', '/usr/include', '.', * '/usr/local/include/freetype2', * '/usr/include/freetype2', './freetype2'. OPTIONAL BACKEND DEPENDENCIES libpng: found, but unknown version (no pkg-config) * Could not find 'libpng' headers in any of * '/usr/local/include', '/usr/include', '.' 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. wxPython: 2.8.9.1 * WxAgg extension not required for wxPython >= 2.8 pkg-config: looking for pygtk-2.0 gtk+-2.0 * Package pygtk-2.0 was not found in the pkg-config * search path. Perhaps you should add the directory * containing `pygtk-2.0.pc' to the PKG_CONFIG_PATH * environment variable No package 'pygtk-2.0' found * Package gtk+-2.0 was not found in the pkg-config * search path. Perhaps you should add the directory * containing `gtk+-2.0.pc' to the PKG_CONFIG_PATH * environment variable No package 'gtk+-2.0' found * 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', '.' Mac OS X native: no Qt: no Qt4: no Cairo: 1.4.12 OPTIONAL DATE/TIMEZONE DEPENDENCIES datetime: present, version unknown dateutil: 1.4.1 pytz: matplotlib will provide adding pytz OPTIONAL USETEX DEPENDENCIES dvipng: no ghostscript: 8.64 latex: 3.141592 pdftops: 0.10.5 [Edit setup.cfg to suppress the above messages] ============================================================================ pymods ['pylab'] packages ['matplotlib', 'matplotlib.backends', 'matplotlib.projections', 'mpl_toolkits', 'mpl_toolkits.mplot3d', 'mpl_toolkits.axes_grid', 'matplotlib.sphinxext', 'matplotlib.numerix', 'matplotlib.numerix.mlab', 'matplotlib.numerix.ma', 'matplotlib.numerix.linear_algebra', 'matplotlib.numerix.random_array', 'matplotlib.numerix.fft', 'matplotlib.delaunay', 'pytz'] running build running build_py creating build creating build/lib.linux-i686-2.5 copying lib/pylab.py -> build/lib.linux-i686-2.5 creating build/lib.linux-i686-2.5/matplotlib copying lib/matplotlib/type1font.py -> build/lib.linux-i686-2.5/matplotlib copying lib/matplotlib/mpl.py -> build/lib.linux-i686-2.5/matplotlib copying lib/matplotlib/_mathtext_data.py -> build/lib.linux-i686-2.5/matplotlib . . . . . copying lib/pytz/zoneinfo/America/Indiana/Vevay -> build/lib.linux-i686-2.5/pytz/zoneinfo/America/Indiana creating build/lib.linux-i686-2.5/pytz/zoneinfo/America/North_Dakota copying lib/pytz/zoneinfo/America/North_Dakota/New_Salem -> build/lib.linux-i686-2.5/pytz/zoneinfo/America/North_Dakota copying lib/pytz/zoneinfo/America/North_Dakota/Center -> build/lib.linux-i686-2.5/pytz/zoneinfo/America/North_Dakota running build_ext building 'matplotlib.ft2font' extension creating build/temp.linux-i686-2.5 creating build/temp.linux-i686-2.5/src creating build/temp.linux-i686-2.5/CXX gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPY_ARRAYAUNIQUE_SYMBOL=MPL_ARRAY_API -I/usr/lib/python2.5/site-packages/numpy/core/include -I/usr/local/include -I/usr/include -I. -I/usr/lib/python2.5/site-packages/numpy/core/include/freetype2 -I/usr/local/include/freetype2 -I/usr/include/freetype2 -I./freetype2 -I/usr/include/python2.5 -c src/ft2font.cpp -o build/temp.linux-i686-2.5/src/ft2font.o And this gets output in th terminal: cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ In file included from ./CXX/Extensions.hxx:48, from src/ft2font.h:4, from src/ft2font.cpp:1: ./CXX/WrapPython.h:42:20: error: Python.h: No such file or directory In file included from ./CXX/Extensions.hxx:50, from src/ft2font.h:4, from src/ft2font.cpp:1: ./CXX/Config.hxx:112:2: error: #error not defined PY_MAJOR_VERSION In file included from /usr/include/c++/4.3/ext/hash_map:64, from ./CXX/Extensions.hxx:68, from src/ft2font.h:4, from src/ft2font.cpp:1: /usr/include/c++/4.3/backward/backward_warning.h:33:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated. In file included from src/ft2font.cpp:1: src/ft2font.h:13:22: error: ft2build.h: No such file or directory src/ft2font.h:14:10: error: #include expects "FILENAME" or <FILENAME> src/ft2font.h:15:10: error: #include expects "FILENAME" or <FILENAME> src/ft2font.h:16:10: error: #include expects "FILENAME" or <FILENAME> src/ft2font.h:17:10: error: #include expects "FILENAME" or <FILENAME> src/ft2font.h:18:10: error: #include expects "FILENAME" or <FILENAME> In file included from /usr/lib/python2.5/site-packages/numpy/core/include/numpy/arrayobject.h:14, from src/ft2font.cpp:5: /usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:114:2: error: #error Must use Python with unicode enabled. In file included from ./CXX/Exception.hxx:44, from ./CXX/Objects.hxx:44, from ./CXX/Extensions.hxx:51, from src/ft2font.h:4, from src/ft2font.cpp:1: ./CXX/IndirectPythonInterface.hxx:50: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:51: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:52: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:53: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:55: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:56: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:57: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:58: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:59: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:60: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:61: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:62: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:63: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:64: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:65: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:66: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:67: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:68: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:69: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:70: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:71: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:72: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:73: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:74: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:75: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:76: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:81: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:93: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:95: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:96: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:101: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:102: error: ‘PyObject’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:102: error: ‘o’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:104: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:105: error: ‘PyObject’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:105: error: ‘op’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:107: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:108: error: ‘PyObject’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:108: error: ‘op’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:110: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:111: error: ‘PyObject’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:111: error: ‘op’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:113: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:114: error: ‘PyObject’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:114: error: ‘op’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:116: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:117: error: ‘PyObject’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:117: error: ‘op’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:119: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:120: error: ‘PyObject’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:120: error: ‘op’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:122: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:123: error: ‘PyObject’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:123: error: ‘op’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:125: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:126: error: ‘PyObject’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:126: error: ‘op’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:128: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:129: error: ‘PyObject’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:129: error: ‘op’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:131: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:132: error: ‘PyObject’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:132: error: ‘op’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:134: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:135: error: ‘PyObject’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:135: error: ‘op’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:137: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:138: error: ‘PyObject’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:138: error: ‘op’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:140: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:141: error: ‘PyObject’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:141: error: ‘op’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:143: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:144: error: redefinition of ‘bool Py::_List_Check’ ./CXX/IndirectPythonInterface.hxx:102: error: ‘bool Py::_List_Check’ previously defined here ./CXX/IndirectPythonInterface.hxx:144: error: ‘PyObject’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:144: error: ‘op’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:146: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:147: error: ‘PyObject’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:147: error: ‘op’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:149: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:150: error: ‘PyObject’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:150: error: ‘op’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:152: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:153: error: ‘PyObject’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:153: error: ‘op’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:155: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:156: error: ‘PyObject’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:156: error: ‘op’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:158: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:159: error: ‘PyObject’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:159: error: ‘op’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:161: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:162: error: ‘PyObject’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:162: error: ‘op’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:164: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:165: error: ‘PyObject’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:165: error: ‘op’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:167: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:168: error: ‘PyObject’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:168: error: ‘op’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:170: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:171: error: ‘PyObject’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:171: error: ‘v’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:173: error: expected constructor, destructor, or type conversion before ‘*’ token ./CXX/IndirectPythonInterface.hxx:174: error: ‘PyObject’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:174: error: ‘op’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:192: error: variable or field ‘_XINCREF’ declared void ./CXX/IndirectPythonInterface.hxx:192: error: ‘PyObject’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:192: error: ‘op’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:193: error: variable or field ‘_XDECREF’ declared void ./CXX/IndirectPythonInterface.hxx:193: error: ‘PyObject’ was not declared in this scope ./CXX/IndirectPythonInterface.hxx:193: error: ‘op’ was not declared in this scope In file included from ./CXX/Objects.hxx:44, from ./CXX/Extensions.hxx:51, from src/ft2font.h:4, from src/ft2font.cpp:1: ./CXX/Exception.hxx:70: error: expected `)' before ‘*’ token ./CXX/Exception.hxx:75: error: expected `)' before ‘*’ token ./CXX/Exception.hxx: In constructor ‘Py::Exception::Exception(const std::string&)’: ./CXX/Exception.hxx:67: error: ‘_Exc_RuntimeError’ is not a member of ‘Py’ ./CXX/Exception.hxx:67: error: ‘PyErr_SetString’ was not declared in this scope ./CXX/Exception.hxx: In member function ‘void Py::Exception::clear()’: ./CXX/Exception.hxx:80: error: ‘PyErr_Clear’ was not declared in this scope ./CXX/Exception.hxx: In constructor ‘Py::TypeError::TypeError(const std::string&)’: ./CXX/Exception.hxx:122: error: ‘_Exc_TypeError’ is not a member of ‘Py’ ./CXX/Exception.hxx:122: error: ‘PyErr_SetString’ was not declared in this scope ./CXX/Exception.hxx: In constructor ‘Py::IndexError::IndexError(const std::string&)’: ./CXX/Exception.hxx:132: error: ‘_Exc_IndexError’ is not a member of ‘Py’ ./CXX/Exception.hxx:132: error: ‘PyErr_SetString’ was not declared in this scope ./CXX/Exception.hxx: In constructor ‘Py::AttributeError::AttributeError(const std::string&)’: ./CXX/Exception.hxx:142: error: ‘_Exc_AttributeError’ is not a member of ‘Py’ ./CXX/Exception.hxx:142: error: ‘PyErr_SetString’ was not declared in this scope ./CXX/Exception.hxx: In constructor ‘Py::NameError::NameError(const std::string&)’: ./CXX/Exception.hxx:152: error: ‘_Exc_NameError’ is not a member of ‘Py’ ./CXX/Exception.hxx:152: error: ‘PyErr_SetString’ was not declared in this scope ./CXX/Exception.hxx: In constructor ‘Py::RuntimeError::RuntimeError(const std::string&)’: ./CXX/Exception.hxx:162: error: ‘_Exc_RuntimeError’ is not a member of ‘Py’ ./CXX/Exception.hxx:162: error: ‘PyErr_SetString’ was not declared in this scope ./CXX/Exception.hxx: In constructor ‘Py::SystemError::SystemError(const std::string&)’: ./CXX/Exception.hxx:172: error: ‘_Exc_SystemError’ is not a member of ‘Py’ ./CXX/Exception.hxx:172: error: ‘PyErr_SetString’ was not declared in this scope ./CXX/Exception.hxx: In constructor ‘Py::KeyError::KeyError(const std::string&)’: ./CXX/Exception.hxx:182: error: ‘_Exc_KeyError’ is not a member of ‘Py’ ./CXX/Exception.hxx:182: error: ‘PyErr_SetString’ was not declared in this scope ./CXX/Exception.hxx: In constructor ‘Py::ValueError::ValueError(const std::string&)’: ./CXX/Exception.hxx:193: error: ‘_Exc_ValueError’ is not a member of ‘Py’ ./CXX/Exception.hxx:193: error: ‘PyErr_SetString’ was not declared in this scope ./CXX/Exception.hxx: In constructor ‘Py::OverflowError::OverflowError(const std::string&)’: ./CXX/Exception.hxx:203: error: ‘_Exc_OverflowError’ is not a member of ‘Py’ ./CXX/Exception.hxx:203: error: ‘PyErr_SetString’ was not declared in this scope ./CXX/Exception.hxx: In constructor ‘Py::ZeroDivisionError::ZeroDivisionError(const std::string&)’: ./CXX/Exception.hxx:213: error: ‘_Exc_ZeroDivisionError’ is not a member of ‘Py’ ./CXX/Exception.hxx:213: error: ‘PyErr_SetString’ was not declared in this scope ./CXX/Exception.hxx: In constructor ‘Py::FloatingPointError::FloatingPointError(const std::string&)’: ./CXX/Exception.hxx:223: error: ‘_Exc_FloatingPointError’ is not a member of ‘Py’ ./CXX/Exception.hxx:223: error: ‘PyErr_SetString’ was not declared in this scope ./CXX/Exception.hxx: In constructor ‘Py::MemoryError::MemoryError(const std::string&)’: ./CXX/Exception.hxx:233: error: ‘_Exc_MemoryError’ is not a member of ‘Py’ ./CXX/Exception.hxx:233: error: ‘PyErr_SetString’ was not declared in this scope ./CXX/Exception.hxx: In constructor ‘Py::SystemExit::SystemExit(const std::string&)’: ./CXX/Exception.hxx:243: error: ‘_Exc_SystemExit’ is not a member of ‘Py’ ./CXX/Exception.hxx:243: error: ‘PyErr_SetString’ was not declared in this scope In file included from ./CXX/Extensions.hxx:51, from src/ft2font.h:4, from src/ft2font.cpp:1: ./CXX/Objects.hxx: At global scope: ./CXX/Objects.hxx:66: error: expected initializer before ‘*’ token ./CXX/Objects.hxx:74: error: expected initializer before ‘*’ token ./CXX/Objects.hxx:150: error: ISO C++ forbids declaration of ‘PyObject’ with no type ./CXX/Objects.hxx:150: error: expected ‘;’ before ‘*’ token ./CXX/Objects.hxx:154: error: ‘PyObject’ has not been declared ./CXX/Objects.hxx:175: error: expected `)' before ‘*’ token src/ft2font.cpp:1936: error: expected `}' at end of input ./CXX/Objects.hxx: In member function ‘void Py::Object::set(int*, bool)’: ./CXX/Objects.hxx:157: error: ‘p’ was not declared in this scope ./CXX/Objects.hxx:160: error: ‘_XINCREF’ is not a member of ‘Py’ ./CXX/Objects.hxx: In member function ‘void Py::Object::release()’: ./CXX/Objects.hxx:167: error: ‘_XDECREF’ is not a member of ‘Py’ ./CXX/Objects.hxx:167: error: ‘p’ was not declared in this scope ./CXX/Objects.hxx: At global scope: ./CXX/Objects.hxx:169: error: expected unqualified-id at end of input ./CXX/Objects.hxx:169: error: expected `}' at end of input error: command 'gcc' failed with exit status 1 Thanks! -Max
I have uploaded the source and OSX binaries for the bugfix release of matplotlib-0.98.5.3 to http://sourceforge.net/project/showfiles.php?group_id=80706&package_id=278194 The windows binaries are not yet ready, so I'll followup to this email when they are up. Below is a summary of the bugfixes in this release 2009年05月04日 Fix bug that Text.Annotation is still drawn while set to not visible.-JJL 2009年04月06日 The pdf backend now escapes newlines and linefeeds in strings. Fixes sf bug #2708559; thanks to Tiago Pereira for the report. 2009年04月06日 texmanager.make_dvi now raises an error if LaTeX failed to create an output file. Thanks to Joao Luis Silva for reporting this. - JKS 2009年04月05日 _png.read_png() reads 12 bit PNGs (patch from Tobias Wood) - ADS 2009年03月17日 Fix bugs in edge color handling by contourf, found by Jae-Joon Lee. - EF 2009年03月11日 Ensure wx version >= 2.8; thanks to Sandro Tosi and Chris Barker. - EF 2009年02月26日 Support image clipping in pdf backend. - JKS 2009年02月16日 Move plot_directive.py to the installed source tree. Add support for inline code content - MGD 2009年02月16日 Move mathmpl.py to the installed source tree so it is available to other projects. - MGD 2009年02月04日 Fix bug in mathtext related to \dots and \ldots - MGD 2009年01月29日 Document 'resolution' kwarg for polar plots. Support it when using pyplot.polar, not just Figure.add_axes. - MGD 2009年01月26日 Make curves and NaNs play nice together - MGD 2009年01月19日 Fix bug in quiver argument handling. - EF 2009年01月19日 Fix bug in backend_gtk: don't delete nonexistent toolbar. - EF 2009年01月16日 Fix bug in is_string_like so it doesn't raise an unnecessary exception. - EF 2009年01月16日 Bugfix of C typedef of MPL_Int64 that was failing on Windows XP 64 bit, as reported by George Goussard on numpy mailing list. - ADS 2009年01月10日 Fix bug in pan/zoom with log coordinates. - EF 2009年01月06日 Fix bug in setting of dashed negative contours. - EF 2009年01月06日 Be fault tolerant when len(linestyles)>NLev in contour. - MM 2008年12月20日 fix the dpi-dependent offset of Shadow. - JJL 2008年12月20日 fix the hatch bug in the pdf backend. minor update in docs and example - JJL 2008年12月19日 Update Axes.legend documnetation. /api/api_changes.rst is also updated to describe chages in keyword parameters. Issue a warning if old keyword parameters are used. - JJL
Jesper Larsen <jes...@gm...> writes: > Unfortunately the files are quite big (up to ~300 kb). I have however > tried using the Linux tool pngnq to reduce the file size with a factor > ~3-4 with almost no degradation of the result. > Pixel depth (Pixel Depth): 32 > Colour Type (Photometric Interpretation): RGB with alpha channel > Pixel depth (Pixel Depth): 8 > Colour Type (Photometric Interpretation): PALETTED COLOUR (256 > colours, 0 transparent) This means pngnq has quantized the original RGBA image with 8 bits per channel to an image with a 256-color palette. I don't think Agg has any support for rendering directly to a paletted image, so to achieve similar results, you would have to do the quantization in a separate pass anyway. > I am not using transparency for anything. For a web application a > reduction from 300 kb to 90 kb is really important so I hope you have > some good ideas. A web application needs to be fast, right? According to its home page, pngnq "is limited mostly to off-line uses rather than real time image delivery". You could take a look at PIL to see if it has any fast quantization algorithms, and pass your result to it as in the to_numeric.py example (see also webapp_demo.py for how to avoid using the pylab machinery for figure management). If not, you could always implement some fast quantization algorithm in numpy: http://en.wikipedia.org/wiki/Color_quantization My guess is that if you always produce similar-looking images, you could fix the palette off-line using whatever fancy algorithm you like, and then the actual conversion could be done pretty fast, especially if you can forgo dithering - perhaps for many types of charts it is not necessary. -- Jouni K. Seppänen http://www.iki.fi/jks
> > I think the point here is that > > img = Image('foo.png') > imshow(img) > > and > > img = Image('foo.png') > imshow(asarray(img)) > > give different results, since matplotlib.image.pil_to_array functions > differently from what PIL exposes in __array_interface__ > > -- > Pauli Virtanen > > I see. Thanks for clarifying this. And yes, I think this should be fixed. Hmm, it seems that somehow pil_to_array tries to make the image upside-down by itself. x_str = im.tostring('raw',im.mode,0,-1) However. I'm afraid that changing this behavior may not be ideal for backward-compatibility. I think one possible solution would be to simply deprecate the support for PIL image in imshow, and let users explicitly use array-interface via asarray function. Is there any other idea? I'll make this change unless someone come up with something. -JJ
On Sun, May 17, 2009 at 5:03 PM, Alan G Isaac <ala...@gm...> wrote: > So I am suggesting that any new functions > certainly should not propagate this anomaly. Understood. And, yes, I guess you're quite right in this regard. And I'll try to deprecate the current matlab-like interface in future (at least in my axes_grid toolkit). Thanks, -JJ
Hi all, I had a few off-list conversation with Alan, and I'm also quite agree with him for this issue. Just to rephrase, I think the current subplot interface has (at least) two issues. issue 1) the indexing convention is not that of python. The index starts from 1, instead of 0. (eg "111") issue 2) It is not easy (actually impossible) to make an axes spanning multiple cells. While I think we need to keep the current interface at least for a while, it would be better if we come up with some pythonic interface that may eventually replace the current matlab-centric one. So, how other developers and users think about this? And here are a few options that has been suggested. Option 1) use of "origin" keyword. ex) subplot(2, 2, 0, origin=0) Ryan is -1 for this and so am I. It also does not address the issue 2. Option 2) Introduce a new command ex1) ax = fig.subplot2grid(shape=(3,3), loc=(0,0), rowspan=2, colspan=2) Instead of simple subplot(111), we may do something like ex2) ax = fig.subplot2grid((1,1), 0) Option 3) introduce a new class for grid specification and modify subplot to accept this. One idea I have is to use an array-like interface. ex1) ax = fig.subplot(grid_spec(3,3)[0:2,0:2]) For subplot(111) equivalent, ex2) ax = fig.subplot(grid_spec(1,1)[0]) I, personally, want to reuse the convention in my axes_grid toolkit, where it would be better if this grid specification(?) can be expressed as a single argument. And I'm +1 for option 3 for this reason. However, I'm afraid that option 3 is not expressive enough. Of course, we should explore other solutions and any suggestions will be welcomed. So, how others think? Regards, -JJ On Fri, May 15, 2009 at 1:41 PM, Alan G Isaac <ai...@am...> wrote: > I love Matplotlib. > > That said, I find the indexing subplots to be an annoyance, > because it uses MATLAB conventions rather than Python > conventions for indexing. I think moving this convention > into the OO API was a mistake. > > Since Matplotlib is not yet 1.0, > I am suggesting that this be "fixed". > I understand this will cause some pain. > > If it cannot be fixed due to code breakage, > how about an "origin" keyword, that can be 0 or 1? > > Cheers, > Alan Isaac > > > ------------------------------------------------------------------------------ > Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensing option that enables > unlimited royalty-free distribution of the report engine > for externally facing server and web deployment. > http://p.sf.net/sfu/businessobjects > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
Hi mpl-users, I have a web application in which I produce png files using matplotlib. Unfortunately the files are quite big (up to ~300 kb). I have however tried using the Linux tool pngnq to reduce the file size with a factor ~3-4 with almost no degradation of the result. I therefore wondered whether it is possible to setup matplotlib to do something similar (from the source code the savefig method for png files does not seem to use any keyword arguments). Here is the output of the command pnginfo for the matplotlib output file and the pngnq processed file: 0.0.0.0.0.0.20090517t00z.768.png... Image Width: 768 Image Length: 328 Bitdepth (Bits/Sample): 8 Channels (Samples/Pixel): 4 Pixel depth (Pixel Depth): 32 Colour Type (Photometric Interpretation): RGB with alpha channel Image filter: Single row per byte filter Interlacing: No interlacing Compression Scheme: Deflate method 8, 32k window Resolution: 5039, 5039 (pixels per meter) FillOrder: msb-to-lsb Byte Order: Network (Big Endian) Number of text strings: 0 of 0 Offsets: 0, 0 0.0.0.0.0.0.20090517t00z.768-nq8.png... Image Width: 768 Image Length: 328 Bitdepth (Bits/Sample): 8 Channels (Samples/Pixel): 1 Pixel depth (Pixel Depth): 8 Colour Type (Photometric Interpretation): PALETTED COLOUR (256 colours, 0 transparent) Image filter: Single row per byte filter Interlacing: No interlacing Compression Scheme: Deflate method 8, 32k window Resolution: 0, 0 (unit unknown) FillOrder: msb-to-lsb Byte Order: Network (Big Endian) Number of text strings: 0 of 0 Offsets: 0, 0 I am not using transparency for anything. For a web application a reduction from 300 kb to 90 kb is really important so I hope you have some good ideas. Otherwise I guess I will have to put in a call to pngnq in my code (although I prefer to avoid calls to external programs in the Python code when possible). Best regards, Jesper
On 5/17/2009 2:44 PM Jae-Joon Lee apparently wrote: > I meant consistency with Matplotlib itself. My point is that that is not well defined, since most of the OO API in Matplotlib is Python centric, but the subplot definition is an exception. So I am suggesting that any new functions certainly should not propagate this anomaly. > I agree and I'm personally for python-centric interface throughout matplotlib. > I think what we need is to devise a new python-centric interface > (e.g., subplot2grid you suggested) and may try to deprecate subplot > eventually. So, looking forward, keeping that anomaly isolated will be important, so that changes do not need to be made in additional locations. (Or so I claim...) Cheers, Alan Isaac
Hmm, Is it working on your side from a bash shell as "ipython --pylab script argument" I couldn't make it work in this fashion. As I said whos list nothing :( I am on Fedora 10 x86, Python 2.5.2, IPython 0.10.bzr.r1173 Without the pylab switch I see the interactive space with variables. I also have plot imported from my script, however each time I have to call show() to see the figure to be re-drawn. To me, it seems one need to compromise: either to start ipython --pylab first and call scripts using "run" magic command or like you suggested start ipython with the script loaded and call show() after each plot command. Please comment me if I am wrong... Gökhan On Sun, May 17, 2009 at 3:19 PM, Roy Hyunjin Han < sta...@gm...> wrote: > On Sun, May 17, 2009 at 2:17 PM, Gökhan SEVER <gok...@gm...> > wrote: > > Hello Roy, > > > > "ipython splot.py 09_03_23_11_44_54.stats.tas" > > > > works, but I can't make it work with pylab switch. It executes my script, > > however whos list an empty namespace :( > > Gökhan, > > The "whos" command works for me. > > Also, why can't you use "import pylab" and make your plots directly in > ipython? > You can also use "from pylab import *" if you don't want to type pylab > every time. > > In [1]: whos > Variable Type Data/Info > ---------------------------------------------------- > argv list ['splot.py', > '09_03_23_11_44_54.stats.tas'] > argv_arr ndarray 12x13: 156 elems, type > `float64`, 1248 bytes > axes function <function axes at 0x92b6064> > axis function <function axis at 0x92b6294> > boxplot function <function boxplot at 0x92b6924> > d09_03_23_11_44_54_stats_tas ndarray 12x13: 156 elems, type > `float64`, 1248 bytes > data_len int 12 > draw function <function draw at 0x9212dbc> > f file <closed file > '09_03_23_11<...>', mode 'r' at 0x88ef260> > i int 11 > loadtxt function <function loadtxt at 0x8b65304> > mouse_hover_formatx function <function > mouse_hover_formatx at 0x88e84fc> > mouse_hover_formaty function <function > mouse_hover_formaty at 0x88e84c4> > plot function <function plot at 0x92b6cdc> > savefig function <function savefig at 0x9212df4> > show function <function show at 0x920f72c> > skiprows int 30 >
On Sun, May 17, 2009 at 2:17 PM, Gökhan SEVER <gok...@gm...> wrote: > Hello Roy, > > "ipython splot.py 09_03_23_11_44_54.stats.tas" > > works, but I can't make it work with pylab switch. It executes my script, > however whos list an empty namespace :( Gökhan, The "whos" command works for me. Also, why can't you use "import pylab" and make your plots directly in ipython? You can also use "from pylab import *" if you don't want to type pylab every time. In [1]: whos Variable Type Data/Info ---------------------------------------------------- argv list ['splot.py', '09_03_23_11_44_54.stats.tas'] argv_arr ndarray 12x13: 156 elems, type `float64`, 1248 bytes axes function <function axes at 0x92b6064> axis function <function axis at 0x92b6294> boxplot function <function boxplot at 0x92b6924> d09_03_23_11_44_54_stats_tas ndarray 12x13: 156 elems, type `float64`, 1248 bytes data_len int 12 draw function <function draw at 0x9212dbc> f file <closed file '09_03_23_11<...>', mode 'r' at 0x88ef260> i int 11 loadtxt function <function loadtxt at 0x8b65304> mouse_hover_formatx function <function mouse_hover_formatx at 0x88e84fc> mouse_hover_formaty function <function mouse_hover_formaty at 0x88e84c4> plot function <function plot at 0x92b6cdc> savefig function <function savefig at 0x9212df4> show function <function show at 0x920f72c> skiprows int 30
> Oops, sorry about that. Looks like I have it fixed now. > > JDH > Yes, it looks fine now. Thanks! -JJ