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
(27) |
2
(15) |
3
(2) |
4
(4) |
5
(5) |
6
(9) |
7
(15) |
8
(24) |
9
(19) |
10
(7) |
11
(13) |
12
(26) |
13
(27) |
14
(17) |
15
(14) |
16
(12) |
17
(9) |
18
(12) |
19
(17) |
20
(19) |
21
(5) |
22
(5) |
23
(7) |
24
(4) |
25
(1) |
26
(9) |
27
(20) |
28
(5) |
29
(10) |
30
(12) |
31
(6) |
Not sure if this is a bug or a feature, but xlabel (and ylabel) doesn't honour the rcParams['font.size'] parameters. To see this: x = linspace(0,10) y = x**2 plot(x,y) xlabel("x, m") ylabel(r'y^2, m^2") rcParams['font.size'] = 20 ylabel(r'y$^{2},ドル m') this is different to ylabel(r'y$^{2},ドル m', fontsize=rcParams['font.size']) So, xlabel behaviours similarly; the fontsize parameter is honoured, but the default parameter, as set with rcParams['font.size'] is not. I would call this a bug, not a feature. Other info, as requested by the troubleshooting FAQ... will@jalfrezi:~$ uname -a Linux jalfrezi 3.0.0-16-generic #28-Ubuntu SMP Fri Jan 27 17:50:54 UTC 2012 i686 i686 i386 GNU/Linux (but also seen in Windows XP) matplotlib version 1.0.1 matplotlib obtained from the enthought python distribution Thanks, W -- Will Grainger wil...@gm...
Thanks for responding. It is 'sort of' good to know that it can't be explained as I just thought it was my incompetency! I tried the np rather than N but that made no differences. thanks again On Thu, Mar 15, 2012 at 7:48 AM, Benjamin Root <ben...@ou...> wrote: > > > On Tue, Mar 13, 2012 at 4:23 PM, questions anon <que...@gm...>wrote: > >> also I have tried running it on a different computer and the same error >> occurred >> >> >> On Wed, Mar 14, 2012 at 8:22 AM, questions anon <que...@gm... >> > wrote: >> >>> thanks for looking into this Goyo. >>> The complete code: >>> >>> >>> import numpy as N >>> import matplotlib.pyplot as plt >>> from numpy import ma as MA >>> from mpl_toolkits.basemap import Basemap >>> import os >>> >>> shapefile="E:/GIS_layers/DSE_REGIONS" >>> inputfile=r"d:/BoMdata/r19000117.txt" >>> outputfolder=r"d:/BoMdata/outputfolder" >>> >>> f=N.genfromtxt(inputfile, skip_header=6, dtype=float, names=True) >>> print f[0:5] >>> >>> >>> map = Basemap(projection='merc',llcrnrlat=-45,urcrnrlat=-9, >>> >>> llcrnrlon=111.975,urcrnrlon=156.525,lat_ts=0,resolution='i') >>> map.drawcoastlines() >>> map.drawstates() >>> map.readshapefile(shapefile, 'DSE_REGIONS') >>> >>> xi=N.linspace(111.975, 156.275, 886) >>> yi=N.linspace(-44.525, -9.975, 691) >>> x,y=map(*N.meshgrid(xi,yi)) >>> plt.title('rainfall') >>> CS = map.contourf(x,y, f, 15,cmap=plt.cm.jet) >>> l,b,w,h =0.1,0.1,0.8,0.8 >>> cax = plt.axes([l+w+0.025, b, 0.025, h]) >>> plt.colorbar(CS,cax=cax, drawedges=True) >>> plt.savefig((os.path.join(outputfolder, 'rainfall.png'))) >>> plt.show() >>> plt.close() >>> >>> >>> and the complete error: >>> >>> >>> Traceback (most recent call last): >>> File "d:/BoMdata/plotrainfall_v2.py", line 23, in <module> >>> >>> CS = map.contourf(x,y, f, 15,cmap=plt.cm.jet) >>> File "C:\Python27\lib\site-packages\mpl_toolkits\basemap\__init__.py", >>> line 3072, in contourf >>> >>> np.logical_or(outsidemask,np.logical_or(ma.getmaskarray(data),xymask)) >>> AttributeError: logical_or >>> >>> Any feedback/ideas will be greatly appreciated. >>> >>> >>> > Your error is very strange and it just simply should not be happening. On > a completely wild guess, could you try replacing "import numpy as N" with > "import numpy as np" and replace all instances of "N" with "np"? > > Ben Root > >
Michael, Sorry for not getting back to you sooner. Your email got a little buried in my inbox. From your build log, most of the dependencies for the backends are not available. Surprisingly, not even Tkinter. Could you take a look at this page and see if automatically installing dependencies help you out? (Note, if you built numpy from source, and other packages from source, then you will have to manually determine which dependencies you are missing and install). http://matplotlib.sourceforge.net/faq/installing_faq.html#source-install-from-git Cheers! Ben Root
On Tue, Mar 13, 2012 at 4:23 PM, questions anon <que...@gm...>wrote: > also I have tried running it on a different computer and the same error > occurred > > > On Wed, Mar 14, 2012 at 8:22 AM, questions anon <que...@gm...>wrote: > >> thanks for looking into this Goyo. >> The complete code: >> >> >> import numpy as N >> import matplotlib.pyplot as plt >> from numpy import ma as MA >> from mpl_toolkits.basemap import Basemap >> import os >> >> shapefile="E:/GIS_layers/DSE_REGIONS" >> inputfile=r"d:/BoMdata/r19000117.txt" >> outputfolder=r"d:/BoMdata/outputfolder" >> >> f=N.genfromtxt(inputfile, skip_header=6, dtype=float, names=True) >> print f[0:5] >> >> >> map = Basemap(projection='merc',llcrnrlat=-45,urcrnrlat=-9, >> llcrnrlon=111.975,urcrnrlon=156.525,lat_ts=0,resolution='i') >> map.drawcoastlines() >> map.drawstates() >> map.readshapefile(shapefile, 'DSE_REGIONS') >> >> xi=N.linspace(111.975, 156.275, 886) >> yi=N.linspace(-44.525, -9.975, 691) >> x,y=map(*N.meshgrid(xi,yi)) >> plt.title('rainfall') >> CS = map.contourf(x,y, f, 15,cmap=plt.cm.jet) >> l,b,w,h =0.1,0.1,0.8,0.8 >> cax = plt.axes([l+w+0.025, b, 0.025, h]) >> plt.colorbar(CS,cax=cax, drawedges=True) >> plt.savefig((os.path.join(outputfolder, 'rainfall.png'))) >> plt.show() >> plt.close() >> >> >> and the complete error: >> >> >> Traceback (most recent call last): >> File "d:/BoMdata/plotrainfall_v2.py", line 23, in <module> >> >> CS = map.contourf(x,y, f, 15,cmap=plt.cm.jet) >> File "C:\Python27\lib\site-packages\mpl_toolkits\basemap\__init__.py", >> line 3072, in contourf >> np.logical_or(outsidemask,np.logical_or(ma.getmaskarray(data),xymask)) >> AttributeError: logical_or >> >> Any feedback/ideas will be greatly appreciated. >> >> >> Your error is very strange and it just simply should not be happening. On a completely wild guess, could you try replacing "import numpy as N" with "import numpy as np" and replace all instances of "N" with "np"? Ben Root
On Wed, Mar 14, 2012 at 2:38 PM, kususe <ku...@in...> wrote: > > I got an error using the first subplot function because I have to specify 3 > parameters. > If i do it, I get that "AxesSubplot' object is not iterable" > I coded using 3 subplot functions, getting the same error. > > Thanks > K. > > Note that I wrote `subplots` with an "s", which is a different command than `subplot`. (You're really having problems with "s"s today :) BTW, would you mind interleaving or bottom-posting replies<http://en.wikipedia.org/wiki/Posting_style#Placement_of_replies>. It's a bit easier to follow the conversation that way. -Tony > > Tony Yu-3 wrote: > > > > On Wed, Mar 14, 2012 at 1:41 PM, kususe <ku...@in...> wrote: > > > >> > >> Thanks, it works. > >> But if the graph is just one in a figure. > >> > >> I created various graph and I wanna remove all ticks in all of X axis. > >> I coded: > >> > >> plt.subplot(3,1,1) > >> p1, = plt.plot(self.data0,self.data1) > >> ..... > >> plt.subplot(3,1,2) > >> p2, = plt.plot(self.data0,self.data2) > >> ..... > >> plt.subplot(3,1,3) > >> p3, = plt.plot(self.data0,self.data4) > >> ..... > >> > >> how can I work the problem out? > >> > > > > I would do the following (`subplots` requires mpl 1.0, I think): > > > > fig, axes = plt.subplots(ncols=3) > > ax1, ax2, ax3 = axes > > ax1.plot(x, y1) > > ... > > ax2.plot(x, y2) > > ... > > ax3.plot(x, y3) > > ... > > for ax in axes:\ > > ax.set_xticks([]) > > ... > > > > > > Cheers, > > -Tony > > > > Thanks in advance > >> K. > >> > >> > >> Tony Yu-3 wrote: > >> > > >> > On Wed, Mar 14, 2012 at 5:44 AM, kususe <ku...@in...> wrote: > >> > > >> >> > >> >> Hi folks, > >> >> I have a graph got using the subplot command. > >> >> I'd like to remove all ticks in X axis in all of graph. > >> >> > >> >> I used: plt.setp(plt.gca(),'XtickLabel',[]) > >> >> > >> >> but I get that: > >> >> > >> >> File "/usr/lib/pymodules/python2.6/matplotlib/artist.py", line 1169, > >> in > >> >> setp > >> >> func = getattr(o,funcName) > >> >> AttributeError: 'AxesSubplot' object has no attribute > 'set_xticklabel' > >> >> > >> >> Suggestions? > >> >> Thanks in advance > >> >> K > >> >> > >> >> > >> > You're missing an "s"; i.e. "xticklabels". Also, the more conventional > >> > pattern is to call the axes method, i.e.: > >> > > >> > >>> ax = plt.gca() > >> > >>> ax.set_xticklabels([]) > >> > > >> > or, if want to remove both labels and the tick-lines > >> > > >> > >>> ax.set_xticks([]) > >> > > >> > Best, > >> > -Tony > >> > > >> >
I got an error using the first subplot function because I have to specify 3 parameters. If i do it, I get that "AxesSubplot' object is not iterable" I coded using 3 subplot functions, getting the same error. Thanks K. Tony Yu-3 wrote: > > On Wed, Mar 14, 2012 at 1:41 PM, kususe <ku...@in...> wrote: > >> >> Thanks, it works. >> But if the graph is just one in a figure. >> >> I created various graph and I wanna remove all ticks in all of X axis. >> I coded: >> >> plt.subplot(3,1,1) >> p1, = plt.plot(self.data0,self.data1) >> ..... >> plt.subplot(3,1,2) >> p2, = plt.plot(self.data0,self.data2) >> ..... >> plt.subplot(3,1,3) >> p3, = plt.plot(self.data0,self.data4) >> ..... >> >> how can I work the problem out? >> > > I would do the following (`subplots` requires mpl 1.0, I think): > > fig, axes = plt.subplots(ncols=3) > ax1, ax2, ax3 = axes > ax1.plot(x, y1) > ... > ax2.plot(x, y2) > ... > ax3.plot(x, y3) > ... > for ax in axes:\ > ax.set_xticks([]) > ... > > > Cheers, > -Tony > > Thanks in advance >> K. >> >> >> Tony Yu-3 wrote: >> > >> > On Wed, Mar 14, 2012 at 5:44 AM, kususe <ku...@in...> wrote: >> > >> >> >> >> Hi folks, >> >> I have a graph got using the subplot command. >> >> I'd like to remove all ticks in X axis in all of graph. >> >> >> >> I used: plt.setp(plt.gca(),'XtickLabel',[]) >> >> >> >> but I get that: >> >> >> >> File "/usr/lib/pymodules/python2.6/matplotlib/artist.py", line 1169, >> in >> >> setp >> >> func = getattr(o,funcName) >> >> AttributeError: 'AxesSubplot' object has no attribute 'set_xticklabel' >> >> >> >> Suggestions? >> >> Thanks in advance >> >> K >> >> >> >> >> > You're missing an "s"; i.e. "xticklabels". Also, the more conventional >> > pattern is to call the axes method, i.e.: >> > >> > >>> ax = plt.gca() >> > >>> ax.set_xticklabels([]) >> > >> > or, if want to remove both labels and the tick-lines >> > >> > >>> ax.set_xticks([]) >> > >> > Best, >> > -Tony >> > >> > >> ------------------------------------------------------------------------------ >> > Virtualization & Cloud Management Using Capacity Planning >> > Cloud computing makes use of virtualization - but cloud computing >> > also focuses on allowing computing to be delivered as a service. >> > http://www.accelacomm.com/jaw/sfnl/114/51521223/ >> > _______________________________________________ >> > Matplotlib-users mailing list >> > Mat...@li... >> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > >> > >> -- >> View this message in context: >> http://old.nabble.com/How-to-remove-x-axis-in-a-subplotted-graph-tp33500598p33504036.html >> Sent from the matplotlib - users mailing list archive at Nabble.com. >> >> >> >> ------------------------------------------------------------------------------ >> Virtualization & Cloud Management Using Capacity Planning >> Cloud computing makes use of virtualization - but cloud computing >> also focuses on allowing computing to be delivered as a service. >> http://www.accelacomm.com/jaw/sfnl/114/51521223/ >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > ------------------------------------------------------------------------------ > Virtualization & Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- View this message in context: http://old.nabble.com/How-to-remove-x-axis-in-a-subplotted-graph-tp33500598p33504472.html Sent from the matplotlib - users mailing list archive at Nabble.com.
On Wed, Mar 14, 2012 at 2:16 PM, Aman Thakral <ama...@gm...>wrote: > I recently upgrade to Python 2.7 (I used EPD Free for the install which > comes with matplotlib 1.1.0) and I'm getting the following error when I try > to plot dates. I've tried a few different backends, but they all seem to > give the same error. I had no issues using Python 2.6 up to now. I think > this may have to do with the new requirement in Python 2.7 that if you > passed a float to a function that was defined as an int, it now raises a > TypeError (instead of a DeprecationWarning). > > Traceback (most recent call last): > File "C:\Python27\lib\site-packages\matplotlib\backends\backend_wx.py", > line 1289, in _onLeftButtonDown > FigureCanvasBase.button_press_event(self, x, y, 1, guiEvent=evt) > File "C:\Python27\lib\site-packages\matplotlib\backend_bases.py", line > 1632, in button_press_event > self.callbacks.process(s, mouseevent) > File "C:\Python27\lib\site-packages\matplotlib\cbook.py", line 256, in > process > proxy(*args, **kwargs) > File "C:\Python27\lib\site-packages\matplotlib\cbook.py", line 189, in > __call__ > return mtd(*args, **kwargs) > File "C:\Python27\lib\site-packages\matplotlib\backend_bases.py", line > 1522, in pick > self.figure.pick(mouseevent) > File "C:\Python27\lib\site-packages\matplotlib\artist.py", line 332, in > pick > a.pick(mouseevent) > File "C:\Python27\lib\site-packages\matplotlib\axes.py", line 3038, in > pick > martist.Artist.pick(self,args[0]) > File "C:\Python27\lib\site-packages\matplotlib\artist.py", line 332, in > pick > a.pick(mouseevent) > File "C:\Python27\lib\site-packages\matplotlib\artist.py", line 321, in > pick > self.figure.canvas.pick_event(mouseevent, self, **prop) > File "C:\Python27\lib\site-packages\matplotlib\backend_bases.py", line > 1598, in pick_event > self.callbacks.process(s, event) > File "C:\Python27\lib\site-packages\matplotlib\cbook.py", line 256, in > process > proxy(*args, **kwargs) > File "C:\Python27\lib\site-packages\matplotlib\cbook.py", line 189, in > __call__ > return mtd(*args, **kwargs) > File "C:\src\QC_DUAL\src\QC_DUAL\databrowser.py", line 284, in onpick > self.fig.canvas.draw() > File > "C:\Python27\lib\site-packages\matplotlib\backends\backend_wxagg.py", line > 59, in draw > FigureCanvasAgg.draw(self) > File "C:\Python27\lib\site-packages\matplotlib\backends\backend_agg.py", > line 401, in draw > self.figure.draw(self.renderer) > File "C:\Python27\lib\site-packages\matplotlib\artist.py", line 55, in > draw_wrapper > draw(artist, renderer, *args, **kwargs) > File "C:\Python27\lib\site-packages\matplotlib\figure.py", line 884, in > draw > func(*args) > File "C:\Python27\lib\site-packages\matplotlib\artist.py", line 55, in > draw_wrapper > draw(artist, renderer, *args, **kwargs) > File "C:\Python27\lib\site-packages\matplotlib\axes.py", line 1983, in > draw > a.draw(renderer) > File "C:\Python27\lib\site-packages\matplotlib\artist.py", line 55, in > draw_wrapper > draw(artist, renderer, *args, **kwargs) > File "C:\Python27\lib\site-packages\matplotlib\axis.py", line 1036, in > draw > ticks_to_draw = self._update_ticks(renderer) > File "C:\Python27\lib\site-packages\matplotlib\axis.py", line 926, in > _update_ticks > tick_tups = [ t for t in self.iter_ticks()] > File "C:\Python27\lib\site-packages\matplotlib\axis.py", line 873, in > iter_ticks > majorLocs = self.major.locator() > File "C:\Python27\lib\site-packages\matplotlib\dates.py", line 594, in > __call__ > dates = self.rule.between(dmin, dmax, True) > File "C:\Python27\lib\site-packages\dateutil\rrule.py", line 207, in > between > for i in gen: > File "C:\Python27\lib\site-packages\dateutil\rrule.py", line 451, in > _iter > dayset, start, end = getdayset(year, month, day) > File "C:\Python27\lib\site-packages\dateutil\rrule.py", line 797, in > ddayset > i = datetime.date(year, month, day).toordinal()-self.yearordinal > TypeError: integer argument expected, got float > Ok, so I managed to track this down. Apparently I was using a float instead of an int in the interval argument of the HourLocator. I think casting to the interval argument to int in the dates.HourLocator class would be a good idea so users not familiar with the nuance won't have to deal with this headache.
I recently upgrade to Python 2.7 (I used EPD Free for the install which comes with matplotlib 1.1.0) and I'm getting the following error when I try to plot dates. I've tried a few different backends, but they all seem to give the same error. I had no issues using Python 2.6 up to now. I think this may have to do with the new requirement in Python 2.7 that if you passed a float to a function that was defined as an int, it now raises a TypeError (instead of a DeprecationWarning). Traceback (most recent call last): File "C:\Python27\lib\site-packages\matplotlib\backends\backend_wx.py", line 1289, in _onLeftButtonDown FigureCanvasBase.button_press_event(self, x, y, 1, guiEvent=evt) File "C:\Python27\lib\site-packages\matplotlib\backend_bases.py", line 1632, in button_press_event self.callbacks.process(s, mouseevent) File "C:\Python27\lib\site-packages\matplotlib\cbook.py", line 256, in process proxy(*args, **kwargs) File "C:\Python27\lib\site-packages\matplotlib\cbook.py", line 189, in __call__ return mtd(*args, **kwargs) File "C:\Python27\lib\site-packages\matplotlib\backend_bases.py", line 1522, in pick self.figure.pick(mouseevent) File "C:\Python27\lib\site-packages\matplotlib\artist.py", line 332, in pick a.pick(mouseevent) File "C:\Python27\lib\site-packages\matplotlib\axes.py", line 3038, in pick martist.Artist.pick(self,args[0]) File "C:\Python27\lib\site-packages\matplotlib\artist.py", line 332, in pick a.pick(mouseevent) File "C:\Python27\lib\site-packages\matplotlib\artist.py", line 321, in pick self.figure.canvas.pick_event(mouseevent, self, **prop) File "C:\Python27\lib\site-packages\matplotlib\backend_bases.py", line 1598, in pick_event self.callbacks.process(s, event) File "C:\Python27\lib\site-packages\matplotlib\cbook.py", line 256, in process proxy(*args, **kwargs) File "C:\Python27\lib\site-packages\matplotlib\cbook.py", line 189, in __call__ return mtd(*args, **kwargs) File "C:\src\QC_DUAL\src\QC_DUAL\databrowser.py", line 284, in onpick self.fig.canvas.draw() File "C:\Python27\lib\site-packages\matplotlib\backends\backend_wxagg.py", line 59, in draw FigureCanvasAgg.draw(self) File "C:\Python27\lib\site-packages\matplotlib\backends\backend_agg.py", line 401, in draw self.figure.draw(self.renderer) File "C:\Python27\lib\site-packages\matplotlib\artist.py", line 55, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "C:\Python27\lib\site-packages\matplotlib\figure.py", line 884, in draw func(*args) File "C:\Python27\lib\site-packages\matplotlib\artist.py", line 55, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "C:\Python27\lib\site-packages\matplotlib\axes.py", line 1983, in draw a.draw(renderer) File "C:\Python27\lib\site-packages\matplotlib\artist.py", line 55, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "C:\Python27\lib\site-packages\matplotlib\axis.py", line 1036, in draw ticks_to_draw = self._update_ticks(renderer) File "C:\Python27\lib\site-packages\matplotlib\axis.py", line 926, in _update_ticks tick_tups = [ t for t in self.iter_ticks()] File "C:\Python27\lib\site-packages\matplotlib\axis.py", line 873, in iter_ticks majorLocs = self.major.locator() File "C:\Python27\lib\site-packages\matplotlib\dates.py", line 594, in __call__ dates = self.rule.between(dmin, dmax, True) File "C:\Python27\lib\site-packages\dateutil\rrule.py", line 207, in between for i in gen: File "C:\Python27\lib\site-packages\dateutil\rrule.py", line 451, in _iter dayset, start, end = getdayset(year, month, day) File "C:\Python27\lib\site-packages\dateutil\rrule.py", line 797, in ddayset i = datetime.date(year, month, day).toordinal()-self.yearordinal TypeError: integer argument expected, got float
On Wed, Mar 14, 2012 at 1:41 PM, kususe <ku...@in...> wrote: > > Thanks, it works. > But if the graph is just one in a figure. > > I created various graph and I wanna remove all ticks in all of X axis. > I coded: > > plt.subplot(3,1,1) > p1, = plt.plot(self.data0,self.data1) > ..... > plt.subplot(3,1,2) > p2, = plt.plot(self.data0,self.data2) > ..... > plt.subplot(3,1,3) > p3, = plt.plot(self.data0,self.data4) > ..... > > how can I work the problem out? > I would do the following (`subplots` requires mpl 1.0, I think): fig, axes = plt.subplots(ncols=3) ax1, ax2, ax3 = axes ax1.plot(x, y1) ... ax2.plot(x, y2) ... ax3.plot(x, y3) ... for ax in axes:\ ax.set_xticks([]) ... Cheers, -Tony Thanks in advance > K. > > > Tony Yu-3 wrote: > > > > On Wed, Mar 14, 2012 at 5:44 AM, kususe <ku...@in...> wrote: > > > >> > >> Hi folks, > >> I have a graph got using the subplot command. > >> I'd like to remove all ticks in X axis in all of graph. > >> > >> I used: plt.setp(plt.gca(),'XtickLabel',[]) > >> > >> but I get that: > >> > >> File "/usr/lib/pymodules/python2.6/matplotlib/artist.py", line 1169, in > >> setp > >> func = getattr(o,funcName) > >> AttributeError: 'AxesSubplot' object has no attribute 'set_xticklabel' > >> > >> Suggestions? > >> Thanks in advance > >> K > >> > >> > > You're missing an "s"; i.e. "xticklabels". Also, the more conventional > > pattern is to call the axes method, i.e.: > > > > >>> ax = plt.gca() > > >>> ax.set_xticklabels([]) > > > > or, if want to remove both labels and the tick-lines > > > > >>> ax.set_xticks([]) > > > > Best, > > -Tony > > > > > ------------------------------------------------------------------------------ > > Virtualization & Cloud Management Using Capacity Planning > > Cloud computing makes use of virtualization - but cloud computing > > also focuses on allowing computing to be delivered as a service. > > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > -- > View this message in context: > http://old.nabble.com/How-to-remove-x-axis-in-a-subplotted-graph-tp33500598p33504036.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > > > ------------------------------------------------------------------------------ > Virtualization & Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
Thanks, it works. But if the graph is just one in a figure. I created various graph and I wanna remove all ticks in all of X axis. I coded: plt.subplot(3,1,1) p1, = plt.plot(self.data0,self.data1) ..... plt.subplot(3,1,2) p2, = plt.plot(self.data0,self.data2) ..... plt.subplot(3,1,3) p3, = plt.plot(self.data0,self.data4) ..... how can I work the problem out? Thanks in advance K. Tony Yu-3 wrote: > > On Wed, Mar 14, 2012 at 5:44 AM, kususe <ku...@in...> wrote: > >> >> Hi folks, >> I have a graph got using the subplot command. >> I'd like to remove all ticks in X axis in all of graph. >> >> I used: plt.setp(plt.gca(),'XtickLabel',[]) >> >> but I get that: >> >> File "/usr/lib/pymodules/python2.6/matplotlib/artist.py", line 1169, in >> setp >> func = getattr(o,funcName) >> AttributeError: 'AxesSubplot' object has no attribute 'set_xticklabel' >> >> Suggestions? >> Thanks in advance >> K >> >> > You're missing an "s"; i.e. "xticklabels". Also, the more conventional > pattern is to call the axes method, i.e.: > > >>> ax = plt.gca() > >>> ax.set_xticklabels([]) > > or, if want to remove both labels and the tick-lines > > >>> ax.set_xticks([]) > > Best, > -Tony > > ------------------------------------------------------------------------------ > Virtualization & Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- View this message in context: http://old.nabble.com/How-to-remove-x-axis-in-a-subplotted-graph-tp33500598p33504036.html Sent from the matplotlib - users mailing list archive at Nabble.com.
You could download the examples from http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.1.0/, and that should solve your problem once and for all. Cheers, Zoltán > > > On Wed, Mar 14, 2012 at 9:58 AM, Jonathan Slavin > <js...@cf... <mailto:js...@cf...>> wrote: > > Hi, > > Recently on several occasions I have gotten the response "Too many > requests, please try again later." when trying to go to a matplotlib > webpage. Have others experienced this also? Is this a problem with > sourceforge? I'm wondering what could be done about this. It's very > annoying when, for example, you want to see the source code for some > useful example and you have to try back several times to get to the > page. > > Jon > -- > __________________________________________________ > > > No insights here, just confirmation: I've also gotten this error > message a few times over the last few weeks. > > -Tony > >
On Wed, Mar 14, 2012 at 9:58 AM, Jonathan Slavin <js...@cf...>wrote: > Hi, > > Recently on several occasions I have gotten the response "Too many > requests, please try again later." when trying to go to a matplotlib > webpage. Have others experienced this also? Is this a problem with > sourceforge? I'm wondering what could be done about this. It's very > annoying when, for example, you want to see the source code for some > useful example and you have to try back several times to get to the > page. > > Jon > -- > __________________________________________________ > > No insights here, just confirmation: I've also gotten this error message a few times over the last few weeks. -Tony
On Wed, Mar 14, 2012 at 5:44 AM, kususe <ku...@in...> wrote: > > Hi folks, > I have a graph got using the subplot command. > I'd like to remove all ticks in X axis in all of graph. > > I used: plt.setp(plt.gca(),'XtickLabel',[]) > > but I get that: > > File "/usr/lib/pymodules/python2.6/matplotlib/artist.py", line 1169, in > setp > func = getattr(o,funcName) > AttributeError: 'AxesSubplot' object has no attribute 'set_xticklabel' > > Suggestions? > Thanks in advance > K > > You're missing an "s"; i.e. "xticklabels". Also, the more conventional pattern is to call the axes method, i.e.: >>> ax = plt.gca() >>> ax.set_xticklabels([]) or, if want to remove both labels and the tick-lines >>> ax.set_xticks([]) Best, -Tony
On Wed, Mar 14, 2012 at 6:02 AM, kususe <ku...@in...> wrote: > > Hi folks, > I've to draw an arrow. > I used Arrow() function: > > pa.Arrow(0, 0, x, y, width=1.0) > > where I imported > > matplotlib.patches as pa > > Now, how to use plot() function di display the figure? > > Tanks in advance, > K. > -- > View this message in context: > http://old.nabble.com/How-to-draw-an-arrow-tp33500720p33500720.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > Hi, You need to add the patch to the current axes. For example, #~~~ import matplotlib.pyplot as plt from matplotlib import patches arr = patches.Arrow(0,0,1,1) ax = plt.gca() ax.add_patch(arr) plt.show() #~~~ When you create a Matplotlib artist (here a `Patch` artist) with pyplot (e.g. `plt.plot` creates a Line2D instance), pyplot takes care of matching artist with axes. Artists themselves don't know anything about where you're plotting, so you have to tell it where to go. -Tony
Hi, Recently on several occasions I have gotten the response "Too many requests, please try again later." when trying to go to a matplotlib webpage. Have others experienced this also? Is this a problem with sourceforge? I'm wondering what could be done about this. It's very annoying when, for example, you want to see the source code for some useful example and you have to try back several times to get to the page. Jon -- ______________________________________________________________ Jonathan D. Slavin Harvard-Smithsonian CfA js...@cf... 60 Garden Street, MS 83 phone: (617) 496-7981 Cambridge, MA 02138-1516 cell: (781) 363-0035 USA ______________________________________________________________
Hi folks, I've to draw an arrow. I used Arrow() function: pa.Arrow(0, 0, x, y, width=1.0) where I imported matplotlib.patches as pa Now, how to use plot() function di display the figure? Tanks in advance, K. -- View this message in context: http://old.nabble.com/How-to-draw-an-arrow-tp33500720p33500720.html Sent from the matplotlib - users mailing list archive at Nabble.com.
Hi folks, I have a graph got using the subplot command. I'd like to remove all ticks in X axis in all of graph. I used: plt.setp(plt.gca(),'XtickLabel',[]) but I get that: File "/usr/lib/pymodules/python2.6/matplotlib/artist.py", line 1169, in setp func = getattr(o,funcName) AttributeError: 'AxesSubplot' object has no attribute 'set_xticklabel' Suggestions? Thanks in advance K -- View this message in context: http://old.nabble.com/How-to-remove-x-axis-in-a-subplotted-graph-tp33500598p33500598.html Sent from the matplotlib - users mailing list archive at Nabble.com.