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
(12) |
2
(13) |
|
3
(4) |
4
(34) |
5
(14) |
6
(23) |
7
(26) |
8
(12) |
9
(7) |
|
10
(7) |
11
(9) |
12
(12) |
13
(20) |
14
(14) |
15
(13) |
16
(5) |
|
17
(4) |
18
(22) |
19
(29) |
20
(13) |
21
(9) |
22
(22) |
23
(3) |
|
24
(3) |
25
(29) |
26
(9) |
27
(10) |
28
(16) |
29
(16) |
30
(16) |
|
31
(9) |
|
|
|
|
|
|
|
From: Gökhan S. <gok...@gm...> - 2010-10-19 15:24:09
|
OK, I have just done an "svn up" and seen that this is fixed in http://matplotlib.svn.sourceforge.net/viewvc/matplotlib?revision=8756&view=revision Thanks for the fix. On Tue, Oct 19, 2010 at 10:06 AM, Gökhan Sever <gok...@gm...> wrote: > Sorry I have forgotten to add that you should issue a "k" key on the > plot to scale the x-axis logarithmically. > > On Tue, Oct 19, 2010 at 7:42 AM, Michael Droettboom <md...@st...> wrote: >> I can't reproduce this here with trunk, though I get a different crash >> in the 1.x branch (which has an easy fix). Are there any additional >> steps required to reproduce? >> >> Mike >> >> On 10/18/2010 09:50 PM, Gökhan Sever wrote: >>> Hello, >>> >>> I can't log scale my axes on rev8753. It was working on a previous >>> check-out (possibly a month old). Using WXagg, but same as with >>> Qt4Agg. >>> >>> Any ideas what could be wrong in the trunk? It seems to me that some >>> recent changes on LogLocator [ >>> http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/matplotlib/lib/matplotlib/ticker.py?view=log >>> ]class causing this. >>> >>> I[5]: d_um_pcasp_midpoint >>> O[5]: >>> array([ 0.124 , 0.1485, 0.179 , 0.2145, 0.2585, 0.333 , 0.5195, >>> 0.7955, 1.15 , 1.7805, 2.437 , 2.7865, 3.187 , 3.991 , >>> 4.957 ]) >>> >>> I[6]: pcasp_spectral_density09d >>> O[6]: >>> array([ 523.31751809, 200.73229115, 179.82563138, 183.13125583, >>> 160.62733458, 48.77147359, 22.23106603, 7.56501192, >>> 10.94637257, 8.47475684, 21.53335341, 32.950845 , >>> 30.502102 , 28.90555459, 21.38636076]) >>> >>> I[7]: plt.plot(d_um_pcasp_midpoint, pcasp_spectral_density09d) >>> O[7]: [<matplotlib.lines.Line2D object at 0x14b2474c>] >>> >>> I[8]: ERROR: An unexpected error occurred while tokenizing input >>> The following traceback may be corrupted or invalid >>> The error message is: ('EOF in multi-line statement', (554, 0)) >>> >>> ERROR: An unexpected error occurred while tokenizing input >>> The following traceback may be corrupted or invalid >>> The error message is: ('EOF in multi-line statement', (555, 0)) >>> >>> ERROR: An unexpected error occurred while tokenizing input >>> The following traceback may be corrupted or invalid >>> The error message is: ('EOF in multi-line statement', (555, 0)) >>> >>> ERROR: An unexpected error occurred while tokenizing input >>> The following traceback may be corrupted or invalid >>> The error message is: ('EOF in multi-line statement', (555, 0)) >>> >>> --------------------------------------------------------------------------- >>> ValueError Traceback (most recent call last) >>> >>> /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/backends/backend_wx.pyc >>> in _onKeyDown(self, evt) >>> 1254 key = self._get_key(evt) >>> 1255 evt.Skip() >>> -> 1256 FigureCanvasBase.key_press_event(self, key, guiEvent=evt) >>> 1257 >>> 1258 def _onKeyUp(self, evt): >>> >>> /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/backend_bases.pyc >>> in key_press_event(self, key, guiEvent) >>> 1525 s = 'key_press_event' >>> 1526 event = KeyEvent(s, self, key, self._lastx, >>> self._lasty, guiEvent=guiEvent) >>> -> 1527 self.callbacks.process(s, event) >>> 1528 >>> 1529 def key_release_event(self, key, guiEvent=None): >>> >>> /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/cbook.pyc >>> in process(self, s, *args, **kwargs) >>> 260 del self.callbacks[s][cid] >>> 261 else: >>> --> 262 proxy(*args, **kwargs) >>> 263 >>> 264 >>> >>> /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/cbook.pyc >>> in __call__(self, *args, **kwargs) >>> 186 mtd = self.func >>> 187 # invoke the callable and return the result >>> >>> --> 188 return mtd(*args, **kwargs) >>> 189 >>> 190 def __eq__(self, other): >>> >>> /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/backend_bases.pyc >>> in key_press(self, event) >>> 2254 elif scalex == 'linear': >>> 2255 ax.set_xscale('log') >>> -> 2256 ax.figure.canvas.draw() >>> 2257 >>> 2258 elif (event.key.isdigit() and event.key!='0') or >>> event.key in all: >>> >>> /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/backends/backend_wxagg.pyc >>> in draw(self, drawDC) >>> 57 """ >>> 58 DEBUG_MSG("draw()", 1, self) >>> ---> 59 FigureCanvasAgg.draw(self) >>> 60 >>> 61 self.bitmap = >>> _convert_agg_to_wx_bitmap(self.get_renderer(), None) >>> >>> /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/backends/backend_agg.pyc >>> in draw(self) >>> 392 >>> 393 self.renderer = self.get_renderer() >>> --> 394 self.figure.draw(self.renderer) >>> 395 >>> 396 def get_renderer(self): >>> >>> /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/artist.pyc >>> in draw_wrapper(artist, renderer, *args, **kwargs) >>> 53 def draw_wrapper(artist, renderer, *args, **kwargs): >>> 54 before(artist, renderer) >>> ---> 55 draw(artist, renderer, *args, **kwargs) >>> 56 after(artist, renderer) >>> 57 >>> >>> /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/figure.pyc >>> in draw(self, renderer) >>> 872 dsu.sort(key=itemgetter(0)) >>> 873 for zorder, func, args in dsu: >>> --> 874 func(*args) >>> 875 >>> 876 renderer.close_group('figure') >>> >>> /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/artist.pyc >>> in draw_wrapper(artist, renderer, *args, **kwargs) >>> 53 def draw_wrapper(artist, renderer, *args, **kwargs): >>> 54 before(artist, renderer) >>> ---> 55 draw(artist, renderer, *args, **kwargs) >>> 56 after(artist, renderer) >>> 57 >>> >>> /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/axes.pyc in >>> draw(self, renderer, inframe) >>> 1952 >>> 1953 for zorder, a in dsu: >>> -> 1954 a.draw(renderer) >>> 1955 >>> 1956 renderer.close_group('axes') >>> >>> /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/artist.pyc >>> in draw_wrapper(artist, renderer, *args, **kwargs) >>> 53 def draw_wrapper(artist, renderer, *args, **kwargs): >>> 54 before(artist, renderer) >>> ---> 55 draw(artist, renderer, *args, **kwargs) >>> 56 after(artist, renderer) >>> 57 >>> >>> /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/axis.pyc in >>> draw(self, renderer, *args, **kwargs) >>> 938 renderer.open_group(__name__) >>> 939 interval = self.get_view_interval() >>> --> 940 tick_tups = [ t for t in self.iter_ticks()] >>> 941 if self._smart_bounds: >>> 942 # handle inverted limits >>> >>> >>> /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/axis.pyc in >>> iter_ticks(self) >>> 874 majorTicks = self.get_major_ticks(len(majorLocs)) >>> 875 self.major.formatter.set_locs(majorLocs) >>> --> 876 majorLabels = [self.major.formatter(val, i) for i, val >>> in enumerate(majorLocs)] >>> 877 >>> 878 minorLocs = self.minor.locator() >>> >>> /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/ticker.pyc >>> in __call__(self, x, pos) >>> 635 sign = np.sign(x) >>> 636 fx = math.log(abs(x))/math.log(b) >>> --> 637 isDecade = is_decade(fx) >>> 638 >>> 639 usetex = rcParams['text.usetex'] >>> >>> /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/ticker.pyc >>> in is_decade(x, base) >>> 1190 return True >>> 1191 lx = np.log(x)/np.log(base) >>> -> 1192 return abs(lx - nearest_long(lx))< 1e-10 >>> 1193 >>> 1194 class LogLocator(Locator): >>> >>> /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/ticker.pyc >>> in nearest_long(x) >>> 1184 if x == 0: return 0L >>> 1185 elif x> 0: return long(x+0.5) >>> -> 1186 else: return long(x-0.5) >>> 1187 >>> 1188 def is_decade(x, base=10): >>> >>> ValueError: cannot convert float NaN to integer >>> >>> >>> >> >> >> -- >> Michael Droettboom >> Science Software Branch >> Space Telescope Science Institute >> Baltimore, Maryland, USA >> >> >> ------------------------------------------------------------------------------ >> Download new Adobe(R) Flash(R) Builder(TM) 4 >> The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly >> Flex(R) Builder(TM)) enable the development of rich applications that run >> across multiple browsers and platforms. Download your free trials today! >> http://p.sf.net/sfu/adobe-dev2dev >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > > > -- > Gökhan > -- Gökhan |
|
From: Gökhan S. <gok...@gm...> - 2010-10-19 15:06:57
|
Sorry I have forgotten to add that you should issue a "k" key on the plot to scale the x-axis logarithmically. On Tue, Oct 19, 2010 at 7:42 AM, Michael Droettboom <md...@st...> wrote: > I can't reproduce this here with trunk, though I get a different crash > in the 1.x branch (which has an easy fix). Are there any additional > steps required to reproduce? > > Mike > > On 10/18/2010 09:50 PM, Gökhan Sever wrote: >> Hello, >> >> I can't log scale my axes on rev8753. It was working on a previous >> check-out (possibly a month old). Using WXagg, but same as with >> Qt4Agg. >> >> Any ideas what could be wrong in the trunk? It seems to me that some >> recent changes on LogLocator [ >> http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/matplotlib/lib/matplotlib/ticker.py?view=log >> ]class causing this. >> >> I[5]: d_um_pcasp_midpoint >> O[5]: >> array([ 0.124 , 0.1485, 0.179 , 0.2145, 0.2585, 0.333 , 0.5195, >> 0.7955, 1.15 , 1.7805, 2.437 , 2.7865, 3.187 , 3.991 , >> 4.957 ]) >> >> I[6]: pcasp_spectral_density09d >> O[6]: >> array([ 523.31751809, 200.73229115, 179.82563138, 183.13125583, >> 160.62733458, 48.77147359, 22.23106603, 7.56501192, >> 10.94637257, 8.47475684, 21.53335341, 32.950845 , >> 30.502102 , 28.90555459, 21.38636076]) >> >> I[7]: plt.plot(d_um_pcasp_midpoint, pcasp_spectral_density09d) >> O[7]: [<matplotlib.lines.Line2D object at 0x14b2474c>] >> >> I[8]: ERROR: An unexpected error occurred while tokenizing input >> The following traceback may be corrupted or invalid >> The error message is: ('EOF in multi-line statement', (554, 0)) >> >> ERROR: An unexpected error occurred while tokenizing input >> The following traceback may be corrupted or invalid >> The error message is: ('EOF in multi-line statement', (555, 0)) >> >> ERROR: An unexpected error occurred while tokenizing input >> The following traceback may be corrupted or invalid >> The error message is: ('EOF in multi-line statement', (555, 0)) >> >> ERROR: An unexpected error occurred while tokenizing input >> The following traceback may be corrupted or invalid >> The error message is: ('EOF in multi-line statement', (555, 0)) >> >> --------------------------------------------------------------------------- >> ValueError Traceback (most recent call last) >> >> /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/backends/backend_wx.pyc >> in _onKeyDown(self, evt) >> 1254 key = self._get_key(evt) >> 1255 evt.Skip() >> -> 1256 FigureCanvasBase.key_press_event(self, key, guiEvent=evt) >> 1257 >> 1258 def _onKeyUp(self, evt): >> >> /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/backend_bases.pyc >> in key_press_event(self, key, guiEvent) >> 1525 s = 'key_press_event' >> 1526 event = KeyEvent(s, self, key, self._lastx, >> self._lasty, guiEvent=guiEvent) >> -> 1527 self.callbacks.process(s, event) >> 1528 >> 1529 def key_release_event(self, key, guiEvent=None): >> >> /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/cbook.pyc >> in process(self, s, *args, **kwargs) >> 260 del self.callbacks[s][cid] >> 261 else: >> --> 262 proxy(*args, **kwargs) >> 263 >> 264 >> >> /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/cbook.pyc >> in __call__(self, *args, **kwargs) >> 186 mtd = self.func >> 187 # invoke the callable and return the result >> >> --> 188 return mtd(*args, **kwargs) >> 189 >> 190 def __eq__(self, other): >> >> /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/backend_bases.pyc >> in key_press(self, event) >> 2254 elif scalex == 'linear': >> 2255 ax.set_xscale('log') >> -> 2256 ax.figure.canvas.draw() >> 2257 >> 2258 elif (event.key.isdigit() and event.key!='0') or >> event.key in all: >> >> /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/backends/backend_wxagg.pyc >> in draw(self, drawDC) >> 57 """ >> 58 DEBUG_MSG("draw()", 1, self) >> ---> 59 FigureCanvasAgg.draw(self) >> 60 >> 61 self.bitmap = >> _convert_agg_to_wx_bitmap(self.get_renderer(), None) >> >> /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/backends/backend_agg.pyc >> in draw(self) >> 392 >> 393 self.renderer = self.get_renderer() >> --> 394 self.figure.draw(self.renderer) >> 395 >> 396 def get_renderer(self): >> >> /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/artist.pyc >> in draw_wrapper(artist, renderer, *args, **kwargs) >> 53 def draw_wrapper(artist, renderer, *args, **kwargs): >> 54 before(artist, renderer) >> ---> 55 draw(artist, renderer, *args, **kwargs) >> 56 after(artist, renderer) >> 57 >> >> /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/figure.pyc >> in draw(self, renderer) >> 872 dsu.sort(key=itemgetter(0)) >> 873 for zorder, func, args in dsu: >> --> 874 func(*args) >> 875 >> 876 renderer.close_group('figure') >> >> /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/artist.pyc >> in draw_wrapper(artist, renderer, *args, **kwargs) >> 53 def draw_wrapper(artist, renderer, *args, **kwargs): >> 54 before(artist, renderer) >> ---> 55 draw(artist, renderer, *args, **kwargs) >> 56 after(artist, renderer) >> 57 >> >> /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/axes.pyc in >> draw(self, renderer, inframe) >> 1952 >> 1953 for zorder, a in dsu: >> -> 1954 a.draw(renderer) >> 1955 >> 1956 renderer.close_group('axes') >> >> /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/artist.pyc >> in draw_wrapper(artist, renderer, *args, **kwargs) >> 53 def draw_wrapper(artist, renderer, *args, **kwargs): >> 54 before(artist, renderer) >> ---> 55 draw(artist, renderer, *args, **kwargs) >> 56 after(artist, renderer) >> 57 >> >> /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/axis.pyc in >> draw(self, renderer, *args, **kwargs) >> 938 renderer.open_group(__name__) >> 939 interval = self.get_view_interval() >> --> 940 tick_tups = [ t for t in self.iter_ticks()] >> 941 if self._smart_bounds: >> 942 # handle inverted limits >> >> >> /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/axis.pyc in >> iter_ticks(self) >> 874 majorTicks = self.get_major_ticks(len(majorLocs)) >> 875 self.major.formatter.set_locs(majorLocs) >> --> 876 majorLabels = [self.major.formatter(val, i) for i, val >> in enumerate(majorLocs)] >> 877 >> 878 minorLocs = self.minor.locator() >> >> /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/ticker.pyc >> in __call__(self, x, pos) >> 635 sign = np.sign(x) >> 636 fx = math.log(abs(x))/math.log(b) >> --> 637 isDecade = is_decade(fx) >> 638 >> 639 usetex = rcParams['text.usetex'] >> >> /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/ticker.pyc >> in is_decade(x, base) >> 1190 return True >> 1191 lx = np.log(x)/np.log(base) >> -> 1192 return abs(lx - nearest_long(lx))< 1e-10 >> 1193 >> 1194 class LogLocator(Locator): >> >> /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/ticker.pyc >> in nearest_long(x) >> 1184 if x == 0: return 0L >> 1185 elif x> 0: return long(x+0.5) >> -> 1186 else: return long(x-0.5) >> 1187 >> 1188 def is_decade(x, base=10): >> >> ValueError: cannot convert float NaN to integer >> >> >> > > > -- > Michael Droettboom > Science Software Branch > Space Telescope Science Institute > Baltimore, Maryland, USA > > > ------------------------------------------------------------------------------ > Download new Adobe(R) Flash(R) Builder(TM) 4 > The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly > Flex(R) Builder(TM)) enable the development of rich applications that run > across multiple browsers and platforms. Download your free trials today! > http://p.sf.net/sfu/adobe-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Gökhan |
|
From: Michael D. <md...@st...> - 2010-10-19 14:34:26
|
On 10/18/2010 05:17 PM, LittleBigBrain wrote: > I ran the matplotlib.test() and got: > FAILED (KNOWNFAIL=90, errors=14) > > I checked more carefully now. It turns out, all the differences are texts. > > Most of them are very small differences: Some of them offset to right > and down a little bit. Some of them shrink a little bit. Maybe, it > results from that some fonts in Windows are difference form Linux. > We don't currently run a Windows-based buildbot for automated tests so we don't tend to catch these differences on a regular basis. The tests use the default fonts that ship with matplotlib, so there should be zero differences between Windows and other platforms (that is, at least, the goal). I'll have a look at these differences next time I'm in front of a Windows box. > But there is one test gave out very big difference: > the 'tests.test_axes.test_symlog'. > The Y axis tick labels>10 are completely lost. > Please check the attachments. > Thanks for reporting this. This bug should now be fixed in SVN r8756 (branch) and r8757 (trunk). Mike -- Michael Droettboom Science Software Branch Space Telescope Science Institute Baltimore, Maryland, USA |
|
From: Kynn J. <ky...@gm...> - 2010-10-19 13:46:22
|
I need to generate a fairly complex chart, for which I need the ability to specify not only subplots, but also sub-subplots. (Our group has found such charts useful in the past, but they were generated using horrific MATLAB code, which we're trying to get away from as quickly as we can, not only because the code is impenetrable, but because the MATLAB GUI is unstable, and produces very poor results when we try to print the charts.) I'll try to describe what I want to do in a bit more detail (it's messy). First imagine a simple plot (just a simple X-Y line graph connecting 3-4 datapoints). I'll call this a level-0 plot. Now, join ~10 of these level-0 plots side-by-side (with no space between the plots). This new aggregate is a level-1 plot. Next stack ~10 level-1 plots vertically, again, with no space between them. The resulting aggregate is a level-2 plot. Finally arrange ~10 of these level-2 plots side-by-side, with some spacing between them. The desired final product is this level-3 plot. (In practice, the numbers of elements within each aggregate is not exactly 10. For example, for my immediate application the numbers would be 8 level-0 plots per level-1 plot; 17 level-1 plots per level-2 plot; and 8 level-2 plots per level-3 plot. The level-0 plots should have an aspect ratio (H:W) of 4. Therefore, the level-2 plots will have an aspect ratio of almost 8.) How can I achieve this? Thanks! ~kj P.S. Without knowing much about the internals of matplotlib, it seems to me that the best way to do this would be to define a container class that can have itself as one of the contained elements. In this way, a containment hierarchy of arbitrary depth could be defined. I understand that in matplot lib Figure objects can contain Axes objects. Can they also contain other Figure objects? If not, what would be required to enable this capability? Any comments or suggestions on what it would take to do this would be appreciated. |
|
From: Michael D. <md...@st...> - 2010-10-19 12:42:43
|
I can't reproduce this here with trunk, though I get a different crash in the 1.x branch (which has an easy fix). Are there any additional steps required to reproduce? Mike On 10/18/2010 09:50 PM, Gökhan Sever wrote: > Hello, > > I can't log scale my axes on rev8753. It was working on a previous > check-out (possibly a month old). Using WXagg, but same as with > Qt4Agg. > > Any ideas what could be wrong in the trunk? It seems to me that some > recent changes on LogLocator [ > http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/matplotlib/lib/matplotlib/ticker.py?view=log > ]class causing this. > > I[5]: d_um_pcasp_midpoint > O[5]: > array([ 0.124 , 0.1485, 0.179 , 0.2145, 0.2585, 0.333 , 0.5195, > 0.7955, 1.15 , 1.7805, 2.437 , 2.7865, 3.187 , 3.991 , > 4.957 ]) > > I[6]: pcasp_spectral_density09d > O[6]: > array([ 523.31751809, 200.73229115, 179.82563138, 183.13125583, > 160.62733458, 48.77147359, 22.23106603, 7.56501192, > 10.94637257, 8.47475684, 21.53335341, 32.950845 , > 30.502102 , 28.90555459, 21.38636076]) > > I[7]: plt.plot(d_um_pcasp_midpoint, pcasp_spectral_density09d) > O[7]: [<matplotlib.lines.Line2D object at 0x14b2474c>] > > I[8]: ERROR: An unexpected error occurred while tokenizing input > The following traceback may be corrupted or invalid > The error message is: ('EOF in multi-line statement', (554, 0)) > > ERROR: An unexpected error occurred while tokenizing input > The following traceback may be corrupted or invalid > The error message is: ('EOF in multi-line statement', (555, 0)) > > ERROR: An unexpected error occurred while tokenizing input > The following traceback may be corrupted or invalid > The error message is: ('EOF in multi-line statement', (555, 0)) > > ERROR: An unexpected error occurred while tokenizing input > The following traceback may be corrupted or invalid > The error message is: ('EOF in multi-line statement', (555, 0)) > > --------------------------------------------------------------------------- > ValueError Traceback (most recent call last) > > /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/backends/backend_wx.pyc > in _onKeyDown(self, evt) > 1254 key = self._get_key(evt) > 1255 evt.Skip() > -> 1256 FigureCanvasBase.key_press_event(self, key, guiEvent=evt) > 1257 > 1258 def _onKeyUp(self, evt): > > /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/backend_bases.pyc > in key_press_event(self, key, guiEvent) > 1525 s = 'key_press_event' > 1526 event = KeyEvent(s, self, key, self._lastx, > self._lasty, guiEvent=guiEvent) > -> 1527 self.callbacks.process(s, event) > 1528 > 1529 def key_release_event(self, key, guiEvent=None): > > /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/cbook.pyc > in process(self, s, *args, **kwargs) > 260 del self.callbacks[s][cid] > 261 else: > --> 262 proxy(*args, **kwargs) > 263 > 264 > > /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/cbook.pyc > in __call__(self, *args, **kwargs) > 186 mtd = self.func > 187 # invoke the callable and return the result > > --> 188 return mtd(*args, **kwargs) > 189 > 190 def __eq__(self, other): > > /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/backend_bases.pyc > in key_press(self, event) > 2254 elif scalex == 'linear': > 2255 ax.set_xscale('log') > -> 2256 ax.figure.canvas.draw() > 2257 > 2258 elif (event.key.isdigit() and event.key!='0') or > event.key in all: > > /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/backends/backend_wxagg.pyc > in draw(self, drawDC) > 57 """ > 58 DEBUG_MSG("draw()", 1, self) > ---> 59 FigureCanvasAgg.draw(self) > 60 > 61 self.bitmap = > _convert_agg_to_wx_bitmap(self.get_renderer(), None) > > /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/backends/backend_agg.pyc > in draw(self) > 392 > 393 self.renderer = self.get_renderer() > --> 394 self.figure.draw(self.renderer) > 395 > 396 def get_renderer(self): > > /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/artist.pyc > in draw_wrapper(artist, renderer, *args, **kwargs) > 53 def draw_wrapper(artist, renderer, *args, **kwargs): > 54 before(artist, renderer) > ---> 55 draw(artist, renderer, *args, **kwargs) > 56 after(artist, renderer) > 57 > > /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/figure.pyc > in draw(self, renderer) > 872 dsu.sort(key=itemgetter(0)) > 873 for zorder, func, args in dsu: > --> 874 func(*args) > 875 > 876 renderer.close_group('figure') > > /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/artist.pyc > in draw_wrapper(artist, renderer, *args, **kwargs) > 53 def draw_wrapper(artist, renderer, *args, **kwargs): > 54 before(artist, renderer) > ---> 55 draw(artist, renderer, *args, **kwargs) > 56 after(artist, renderer) > 57 > > /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/axes.pyc in > draw(self, renderer, inframe) > 1952 > 1953 for zorder, a in dsu: > -> 1954 a.draw(renderer) > 1955 > 1956 renderer.close_group('axes') > > /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/artist.pyc > in draw_wrapper(artist, renderer, *args, **kwargs) > 53 def draw_wrapper(artist, renderer, *args, **kwargs): > 54 before(artist, renderer) > ---> 55 draw(artist, renderer, *args, **kwargs) > 56 after(artist, renderer) > 57 > > /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/axis.pyc in > draw(self, renderer, *args, **kwargs) > 938 renderer.open_group(__name__) > 939 interval = self.get_view_interval() > --> 940 tick_tups = [ t for t in self.iter_ticks()] > 941 if self._smart_bounds: > 942 # handle inverted limits > > > /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/axis.pyc in > iter_ticks(self) > 874 majorTicks = self.get_major_ticks(len(majorLocs)) > 875 self.major.formatter.set_locs(majorLocs) > --> 876 majorLabels = [self.major.formatter(val, i) for i, val > in enumerate(majorLocs)] > 877 > 878 minorLocs = self.minor.locator() > > /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/ticker.pyc > in __call__(self, x, pos) > 635 sign = np.sign(x) > 636 fx = math.log(abs(x))/math.log(b) > --> 637 isDecade = is_decade(fx) > 638 > 639 usetex = rcParams['text.usetex'] > > /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/ticker.pyc > in is_decade(x, base) > 1190 return True > 1191 lx = np.log(x)/np.log(base) > -> 1192 return abs(lx - nearest_long(lx))< 1e-10 > 1193 > 1194 class LogLocator(Locator): > > /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/ticker.pyc > in nearest_long(x) > 1184 if x == 0: return 0L > 1185 elif x> 0: return long(x+0.5) > -> 1186 else: return long(x-0.5) > 1187 > 1188 def is_decade(x, base=10): > > ValueError: cannot convert float NaN to integer > > > -- Michael Droettboom Science Software Branch Space Telescope Science Institute Baltimore, Maryland, USA |
|
From: Ted K. <ted...@gm...> - 2010-10-19 11:15:56
|
Hi I've just tried some of the source code from the Spine demos but I when I try : ax.spines['bottom'].set_smart_bounds(True) I get the error: 'Spine' object has no attribute 'set_smart_bounds' What could be the problem? Ted |
|
From: Ted K. <ted...@gm...> - 2010-10-19 10:58:55
|
Thanks all. That fixed the problem. Ted On 19 October 2010 00:02, Gökhan Sever <gok...@gm...> wrote: > On Mon, Oct 18, 2010 at 5:36 PM, Eric Firing <ef...@ha...> wrote: > > > > setp(xticks, markeredgewidth=4) > > > > Ticks are markers. > > > > Eric > > Good catch. Thanks for the fix. > > -- > Gökhan > > > ------------------------------------------------------------------------------ > Download new Adobe(R) Flash(R) Builder(TM) 4 > The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly > Flex(R) Builder(TM)) enable the development of rich applications that run > across multiple browsers and platforms. Download your free trials today! > http://p.sf.net/sfu/adobe-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Gökhan S. <gok...@gm...> - 2010-10-19 01:50:52
|
Hello, I can't log scale my axes on rev8753. It was working on a previous check-out (possibly a month old). Using WXagg, but same as with Qt4Agg. Any ideas what could be wrong in the trunk? It seems to me that some recent changes on LogLocator [ http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/matplotlib/lib/matplotlib/ticker.py?view=log ]class causing this. I[5]: d_um_pcasp_midpoint O[5]: array([ 0.124 , 0.1485, 0.179 , 0.2145, 0.2585, 0.333 , 0.5195, 0.7955, 1.15 , 1.7805, 2.437 , 2.7865, 3.187 , 3.991 , 4.957 ]) I[6]: pcasp_spectral_density09d O[6]: array([ 523.31751809, 200.73229115, 179.82563138, 183.13125583, 160.62733458, 48.77147359, 22.23106603, 7.56501192, 10.94637257, 8.47475684, 21.53335341, 32.950845 , 30.502102 , 28.90555459, 21.38636076]) I[7]: plt.plot(d_um_pcasp_midpoint, pcasp_spectral_density09d) O[7]: [<matplotlib.lines.Line2D object at 0x14b2474c>] I[8]: ERROR: An unexpected error occurred while tokenizing input The following traceback may be corrupted or invalid The error message is: ('EOF in multi-line statement', (554, 0)) ERROR: An unexpected error occurred while tokenizing input The following traceback may be corrupted or invalid The error message is: ('EOF in multi-line statement', (555, 0)) ERROR: An unexpected error occurred while tokenizing input The following traceback may be corrupted or invalid The error message is: ('EOF in multi-line statement', (555, 0)) ERROR: An unexpected error occurred while tokenizing input The following traceback may be corrupted or invalid The error message is: ('EOF in multi-line statement', (555, 0)) --------------------------------------------------------------------------- ValueError Traceback (most recent call last) /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/backends/backend_wx.pyc in _onKeyDown(self, evt) 1254 key = self._get_key(evt) 1255 evt.Skip() -> 1256 FigureCanvasBase.key_press_event(self, key, guiEvent=evt) 1257 1258 def _onKeyUp(self, evt): /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/backend_bases.pyc in key_press_event(self, key, guiEvent) 1525 s = 'key_press_event' 1526 event = KeyEvent(s, self, key, self._lastx, self._lasty, guiEvent=guiEvent) -> 1527 self.callbacks.process(s, event) 1528 1529 def key_release_event(self, key, guiEvent=None): /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/cbook.pyc in process(self, s, *args, **kwargs) 260 del self.callbacks[s][cid] 261 else: --> 262 proxy(*args, **kwargs) 263 264 /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/cbook.pyc in __call__(self, *args, **kwargs) 186 mtd = self.func 187 # invoke the callable and return the result --> 188 return mtd(*args, **kwargs) 189 190 def __eq__(self, other): /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/backend_bases.pyc in key_press(self, event) 2254 elif scalex == 'linear': 2255 ax.set_xscale('log') -> 2256 ax.figure.canvas.draw() 2257 2258 elif (event.key.isdigit() and event.key!='0') or event.key in all: /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/backends/backend_wxagg.pyc in draw(self, drawDC) 57 """ 58 DEBUG_MSG("draw()", 1, self) ---> 59 FigureCanvasAgg.draw(self) 60 61 self.bitmap = _convert_agg_to_wx_bitmap(self.get_renderer(), None) /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/backends/backend_agg.pyc in draw(self) 392 393 self.renderer = self.get_renderer() --> 394 self.figure.draw(self.renderer) 395 396 def get_renderer(self): /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/artist.pyc in draw_wrapper(artist, renderer, *args, **kwargs) 53 def draw_wrapper(artist, renderer, *args, **kwargs): 54 before(artist, renderer) ---> 55 draw(artist, renderer, *args, **kwargs) 56 after(artist, renderer) 57 /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/figure.pyc in draw(self, renderer) 872 dsu.sort(key=itemgetter(0)) 873 for zorder, func, args in dsu: --> 874 func(*args) 875 876 renderer.close_group('figure') /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/artist.pyc in draw_wrapper(artist, renderer, *args, **kwargs) 53 def draw_wrapper(artist, renderer, *args, **kwargs): 54 before(artist, renderer) ---> 55 draw(artist, renderer, *args, **kwargs) 56 after(artist, renderer) 57 /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/axes.pyc in draw(self, renderer, inframe) 1952 1953 for zorder, a in dsu: -> 1954 a.draw(renderer) 1955 1956 renderer.close_group('axes') /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/artist.pyc in draw_wrapper(artist, renderer, *args, **kwargs) 53 def draw_wrapper(artist, renderer, *args, **kwargs): 54 before(artist, renderer) ---> 55 draw(artist, renderer, *args, **kwargs) 56 after(artist, renderer) 57 /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/axis.pyc in draw(self, renderer, *args, **kwargs) 938 renderer.open_group(__name__) 939 interval = self.get_view_interval() --> 940 tick_tups = [ t for t in self.iter_ticks()] 941 if self._smart_bounds: 942 # handle inverted limits /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/axis.pyc in iter_ticks(self) 874 majorTicks = self.get_major_ticks(len(majorLocs)) 875 self.major.formatter.set_locs(majorLocs) --> 876 majorLabels = [self.major.formatter(val, i) for i, val in enumerate(majorLocs)] 877 878 minorLocs = self.minor.locator() /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/ticker.pyc in __call__(self, x, pos) 635 sign = np.sign(x) 636 fx = math.log(abs(x))/math.log(b) --> 637 isDecade = is_decade(fx) 638 639 usetex = rcParams['text.usetex'] /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/ticker.pyc in is_decade(x, base) 1190 return True 1191 lx = np.log(x)/np.log(base) -> 1192 return abs(lx - nearest_long(lx)) < 1e-10 1193 1194 class LogLocator(Locator): /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/ticker.pyc in nearest_long(x) 1184 if x == 0: return 0L 1185 elif x > 0: return long(x+0.5) -> 1186 else: return long(x-0.5) 1187 1188 def is_decade(x, base=10): ValueError: cannot convert float NaN to integer -- Gökhan |
|
From: Gökhan S. <gok...@gm...> - 2010-10-18 23:02:58
|
On Mon, Oct 18, 2010 at 5:36 PM, Eric Firing <ef...@ha...> wrote: > > setp(xticks, markeredgewidth=4) > > Ticks are markers. > > Eric Good catch. Thanks for the fix. -- Gökhan |
|
From: Eric F. <ef...@ha...> - 2010-10-18 22:36:35
|
On 10/18/2010 09:42 AM, Gökhan Sever wrote:
> On Mon, Oct 18, 2010 at 12:46 PM, Ted Kord<ted...@gm...> wrote:
>> Hi
>>
>> How do I make the tick size bigger as in thicker/bolder?
>>
>> matplotlib.rc('ytick.major', size=5) makes it longer but 'not' thicker.
>>
>> Ted
>
> I[1]: plt.plot(range(100))
> O[1]: [<matplotlib.lines.Line2D object at 0xb84f8ec>]
>
> I[2]: xticks = getp(gca(), 'xticklines')
>
> I[3]: xgrids = getp(gca(), 'xgridlines')
>
> I[4]: setp(xgrids, linewidth=2)
> O[4]: [None, None, None, None, None, None]
>
> I[5]: setp(xticks, linewidth=5)
> O[55]: [None, None, None, None, None, None, None, None, None, None, None, None]
setp(xticks, markeredgewidth=4)
Ticks are markers.
Eric
|
|
From: LittleBigBrain <bra...@gm...> - 2010-10-18 21:17:17
|
I ran the matplotlib.test() and got: FAILED (KNOWNFAIL=90, errors=14) I checked more carefully now. It turns out, all the differences are texts. Most of them are very small differences: Some of them offset to right and down a little bit. Some of them shrink a little bit. Maybe, it results from that some fonts in Windows are difference form Linux. But there is one test gave out very big difference: the 'tests.test_axes.test_symlog'. The Y axis tick labels >10 are completely lost. Please check the attachments. >>> #=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#= Python: 2.6.5 (r265:79096, Mar 19 2010, 18:02:59) [MSC v.1500 64 bit (AMD64)] numpy: 1.4.1 matplotlib: 1.0.0 PIL: 1.1.7 #=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#= >> FAILED (KNOWNFAIL=90, errors=14) >> ====================================================================== >> ERROR: matplotlib.tests.test_axes.test_basic_annotate >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File "C:\Python26\lib\site-packages\nose-0.11.4-py2.6.egg\nose\case.py", >> line 186, in runTest >> self.test(*self.arg) >> File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", >> line 32, in failer >> result = f(*args, **kwargs) >> File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", >> line 126, in decorated_compare_images >> '(RMS %(rms).3f)'%err) >> ImageComparisonFailure: images not close: >> D:\works\matplotlibTest\result_images\test_axes\offset_points.png vs. >> D:\works\matplotlibTest\result_images\test_axes\expected-offset_points.png >> (RMS 223.063) >> >> ====================================================================== >> ERROR: matplotlib.tests.test_axes.test_fill_units >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File "C:\Python26\lib\site-packages\nose-0.11.4-py2.6.egg\nose\case.py", >> line 186, in runTest >> self.test(*self.arg) >> File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", >> line 32, in failer >> result = f(*args, **kwargs) >> File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", >> line 126, in decorated_compare_images >> '(RMS %(rms).3f)'%err) >> ImageComparisonFailure: images not close: >> D:\works\matplotlibTest\result_images\test_axes\fill_units.png vs. >> D:\works\matplotlibTest\result_images\test_axes\expected-fill_units.png >> (RMS 58.830) >> >> ====================================================================== >> ERROR: matplotlib.tests.test_axes.test_single_point >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File "C:\Python26\lib\site-packages\nose-0.11.4-py2.6.egg\nose\case.py", >> line 186, in runTest >> self.test(*self.arg) >> File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", >> line 32, in failer >> result = f(*args, **kwargs) >> File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", >> line 126, in decorated_compare_images >> '(RMS %(rms).3f)'%err) >> ImageComparisonFailure: images not close: >> D:\works\matplotlibTest\result_images\test_axes\single_point.png vs. >> D:\works\matplotlibTest\result_images\test_axes\expected-single_point.png >> (RMS 11.705) >> >> ====================================================================== >> ERROR: matplotlib.tests.test_axes.test_single_date >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File "C:\Python26\lib\site-packages\nose-0.11.4-py2.6.egg\nose\case.py", >> line 186, in runTest >> self.test(*self.arg) >> File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", >> line 32, in failer >> result = f(*args, **kwargs) >> File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", >> line 126, in decorated_compare_images >> '(RMS %(rms).3f)'%err) >> ImageComparisonFailure: images not close: >> D:\works\matplotlibTest\result_images\test_axes\single_date.png vs. >> D:\works\matplotlibTest\result_images\test_axes\expected-single_date.png >> (RMS 583.302) >> >> ====================================================================== >> ERROR: matplotlib.tests.test_axes.test_shaped_data >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File "C:\Python26\lib\site-packages\nose-0.11.4-py2.6.egg\nose\case.py", >> line 186, in runTest >> self.test(*self.arg) >> File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", >> line 32, in failer >> result = f(*args, **kwargs) >> File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", >> line 126, in decorated_compare_images >> '(RMS %(rms).3f)'%err) >> ImageComparisonFailure: images not close: >> D:\works\matplotlibTest\result_images\test_axes\shaped_data.png vs. >> D:\works\matplotlibTest\result_images\test_axes\expected-shaped_data.png >> (RMS 823.859) >> >> ====================================================================== >> ERROR: matplotlib.tests.test_axes.test_const_xy >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File "C:\Python26\lib\site-packages\nose-0.11.4-py2.6.egg\nose\case.py", >> line 186, in runTest >> self.test(*self.arg) >> File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", >> line 32, in failer >> result = f(*args, **kwargs) >> File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", >> line 126, in decorated_compare_images >> '(RMS %(rms).3f)'%err) >> ImageComparisonFailure: images not close: >> D:\works\matplotlibTest\result_images\test_axes\const_xy.png vs. >> D:\works\matplotlibTest\result_images\test_axes\expected-const_xy.png >> (RMS 462.317) >> >> ====================================================================== >> ERROR: matplotlib.tests.test_axes.test_polar_wrap >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File "C:\Python26\lib\site-packages\nose-0.11.4-py2.6.egg\nose\case.py", >> line 186, in runTest >> self.test(*self.arg) >> File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", >> line 32, in failer >> result = f(*args, **kwargs) >> File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", >> line 126, in decorated_compare_images >> '(RMS %(rms).3f)'%err) >> ImageComparisonFailure: images not close: >> D:\works\matplotlibTest\result_images\test_axes\polar_wrap_180.png vs. >> D:\works\matplotlibTest\result_images\test_axes\expected-polar_wrap_180.png >> (RMS 59.783) >> >> ====================================================================== >> ERROR: matplotlib.tests.test_axes.test_polar_units >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File "C:\Python26\lib\site-packages\nose-0.11.4-py2.6.egg\nose\case.py", >> line 186, in runTest >> self.test(*self.arg) >> File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", >> line 32, in failer >> result = f(*args, **kwargs) >> File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", >> line 126, in decorated_compare_images >> '(RMS %(rms).3f)'%err) >> ImageComparisonFailure: images not close: >> D:\works\matplotlibTest\result_images\test_axes\polar_units.png vs. >> D:\works\matplotlibTest\result_images\test_axes\expected-polar_units.png >> (RMS 59.557) >> >> ====================================================================== >> ERROR: matplotlib.tests.test_axes.test_polar_rmin >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File "C:\Python26\lib\site-packages\nose-0.11.4-py2.6.egg\nose\case.py", >> line 186, in runTest >> self.test(*self.arg) >> File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", >> line 32, in failer >> result = f(*args, **kwargs) >> File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", >> line 126, in decorated_compare_images >> '(RMS %(rms).3f)'%err) >> ImageComparisonFailure: images not close: >> D:\works\matplotlibTest\result_images\test_axes\polar_rmin.png vs. >> D:\works\matplotlibTest\result_images\test_axes\expected-polar_rmin.png >> (RMS 40.497) >> >> ====================================================================== >> ERROR: matplotlib.tests.test_axes.test_symlog >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File "C:\Python26\lib\site-packages\nose-0.11.4-py2.6.egg\nose\case.py", >> line 186, in runTest >> self.test(*self.arg) >> File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", >> line 32, in failer >> result = f(*args, **kwargs) >> File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", >> line 126, in decorated_compare_images >> '(RMS %(rms).3f)'%err) >> ImageComparisonFailure: images not close: >> D:\works\matplotlibTest\result_images\test_axes\symlog.png vs. >> D:\works\matplotlibTest\result_images\test_axes\expected-symlog.png >> (RMS 71.042) >> >> ====================================================================== >> ERROR: matplotlib.tests.test_image.test_image_clip >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File "C:\Python26\lib\site-packages\nose-0.11.4-py2.6.egg\nose\case.py", >> line 186, in runTest >> self.test(*self.arg) >> File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", >> line 32, in failer >> result = f(*args, **kwargs) >> File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", >> line 126, in decorated_compare_images >> '(RMS %(rms).3f)'%err) >> ImageComparisonFailure: images not close: >> D:\works\matplotlibTest\result_images\test_image\image_clip.png vs. >> D:\works\matplotlibTest\result_images\test_image\expected-image_clip.png >> (RMS 323.003) >> >> ====================================================================== >> ERROR: matplotlib.tests.test_mathtext.test_mathtext >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File "C:\Python26\lib\site-packages\nose-0.11.4-py2.6.egg\nose\case.py", >> line 186, in runTest >> self.test(*self.arg) >> File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", >> line 32, in failer >> result = f(*args, **kwargs) >> File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", >> line 126, in decorated_compare_images >> '(RMS %(rms).3f)'%err) >> ImageComparisonFailure: images not close: >> D:\works\matplotlibTest\result_images\test_mathtext\mathtext.png vs. >> D:\works\matplotlibTest\result_images\test_mathtext\expected-mathtext.png >> (RMS 41.845) >> >> ====================================================================== >> ERROR: matplotlib.tests.test_mathtext.test_mathtext_stix >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File "C:\Python26\lib\site-packages\nose-0.11.4-py2.6.egg\nose\case.py", >> line 186, in runTest >> self.test(*self.arg) >> File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", >> line 32, in failer >> result = f(*args, **kwargs) >> File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", >> line 126, in decorated_compare_images >> '(RMS %(rms).3f)'%err) >> ImageComparisonFailure: images not close: >> D:\works\matplotlibTest\result_images\test_mathtext\mathtext_stix.png >> vs. D:\works\matplotlibTest\result_images\test_mathtext\expected-mathtext_stix.png >> (RMS 29.816) >> >> ====================================================================== >> ERROR: matplotlib.tests.test_mathtext.test_mathtext_stixsans >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File "C:\Python26\lib\site-packages\nose-0.11.4-py2.6.egg\nose\case.py", >> line 186, in runTest >> self.test(*self.arg) >> File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", >> line 32, in failer >> result = f(*args, **kwargs) >> File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", >> line 126, in decorated_compare_images >> '(RMS %(rms).3f)'%err) >> ImageComparisonFailure: images not close: >> D:\works\matplotlibTest\result_images\test_mathtext\mathtext_stixsans.png >> vs. D:\works\matplotlibTest\result_images\test_mathtext\expected-mathtext_stixsans.png >> (RMS 21.471) >> >> ---------------------------------------------------------------------- >> Ran 150 tests in 100.386s >> > |
|
From: Gökhan S. <gok...@gm...> - 2010-10-18 19:42:34
|
On Mon, Oct 18, 2010 at 12:46 PM, Ted Kord <ted...@gm...> wrote:
> Hi
>
> How do I make the tick size bigger as in thicker/bolder?
>
> matplotlib.rc('ytick.major', size=5) makes it longer but 'not' thicker.
>
> Ted
I[1]: plt.plot(range(100))
O[1]: [<matplotlib.lines.Line2D object at 0xb84f8ec>]
I[2]: xticks = getp(gca(), 'xticklines')
I[3]: xgrids = getp(gca(), 'xgridlines')
I[4]: setp(xgrids, linewidth=2)
O[4]: [None, None, None, None, None, None]
I[5]: setp(xticks, linewidth=5)
O[55]: [None, None, None, None, None, None, None, None, None, None, None, None]
This should be the solution. However xgrids are finely set to a bigger
linewidth whereas xticks doesn't change.
I[6]: xticks
O[6]: <a list of 12 Text xtickline objects>
I[6]: xgrids
O[6]: <a list of 6 Line2D xgridline objects>
I[7]: xticks[0]
O[7]: <matplotlib.lines.Line2D object at 0xb8b560c>
I[8]: xgrids[1]
O[8]: <matplotlib.lines.Line2D object at 0xb8626ec>
Interestingly xticks is returned as a list of Text objects, while each
element of this list looks like a Line2D (which really supposed to
be.)
Can you try these on your side?
--
Gökhan
|
|
From: Thøger E. J. T. <th...@fy...> - 2010-10-18 19:00:42
|
Hi all;
I'm using the excellent font Linux Libertine for writing my thesis, in
which I do my plotting in matplotlib. I would really love to be ablu to
have consistent fonts in both text and graphs - is this possible? I know
it can be loaded by \usepackage{libertine}.
Best;
Emil
|
|
From: Jonathan S. <js...@cf...> - 2010-10-18 18:43:51
|
Hi,
I'm wondering if there's some relatively automatic way to have the
ticklabels to come out in scientific notation for an axis that uses a
linear scale (and has a range that warrants scientific notation)? For
example, an axis that goes from 0 to 2.E18 by default uses the labels 0,
0.5, 1.0, 1.5, 2.0 and puts 1e18 at the end of the axis. To me this is
unappealing. 1e18 is a computer programming way to write the 10^{18} (in
LaTeX formatting). In IDL the ticklabels are 5.0x10^{17}, 1.0x10^{18},
1.5x10^{18}, 2.0x10^{18}. This is one instance where I think IDL gets
it right and matplotlib gets it wrong. So, as far as I can tell, one
can give the ticklabels by hand, and so I could achieve my desired
labels that way, but it'd be nice to have a more automatic way to do it.
Searching the examples, I've come up empty so far. I would also
advocate changing the default format for labeling axes that fall in this
category. Do the developers have any opinions on this?
Regards,
Jon
|
|
From: LittleBigBrain <bra...@gm...> - 2010-10-18 18:34:15
|
On Mon, Oct 18, 2010 at 8:25 PM, LittleBigBrain <bra...@gm...> wrote: > On Mon, Oct 18, 2010 at 6:23 PM, Friedrich Romstedt > <fri...@gm...> wrote: >> 2010/10/18 LittleBigBrain <bra...@gm...>: >>> Hi Friedrich, >>> >>> Thanks for produce the patch. But I do not know how to use 'git'. And >>> I cannot find the changes you made on web. >>> though the latest update by you is 2 hours ago, in the online source >>> archive the latest file is modified on October 11, 2010 in 'trunk'. >> >> Yes I agree, I didn't check, I was too quick. Thanks for this further >> bug report in Friedrich Romstedt.py :-). I forgot to push the new >> branch. >> >> The file is here online: >> http://github.com/friedrichromstedt/matplotlib/blob/friedrichromstedt-get_cmap/lib/matplotlib/cm.py. >> Notice that the default branch on the repo is grayscale, when you go >> in via http://github.com/friedrichromstedt/matplotlib. >> >> I send the file attached. Just rename the current cm.py and put in >> the new one, it should work. You said you were using svn before, so I >> assumed you compiled yourself. How did you manage to use svn without >> compiling? >> >> Can you run the test suite? >> >> Friedrich >> > The colormap functions seem all OK. But I got other errors irrelevant > to your update. I manually checked all images invoking errors, they > are all OK. Somehow, their file handles are not closed properly before ~~~~~~~~~~~~~~~~~~No, I was wrong. For some reason, the RMS are too big. But with a glance, I did not see any visible difference in the pictures so far. > reopening. > > Here is the test result: >>>> import nose >>>> print nose.__version__ > 0.11.4 >>>> import PIL >>>> print PIL.__version__ >>>> from PIL import Image >>>> Image.VERSION > '1.1.7' >>>> import matplotlib >>>> matplotlib.__version__ > '1.0.0' >>>> matplotlib.test() > FAILED (KNOWNFAIL=90, errors=14) > ====================================================================== > ERROR: matplotlib.tests.test_axes.test_basic_annotate > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "C:\Python26\lib\site-packages\nose-0.11.4-py2.6.egg\nose\case.py", > line 186, in runTest > self.test(*self.arg) > File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", > line 32, in failer > result = f(*args, **kwargs) > File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", > line 126, in decorated_compare_images > '(RMS %(rms).3f)'%err) > ImageComparisonFailure: images not close: > D:\works\matplotlibTest\result_images\test_axes\offset_points.png vs. > D:\works\matplotlibTest\result_images\test_axes\expected-offset_points.png > (RMS 223.063) > > ====================================================================== > ERROR: matplotlib.tests.test_axes.test_fill_units > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "C:\Python26\lib\site-packages\nose-0.11.4-py2.6.egg\nose\case.py", > line 186, in runTest > self.test(*self.arg) > File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", > line 32, in failer > result = f(*args, **kwargs) > File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", > line 126, in decorated_compare_images > '(RMS %(rms).3f)'%err) > ImageComparisonFailure: images not close: > D:\works\matplotlibTest\result_images\test_axes\fill_units.png vs. > D:\works\matplotlibTest\result_images\test_axes\expected-fill_units.png > (RMS 58.830) > > ====================================================================== > ERROR: matplotlib.tests.test_axes.test_single_point > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "C:\Python26\lib\site-packages\nose-0.11.4-py2.6.egg\nose\case.py", > line 186, in runTest > self.test(*self.arg) > File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", > line 32, in failer > result = f(*args, **kwargs) > File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", > line 126, in decorated_compare_images > '(RMS %(rms).3f)'%err) > ImageComparisonFailure: images not close: > D:\works\matplotlibTest\result_images\test_axes\single_point.png vs. > D:\works\matplotlibTest\result_images\test_axes\expected-single_point.png > (RMS 11.705) > > ====================================================================== > ERROR: matplotlib.tests.test_axes.test_single_date > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "C:\Python26\lib\site-packages\nose-0.11.4-py2.6.egg\nose\case.py", > line 186, in runTest > self.test(*self.arg) > File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", > line 32, in failer > result = f(*args, **kwargs) > File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", > line 126, in decorated_compare_images > '(RMS %(rms).3f)'%err) > ImageComparisonFailure: images not close: > D:\works\matplotlibTest\result_images\test_axes\single_date.png vs. > D:\works\matplotlibTest\result_images\test_axes\expected-single_date.png > (RMS 583.302) > > ====================================================================== > ERROR: matplotlib.tests.test_axes.test_shaped_data > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "C:\Python26\lib\site-packages\nose-0.11.4-py2.6.egg\nose\case.py", > line 186, in runTest > self.test(*self.arg) > File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", > line 32, in failer > result = f(*args, **kwargs) > File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", > line 126, in decorated_compare_images > '(RMS %(rms).3f)'%err) > ImageComparisonFailure: images not close: > D:\works\matplotlibTest\result_images\test_axes\shaped_data.png vs. > D:\works\matplotlibTest\result_images\test_axes\expected-shaped_data.png > (RMS 823.859) > > ====================================================================== > ERROR: matplotlib.tests.test_axes.test_const_xy > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "C:\Python26\lib\site-packages\nose-0.11.4-py2.6.egg\nose\case.py", > line 186, in runTest > self.test(*self.arg) > File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", > line 32, in failer > result = f(*args, **kwargs) > File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", > line 126, in decorated_compare_images > '(RMS %(rms).3f)'%err) > ImageComparisonFailure: images not close: > D:\works\matplotlibTest\result_images\test_axes\const_xy.png vs. > D:\works\matplotlibTest\result_images\test_axes\expected-const_xy.png > (RMS 462.317) > > ====================================================================== > ERROR: matplotlib.tests.test_axes.test_polar_wrap > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "C:\Python26\lib\site-packages\nose-0.11.4-py2.6.egg\nose\case.py", > line 186, in runTest > self.test(*self.arg) > File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", > line 32, in failer > result = f(*args, **kwargs) > File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", > line 126, in decorated_compare_images > '(RMS %(rms).3f)'%err) > ImageComparisonFailure: images not close: > D:\works\matplotlibTest\result_images\test_axes\polar_wrap_180.png vs. > D:\works\matplotlibTest\result_images\test_axes\expected-polar_wrap_180.png > (RMS 59.783) > > ====================================================================== > ERROR: matplotlib.tests.test_axes.test_polar_units > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "C:\Python26\lib\site-packages\nose-0.11.4-py2.6.egg\nose\case.py", > line 186, in runTest > self.test(*self.arg) > File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", > line 32, in failer > result = f(*args, **kwargs) > File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", > line 126, in decorated_compare_images > '(RMS %(rms).3f)'%err) > ImageComparisonFailure: images not close: > D:\works\matplotlibTest\result_images\test_axes\polar_units.png vs. > D:\works\matplotlibTest\result_images\test_axes\expected-polar_units.png > (RMS 59.557) > > ====================================================================== > ERROR: matplotlib.tests.test_axes.test_polar_rmin > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "C:\Python26\lib\site-packages\nose-0.11.4-py2.6.egg\nose\case.py", > line 186, in runTest > self.test(*self.arg) > File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", > line 32, in failer > result = f(*args, **kwargs) > File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", > line 126, in decorated_compare_images > '(RMS %(rms).3f)'%err) > ImageComparisonFailure: images not close: > D:\works\matplotlibTest\result_images\test_axes\polar_rmin.png vs. > D:\works\matplotlibTest\result_images\test_axes\expected-polar_rmin.png > (RMS 40.497) > > ====================================================================== > ERROR: matplotlib.tests.test_axes.test_symlog > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "C:\Python26\lib\site-packages\nose-0.11.4-py2.6.egg\nose\case.py", > line 186, in runTest > self.test(*self.arg) > File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", > line 32, in failer > result = f(*args, **kwargs) > File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", > line 126, in decorated_compare_images > '(RMS %(rms).3f)'%err) > ImageComparisonFailure: images not close: > D:\works\matplotlibTest\result_images\test_axes\symlog.png vs. > D:\works\matplotlibTest\result_images\test_axes\expected-symlog.png > (RMS 71.042) > > ====================================================================== > ERROR: matplotlib.tests.test_image.test_image_clip > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "C:\Python26\lib\site-packages\nose-0.11.4-py2.6.egg\nose\case.py", > line 186, in runTest > self.test(*self.arg) > File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", > line 32, in failer > result = f(*args, **kwargs) > File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", > line 126, in decorated_compare_images > '(RMS %(rms).3f)'%err) > ImageComparisonFailure: images not close: > D:\works\matplotlibTest\result_images\test_image\image_clip.png vs. > D:\works\matplotlibTest\result_images\test_image\expected-image_clip.png > (RMS 323.003) > > ====================================================================== > ERROR: matplotlib.tests.test_mathtext.test_mathtext > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "C:\Python26\lib\site-packages\nose-0.11.4-py2.6.egg\nose\case.py", > line 186, in runTest > self.test(*self.arg) > File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", > line 32, in failer > result = f(*args, **kwargs) > File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", > line 126, in decorated_compare_images > '(RMS %(rms).3f)'%err) > ImageComparisonFailure: images not close: > D:\works\matplotlibTest\result_images\test_mathtext\mathtext.png vs. > D:\works\matplotlibTest\result_images\test_mathtext\expected-mathtext.png > (RMS 41.845) > > ====================================================================== > ERROR: matplotlib.tests.test_mathtext.test_mathtext_stix > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "C:\Python26\lib\site-packages\nose-0.11.4-py2.6.egg\nose\case.py", > line 186, in runTest > self.test(*self.arg) > File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", > line 32, in failer > result = f(*args, **kwargs) > File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", > line 126, in decorated_compare_images > '(RMS %(rms).3f)'%err) > ImageComparisonFailure: images not close: > D:\works\matplotlibTest\result_images\test_mathtext\mathtext_stix.png > vs. D:\works\matplotlibTest\result_images\test_mathtext\expected-mathtext_stix.png > (RMS 29.816) > > ====================================================================== > ERROR: matplotlib.tests.test_mathtext.test_mathtext_stixsans > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "C:\Python26\lib\site-packages\nose-0.11.4-py2.6.egg\nose\case.py", > line 186, in runTest > self.test(*self.arg) > File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", > line 32, in failer > result = f(*args, **kwargs) > File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", > line 126, in decorated_compare_images > '(RMS %(rms).3f)'%err) > ImageComparisonFailure: images not close: > D:\works\matplotlibTest\result_images\test_mathtext\mathtext_stixsans.png > vs. D:\works\matplotlibTest\result_images\test_mathtext\expected-mathtext_stixsans.png > (RMS 21.471) > > ---------------------------------------------------------------------- > Ran 150 tests in 100.386s > |
|
From: LittleBigBrain <bra...@gm...> - 2010-10-18 18:25:08
|
On Mon, Oct 18, 2010 at 6:23 PM, Friedrich Romstedt <fri...@gm...> wrote: > 2010/10/18 LittleBigBrain <bra...@gm...>: >> Hi Friedrich, >> >> Thanks for produce the patch. But I do not know how to use 'git'. And >> I cannot find the changes you made on web. >> though the latest update by you is 2 hours ago, in the online source >> archive the latest file is modified on October 11, 2010 in 'trunk'. > > Yes I agree, I didn't check, I was too quick. Thanks for this further > bug report in Friedrich Romstedt.py :-). I forgot to push the new > branch. > > The file is here online: > http://github.com/friedrichromstedt/matplotlib/blob/friedrichromstedt-get_cmap/lib/matplotlib/cm.py. > Notice that the default branch on the repo is grayscale, when you go > in via http://github.com/friedrichromstedt/matplotlib. > > I send the file attached. Just rename the current cm.py and put in > the new one, it should work. You said you were using svn before, so I > assumed you compiled yourself. How did you manage to use svn without > compiling? > > Can you run the test suite? > > Friedrich > The colormap functions seem all OK. But I got other errors irrelevant to your update. I manually checked all images invoking errors, they are all OK. Somehow, their file handles are not closed properly before reopening. Here is the test result: >>> import nose >>> print nose.__version__ 0.11.4 >>> import PIL >>> print PIL.__version__ >>> from PIL import Image >>> Image.VERSION '1.1.7' >>> import matplotlib >>> matplotlib.__version__ '1.0.0' >>> matplotlib.test() FAILED (KNOWNFAIL=90, errors=14) ====================================================================== ERROR: matplotlib.tests.test_axes.test_basic_annotate ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python26\lib\site-packages\nose-0.11.4-py2.6.egg\nose\case.py", line 186, in runTest self.test(*self.arg) File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", line 32, in failer result = f(*args, **kwargs) File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", line 126, in decorated_compare_images '(RMS %(rms).3f)'%err) ImageComparisonFailure: images not close: D:\works\matplotlibTest\result_images\test_axes\offset_points.png vs. D:\works\matplotlibTest\result_images\test_axes\expected-offset_points.png (RMS 223.063) ====================================================================== ERROR: matplotlib.tests.test_axes.test_fill_units ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python26\lib\site-packages\nose-0.11.4-py2.6.egg\nose\case.py", line 186, in runTest self.test(*self.arg) File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", line 32, in failer result = f(*args, **kwargs) File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", line 126, in decorated_compare_images '(RMS %(rms).3f)'%err) ImageComparisonFailure: images not close: D:\works\matplotlibTest\result_images\test_axes\fill_units.png vs. D:\works\matplotlibTest\result_images\test_axes\expected-fill_units.png (RMS 58.830) ====================================================================== ERROR: matplotlib.tests.test_axes.test_single_point ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python26\lib\site-packages\nose-0.11.4-py2.6.egg\nose\case.py", line 186, in runTest self.test(*self.arg) File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", line 32, in failer result = f(*args, **kwargs) File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", line 126, in decorated_compare_images '(RMS %(rms).3f)'%err) ImageComparisonFailure: images not close: D:\works\matplotlibTest\result_images\test_axes\single_point.png vs. D:\works\matplotlibTest\result_images\test_axes\expected-single_point.png (RMS 11.705) ====================================================================== ERROR: matplotlib.tests.test_axes.test_single_date ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python26\lib\site-packages\nose-0.11.4-py2.6.egg\nose\case.py", line 186, in runTest self.test(*self.arg) File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", line 32, in failer result = f(*args, **kwargs) File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", line 126, in decorated_compare_images '(RMS %(rms).3f)'%err) ImageComparisonFailure: images not close: D:\works\matplotlibTest\result_images\test_axes\single_date.png vs. D:\works\matplotlibTest\result_images\test_axes\expected-single_date.png (RMS 583.302) ====================================================================== ERROR: matplotlib.tests.test_axes.test_shaped_data ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python26\lib\site-packages\nose-0.11.4-py2.6.egg\nose\case.py", line 186, in runTest self.test(*self.arg) File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", line 32, in failer result = f(*args, **kwargs) File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", line 126, in decorated_compare_images '(RMS %(rms).3f)'%err) ImageComparisonFailure: images not close: D:\works\matplotlibTest\result_images\test_axes\shaped_data.png vs. D:\works\matplotlibTest\result_images\test_axes\expected-shaped_data.png (RMS 823.859) ====================================================================== ERROR: matplotlib.tests.test_axes.test_const_xy ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python26\lib\site-packages\nose-0.11.4-py2.6.egg\nose\case.py", line 186, in runTest self.test(*self.arg) File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", line 32, in failer result = f(*args, **kwargs) File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", line 126, in decorated_compare_images '(RMS %(rms).3f)'%err) ImageComparisonFailure: images not close: D:\works\matplotlibTest\result_images\test_axes\const_xy.png vs. D:\works\matplotlibTest\result_images\test_axes\expected-const_xy.png (RMS 462.317) ====================================================================== ERROR: matplotlib.tests.test_axes.test_polar_wrap ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python26\lib\site-packages\nose-0.11.4-py2.6.egg\nose\case.py", line 186, in runTest self.test(*self.arg) File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", line 32, in failer result = f(*args, **kwargs) File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", line 126, in decorated_compare_images '(RMS %(rms).3f)'%err) ImageComparisonFailure: images not close: D:\works\matplotlibTest\result_images\test_axes\polar_wrap_180.png vs. D:\works\matplotlibTest\result_images\test_axes\expected-polar_wrap_180.png (RMS 59.783) ====================================================================== ERROR: matplotlib.tests.test_axes.test_polar_units ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python26\lib\site-packages\nose-0.11.4-py2.6.egg\nose\case.py", line 186, in runTest self.test(*self.arg) File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", line 32, in failer result = f(*args, **kwargs) File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", line 126, in decorated_compare_images '(RMS %(rms).3f)'%err) ImageComparisonFailure: images not close: D:\works\matplotlibTest\result_images\test_axes\polar_units.png vs. D:\works\matplotlibTest\result_images\test_axes\expected-polar_units.png (RMS 59.557) ====================================================================== ERROR: matplotlib.tests.test_axes.test_polar_rmin ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python26\lib\site-packages\nose-0.11.4-py2.6.egg\nose\case.py", line 186, in runTest self.test(*self.arg) File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", line 32, in failer result = f(*args, **kwargs) File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", line 126, in decorated_compare_images '(RMS %(rms).3f)'%err) ImageComparisonFailure: images not close: D:\works\matplotlibTest\result_images\test_axes\polar_rmin.png vs. D:\works\matplotlibTest\result_images\test_axes\expected-polar_rmin.png (RMS 40.497) ====================================================================== ERROR: matplotlib.tests.test_axes.test_symlog ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python26\lib\site-packages\nose-0.11.4-py2.6.egg\nose\case.py", line 186, in runTest self.test(*self.arg) File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", line 32, in failer result = f(*args, **kwargs) File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", line 126, in decorated_compare_images '(RMS %(rms).3f)'%err) ImageComparisonFailure: images not close: D:\works\matplotlibTest\result_images\test_axes\symlog.png vs. D:\works\matplotlibTest\result_images\test_axes\expected-symlog.png (RMS 71.042) ====================================================================== ERROR: matplotlib.tests.test_image.test_image_clip ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python26\lib\site-packages\nose-0.11.4-py2.6.egg\nose\case.py", line 186, in runTest self.test(*self.arg) File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", line 32, in failer result = f(*args, **kwargs) File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", line 126, in decorated_compare_images '(RMS %(rms).3f)'%err) ImageComparisonFailure: images not close: D:\works\matplotlibTest\result_images\test_image\image_clip.png vs. D:\works\matplotlibTest\result_images\test_image\expected-image_clip.png (RMS 323.003) ====================================================================== ERROR: matplotlib.tests.test_mathtext.test_mathtext ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python26\lib\site-packages\nose-0.11.4-py2.6.egg\nose\case.py", line 186, in runTest self.test(*self.arg) File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", line 32, in failer result = f(*args, **kwargs) File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", line 126, in decorated_compare_images '(RMS %(rms).3f)'%err) ImageComparisonFailure: images not close: D:\works\matplotlibTest\result_images\test_mathtext\mathtext.png vs. D:\works\matplotlibTest\result_images\test_mathtext\expected-mathtext.png (RMS 41.845) ====================================================================== ERROR: matplotlib.tests.test_mathtext.test_mathtext_stix ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python26\lib\site-packages\nose-0.11.4-py2.6.egg\nose\case.py", line 186, in runTest self.test(*self.arg) File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", line 32, in failer result = f(*args, **kwargs) File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", line 126, in decorated_compare_images '(RMS %(rms).3f)'%err) ImageComparisonFailure: images not close: D:\works\matplotlibTest\result_images\test_mathtext\mathtext_stix.png vs. D:\works\matplotlibTest\result_images\test_mathtext\expected-mathtext_stix.png (RMS 29.816) ====================================================================== ERROR: matplotlib.tests.test_mathtext.test_mathtext_stixsans ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python26\lib\site-packages\nose-0.11.4-py2.6.egg\nose\case.py", line 186, in runTest self.test(*self.arg) File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", line 32, in failer result = f(*args, **kwargs) File "C:\Python26\lib\site-packages\matplotlib\testing\decorators.py", line 126, in decorated_compare_images '(RMS %(rms).3f)'%err) ImageComparisonFailure: images not close: D:\works\matplotlibTest\result_images\test_mathtext\mathtext_stixsans.png vs. D:\works\matplotlibTest\result_images\test_mathtext\expected-mathtext_stixsans.png (RMS 21.471) ---------------------------------------------------------------------- Ran 150 tests in 100.386s |
|
From: Ted K. <ted...@gm...> - 2010-10-18 17:46:21
|
Hi
How do I make the tick size bigger as in thicker/bolder?
matplotlib.rc('ytick.major', size=5) makes it longer but 'not' thicker.
Ted
|
|
From: Friedrich R. <fri...@gm...> - 2010-10-18 16:23:29
|
2010/10/18 LittleBigBrain <bra...@gm...>: > Hi Friedrich, > > Thanks for produce the patch. But I do not know how to use 'git'. And > I cannot find the changes you made on web. > though the latest update by you is 2 hours ago, in the online source > archive the latest file is modified on October 11, 2010 in 'trunk'. Yes I agree, I didn't check, I was too quick. Thanks for this further bug report in Friedrich Romstedt.py :-). I forgot to push the new branch. The file is here online: http://github.com/friedrichromstedt/matplotlib/blob/friedrichromstedt-get_cmap/lib/matplotlib/cm.py. Notice that the default branch on the repo is grayscale, when you go in via http://github.com/friedrichromstedt/matplotlib. I send the file attached. Just rename the current cm.py and put in the new one, it should work. You said you were using svn before, so I assumed you compiled yourself. How did you manage to use svn without compiling? Can you run the test suite? Friedrich |
|
From: Luis Q. <l.q...@4c...> - 2010-10-18 14:25:27
|
Dear all,
Is there a way of avoiding the overlap between the text of the labels
and the text of the ticks? This is what I am getting:
http://4c.ucc.ie/~lquesada/tmp/surface.pdf
Currently I am only doing this:
ax.set_xlabel('Distance',fontsize=16)
ax.set_ylabel('Size',fontsize=16)
ax.set_zlabel('Cost',fontsize=16)
Is it also possible to give an orientation to the labels? It would be
nicer if they are oriented parallel to the axis..
Thanks in advance for your advice!
Cheers,
Luis
|
|
From: John H. <jd...@gm...> - 2010-10-18 13:49:13
|
On Mon, Oct 18, 2010 at 8:42 AM, Michael Droettboom <md...@st...> wrote:
> matplotlib, under normal usage, doesn't list all files in the current
> directory. Can you provide the steps you perform before calling
> show()? What platform are you on, and which backend are you using?\
The only thing I could think of is that matplotlib.matplotlib_fname does:
fname = os.path.join( os.getcwd(), 'matplotlibrc')
if os.path.exists(fname): return fname
So if os.path.exists is slow for directories with many files, this
could be the culprit (though it would surprise me).
Maximilian, these lines are found in matplotlib/__init__.py -- you may
want to try commenting them out and rerunning to see if this helps
your issue.
JDH
|
|
From: Michael D. <md...@st...> - 2010-10-18 13:42:48
|
matplotlib, under normal usage, doesn't list all files in the current directory. Can you provide the steps you perform before calling show()? What platform are you on, and which backend are you using? Mike On 10/18/2010 05:54 AM, mfabulous wrote: > Hi, > > I encountered this particular problem quite often now. If you use matplotlib > in a directory that contains a large number of files, things become > extremely slow after calling pylab.show(). I suspect the interface > internally lists all files in that directory? > > I often have to plot from directories with huge amounts of data, is there a > way to change that behavior? > > Regards, > > Maximilian > -- Michael Droettboom Science Software Branch Space Telescope Science Institute Baltimore, Maryland, USA |
|
From: Michael D. <md...@st...> - 2010-10-18 13:26:48
|
I seem to have run into this problem with wx years ago -- destroying the
widget that fed an event from a callback causes issues. As Chris
suggested, the following seems to work, however:
import matplotlib.pyplot as plt
import wx
def close_figure():
plt.close()
def onclick(event):
if event.button==1:
wx.CallAfter(close_figure)
fig = plt.gcf()
cid = fig.canvas.mpl_connect('button_press_event', onclick)
plt.show()
Mike
On 10/15/2010 08:35 PM, Chris Barker wrote:
> On 10/15/10 5:16 PM, Paul Ivanov wrote:
>
>> I want to do something like this:
>>
>> import matplotlib.pyplot as plt
>> def onclick(event):
>> if event.button==1:
>> plt.close()
>> fig = plt.gcf()
>> cid = fig.canvas.mpl_connect('button_press_event', onclick)
>> plt.show()
>>
>> I've tried several variations on this theme, but all of them cause
>> crashes. Am I missing something?
>>
>> I'm using 1.0.0 with WXAgg
>>
>> thanks,
>>
>>
> I don't know if MPL events do anything like this, but since you are
> using wx, you could probably use wx.CallAfter() (or wx.CallLater(), call
> one of those in your callback,a nd tehn have the function called close
> the figure.
>
> -Chris
>
>
> ------------------------------------------------------------------------------
> Download new Adobe(R) Flash(R) Builder(TM) 4
> The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly
> Flex(R) Builder(TM)) enable the development of rich applications that run
> across multiple browsers and platforms. Download your free trials today!
> http://p.sf.net/sfu/adobe-dev2dev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
--
Michael Droettboom
Science Software Branch
Space Telescope Science Institute
Baltimore, Maryland, USA
|
|
From: Jae-Joon L. <lee...@gm...> - 2010-10-18 13:23:30
|
While you cannot add an axes to another axes, you can set position of an axes "relative to" another axes. The threads below show simple approaches. http://thread.gmane.org/gmane.comp.python.matplotlib.general/16373 http://old.nabble.com/embedding-figures-inside-another-%28coordinates%29-td22826126.html#a22832238 This may or may not work on your cases depending the complexity of your plots. Of course, if you need more control on the axes position, you may implement your own axes_locator. Regards, -JJ On Mon, Oct 18, 2010 at 9:33 PM, Radek Machulka <rad...@gm...> wrote: > That 'spacial plot' is just several simple plots placed in the 'parent > figure'. So my class just create this bunch of plots as an axes and place them > somewhere. > This is the 'plotting core' of my class: > > # plot 1 > rect1 = [a, b, c, d] # where a, b, c and d values depends on the data, ... > self.plot1 = self.figure.add_axes(rect1) > self.plot1.plot(data1) > > and the same (similar) for rest of plots (with differnt a,b,c,d values, of > course). > > So since it is not possible to place axes to another axes there is probably no > solution for my problem. > What can I probably do is create grid of figures (if figures are realy only > element where can axes be placed), but this seems not possible, or rewrite my > class using different elements for subplots instead of axes, if there is > anything... > > Well, thanks for clarifying this, I should definitely read more documentation > before I start code so complex apps. > But Thank You anyway > Radek > > Dne pondělí 18 října 2010 13:49:34 jste napsal(a): >> A figure is a figure and an axes is an axes. They are NOT >> interchangeable. The AxesGrid essentially creates a list of axes. >> >> As you may already know, only figure class has an add_axes method. And >> axes can only be added to a figure. You cannot add an axes to another >> axes. >> >> Since I have no idea what kind of special plot your code creates, I >> can only suggest you to revise your code to take an axes instance as >> an input, not a figure instance. >> >> If you can, please post a simple, but complete code that demonstrate >> your problem. >> >> Regards, >> >> -JJ > |
|
From: LittleBigBrain <bra...@gm...> - 2010-10-18 11:51:16
|
2010/10/18 Friedrich Romstedt <fri...@gm...>:
> 2010/10/18 脑关(BrainGateway)生命科学仪器 <bra...@gm...>:
>> On Mon, Oct 18, 2010 at 12:54 AM, Benjamin Root <ben...@ou...> wrote:
>>> On Sun, Oct 17, 2010 at 5:35 PM, braingateway <bra...@gm...>
>>> wrote:
>>>> I tried all possible colormaps and found out: gist_rainbow, terrain,
>>>> bwr, brg, and seismic will generate the same error, all other colormaps
>>>> are OK. I wonder is this a bug or expected behavior?
>> Hi Ben,
>> Thanks a lot for answering my question! I am a newbie to matplotlib,
>> so please forgive me, if the question is stupid ;p
>
> Questions are never stupid ...
>
>> In my program I wanna know the exact RGBA value of a data point in the
>> figure, in order to plot a corresponding line with the same color in
>> another figure. That is why I need to call a(z) to get RGBA value of a
>> point at (x,y,z) (z is represented by color). If I understood it
>> correctly, you said I do not need to specify the 'lut' in
>> cm.get_cmap(name,lut)? I thought the colormap object is actually a
>> lookup table with a length specified by lut.
>
> Kind of, but it's initialised from a linear segmentation dictionary,
> so you can get cmaps with a precision you want.
>
>> It turns out I do not
>> need to specify anything here.
>
> Default param is 256.
>
>> But if I do not specify anything the
>> colormap.N is always 256. What will happen then, if I need more color
>> steps?
>
> cm = get_cmap('...', 1024)
>
>> I do notice a(2) and a(2.2) returns different values. So I am
>> very confused about the principle how the RGBA value is generated by
>> the colormaps.
>
> It's the "magic" to distinguish between integer (in the LUT range) and
> float (in [0.0, 1.0]). 2 gives the LUT entry 2, 2.0 will give the
> upper value since it's > 1, as will 2.2 do. Try 0.5, and 0.6, or 0.0
> and 0.1.
>
> Actually I cannot reproduce your error on a recently (some weeks ago)
> checked-out GitHub repo version of mpl 1.0.0. Please provide
> mpl.__version__ so that we check if that's the reason - as simple as
> it might be.
>
> MacBook-Pro-Friedrich:Report Friedrich$ python
> Python 2.6.5 (r265:79063, Jul 18 2010, 12:14:53)
> [GCC 4.2.1 (Apple Inc. build 5659)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import matplotlib.cm
>>>> cm = matplotlib.cm.get_cmap('gist_rainbow')
>>>> cm(range(256))
> array([[ 1. , 0. , 0.16 , 1. ],
> [ 1. , 0. , 0.13908497, 1. ],
> [ 1. , 0. , 0.11816993, 1. ],
> ...,
> [ 1. , 0. , 0.79262575, 1. ],
> [ 1. , 0. , 0.77131287, 1. ],
> [ 1. , 0. , 0.75 , 1. ]])
>>>> print matplotlib.__version__
> 1.0.0
>
> The attribute of the cm where the error occurs on your machine is set
> to a valid value for me. I also cannot find any code path leading to
> a wrong initialisation of the attribute. Might be that the data the
> cm is init'ed from changed. There is a code path initialising the cm
> from a tuple (your attribute was a tuple used like a dict), but this
> works too: (terrain is such an example):
>
>>>> cm = matplotlib.cm.get_cmap('terrain')
>>>> cm(range(256))
> array([[ 0.2 , 0.2 , 0.6 , 1. ],
> [ 0.19477124, 0.21045752, 0.61045752, 1. ],
> [ 0.18954248, 0.22091503, 0.62091503, 1. ],
> ...,
> [ 0.98431373, 0.97992157, 0.97898039, 1. ],
> [ 0.99215686, 0.98996078, 0.9894902 , 1. ],
> [ 1. , 1. , 1. , 1. ]])
>
> Might be that there was 'red' misspelled in gist_rainbow in you mpl
> version, this may explain the behaviour if we track it down. Can you
> do the following to verify this:
>
> import matplotlib._cm
> print matplotlib._cm._gist_stern_data
>
> ? Thx,
> Friedrich
>
Thanks a lot for your detailed response!
In previous posts I did give the version: '1.0.svn'. Then I installed
the latest stable version. Here is the version info:
>>> print matplotlib.__version__
1.0.0
However, the error is still there.
You could not reproduce the error in your code, because you did not
specify 'lut' when you call get_cmap
try this:
maps=[m for m in matplotlib.cm.datad if not m.endswith("_r")]
for i in maps:
try:
a=matplotlib.cm.get_cmap(i,256)(range(256))
except:
(type, value, traceback) = sys.exc_info()
print "Problems to create %s" % (i,)
print "The error was --> %s: %s" % (type, value)
u will reproduce the error.
Thanks very much to point out I could actually print the colormap
definition-data.
I printed all of them, and found out the colormaps invoking errors are
all tuples but not dictionaries and all other colormaps are actually
dictionaries.
###Examples without Errors###
###They are all dictionaries###
print matplotlib._cm._gist_stern_data
{'blue': ((0.0, 0.0, 0.0), (0.5, 1.0, 1.0), (0.73499999999999999, 0.0,
0.0), (1.0, 1.0, 1.0)), 'green': ((0, 0, 0), (1, 1, 1)), 'red': ((0.0,
0.0, 0.0), (0.054699999999999999, 1.0, 1.0), (0.25, 0.027, 0.25),
(1.0, 1.0, 1.0))}
print matplotlib._cm._jet_data
{'blue': ((0.0, 0.5, 0.5), (0.11, 1, 1), (0.34000000000000002, 1, 1),
(0.65000000000000002, 0, 0), (1, 0, 0)), 'green': ((0.0, 0, 0),
(0.125, 0, 0), (0.375, 1, 1), (0.64000000000000001, 1, 1),
(0.91000000000000003, 0, 0), (1, 0, 0)), 'red': ((0.0, 0, 0),
(0.34999999999999998, 0, 0), (0.66000000000000003, 1, 1),
(0.89000000000000001, 1, 1), (1, 0.5, 0.5))}
###Colormaps invoking Errors###
###They are all Tuples###
Problems to create gist_rainbow
((0.0, (1.0, 0.0, 0.16)), (0.029999999999999999, (1.0, 0.0, 0.0)),
(0.215, (1.0, 1.0, 0.0)), (0.40000000000000002, (0.0, 1.0, 0.0)),
(0.58599999999999997, (0.0, 1.0, 1.0)), (0.77000000000000002, (0.0,
0.0, 1.0)), (0.95399999999999996, (1.0, 0.0, 1.0)), (1.0, (1.0, 0.0,
0.75)))
The error was --> <type 'exceptions.TypeError'>: tuple indices must be
integers, not str
Problems to create terrain
((0.0, (0.20000000000000001, 0.20000000000000001,
0.59999999999999998)), (0.14999999999999999, (0.0,
0.59999999999999998, 1.0)), (0.25, (0.0, 0.80000000000000004,
0.40000000000000002)), (0.5, (1.0, 1.0, 0.59999999999999998)), (0.75,
(0.5, 0.35999999999999999, 0.33000000000000002)), (1.0, (1.0, 1.0,
1.0)))
The error was --> <type 'exceptions.TypeError'>: tuple indices must be
integers, not str
Problems to create bwr
((0.0, 0.0, 1.0), (1.0, 1.0, 1.0), (1.0, 0.0, 0.0))
The error was --> <type 'exceptions.TypeError'>: tuple indices must be
integers, not str
Problems to create brg
((0.0, 0.0, 1.0), (1.0, 0.0, 0.0), (0.0, 1.0, 0.0))
The error was --> <type 'exceptions.TypeError'>: tuple indices must be
integers, not str
Problems to create seismic
((0.0, 0.0, 0.29999999999999999), (0.0, 0.0, 1.0), (1.0, 1.0, 1.0),
(1.0, 0.0, 0.0), (0.5, 0.0, 0.0))
The error was --> <type 'exceptions.TypeError'>: tuple indices must be
integers, not str
|
|
From: Jae-Joon L. <lee...@gm...> - 2010-10-18 11:49:56
|
A figure is a figure and an axes is an axes. They are NOT interchangeable. The AxesGrid essentially creates a list of axes. As you may already know, only figure class has an add_axes method. And axes can only be added to a figure. You cannot add an axes to another axes. Since I have no idea what kind of special plot your code creates, I can only suggest you to revise your code to take an axes instance as an input, not a figure instance. If you can, please post a simple, but complete code that demonstrate your problem. Regards, -JJ |