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
(3) |
2
|
3
|
4
(1) |
5
(3) |
6
(1) |
7
(4) |
8
(6) |
9
(5) |
10
(2) |
11
(3) |
12
(6) |
13
|
14
|
15
(9) |
16
(11) |
17
(4) |
18
(3) |
19
(1) |
20
(2) |
21
(2) |
22
(13) |
23
(4) |
24
(2) |
25
(7) |
26
(1) |
27
(3) |
28
(1) |
29
(2) |
30
(3) |
|
|
|
|
On Sep 16, 2014, at 11:31 AM, Xiaobo Yang <xia...@gm...> wrote: > Hi, > > My X axis represents dates. When I used get_xlim(), I got something like 735461.0 and 735490.5. What are these values? How can I convert to python date objects? > > Many thanks, > Tom See the matplotlib dates documentation at http://matplotlib.org/api/dates_api.html
Le 16/09/2014 17:31, Xiaobo Yang a écrit : > My X axis represents dates. When I used get_xlim(), I got something > like 735461.0 and 735490.5. What are these values? How can I convert > to python date objects? Please, read the documentation of datetime. Your data are *ordinals*, numbers which pack the data: year, month, etc. into one number ; the same strategy is used in spreadsheets, e.g., Excel. If r=r=735461, then datetime.fromordinal(r) gives: datetime.datetime(2014, 8, 16, 0, 0), unless I am mistaken... == This is the first approximation ... the "proleptic Gregorian ordinals" are integers. You have floats, and this probably is converted into fractions of a day / hour, etc. Read also something about timestamps. Regards. Jerzy Karczmarczuk
Hi, My X axis represents dates. When I used get_xlim(), I got something like 735461.0 and 735490.5. What are these values? How can I convert to python date objects? Many thanks, Tom
Just posted some small code under https://github.com/matplotlib/matplotlib/issues/3522 I guess the formatting is not up to standards, but I did not find another way to attach the code... Cheers, Gerd On 16.09.2014 15:29, Benjamin Root wrote: > Perhaps something is odd with the date values you have? Can you make > an SSCCE (sscce.org <http://sscce.org>)that demonstrates the problem? > There is definitely some sort of bug at play here. > > Cheers! > Ben Root > > On Tue, Sep 16, 2014 at 9:20 AM, Gerd Wellenreuther > <Ger...@xf... <mailto:Ger...@xf...>> wrote: > > Tried this before, I think, here is the traceback (it is kind of > different) - maybe it tells some of you where to look at IF this > should really be a bug: > > >> Traceback (most recent call last): >> File "C:\Users\gwellenr\Desktop\Test_Sabine\Plot_csv.py", line >> 187, in <module> >> matplotlib.pyplot.savefig(save_path+'test.png') >> File "C:\Python27\lib\site-packages\matplotlib\pyplot.py", line >> 561, in savefig >> return fig.savefig(*args, **kwargs) >> File "C:\Python27\lib\site-packages\matplotlib\figure.py", line >> 1421, in savefig >> self.canvas.print_figure(*args, **kwargs) >> File >> "C:\Python27\lib\site-packages\matplotlib\backend_bases.py", line >> 2220, in print_figure >> **kwargs) >> File >> "C:\Python27\lib\site-packages\matplotlib\backends\backend_agg.py", >> line 505, in print_png >> FigureCanvasAgg.draw(self) >> File >> "C:\Python27\lib\site-packages\matplotlib\backends\backend_agg.py", >> line 451, 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 >> 1034, 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 >> 2086, 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 >> 1091, in draw >> ticks_to_draw = self._update_ticks(renderer) >> File "C:\Python27\lib\site-packages\matplotlib\axis.py", line >> 945, in _update_ticks >> tick_tups = [t for t in self.iter_ticks()] >> File "C:\Python27\lib\site-packages\matplotlib\axis.py", line >> 889, in iter_ticks >> majorLocs = self.major.locator() >> File "C:\Python27\lib\site-packages\matplotlib\dates.py", line >> 802, in __call__ >> self.refresh() >> File "C:\Python27\lib\site-packages\matplotlib\dates.py", line >> 820, in refresh >> self._locator = self.get_locator(dmin, dmax) >> File "C:\Python27\lib\site-packages\matplotlib\dates.py", line >> 896, in get_locator >> raise ValueError('No sensible date limit could be found in the ' >> ValueError: No sensible date limit could be found in the >> AutoDateLocator. > > Cheers, Gerd > > > On 16.09.2014 13:45, Joe Kington wrote: >> A quick way to do this is ``ax.invert_yaxis()`` (and >> invert_xaxis() for the x-axis). That way you preserve >> auto-scaling and don't wind up with manually set axis limits. >> >> What you did should have worked, but ``ymin`` and ``ymax`` are >> probably datetime objects. ``ylim`` isn't smart enough to convert >> them to the datetime units that matplotlib uses internally. >> >> Hope that helps! >> -Joe >> >> On Tue, Sep 16, 2014 at 4:00 AM, Gerd Wellenreuther >> <Ger...@xf... <mailto:Ger...@xf...>> >> wrote: >> >> Dear all, >> >> I hope some of you could help me out. I am currently trying >> to generate >> some timetables using matplotlib.pyplot.plot_date, having the >> time-axis >> on the y-axis. Typically, one would like to read these plots >> from top to >> bottom, from older to newer items (future on the bottom). >> Unfortunately, >> the default enumeration of the y-axis is the other way >> around, and it >> resists my attempts to invert its direction e.g. by changing >> limits >> using matplotlib.pyplot.ylim (Traceback below). I found a >> quite old >> entry in stackoverflow which is most probably outdated, at >> least the >> proposed solution did not work for me... >> (http://stackoverflow.com/questions/5804969/displaying-an-inverted-vertical-date-axis). >> >> Since the longish traceback seems to try to tell me I did not >> understand >> some kind of important - even trivial - point about those >> datetime-axis >> maybe some of you came about this problem before? >> >> Thanks, Gerd >> >> P.S.: Traceback after trying to use something like >> "matplotlib.pyplot.ylim(ymax,ymin)": >> > Traceback (most recent call last): >> > File "C:\Users\gwellenr\Desktop\Test_Sabine\Plot_csv.py", >> line 187, >> > in <module> >> > matplotlib.pyplot.savefig(save_path+'test.png') >> > File >> "C:\Python27\lib\site-packages\matplotlib\pyplot.py", line 561, >> > in savefig >> > return fig.savefig(*args, **kwargs) >> > File >> "C:\Python27\lib\site-packages\matplotlib\figure.py", line >> > 1421, in savefig >> > self.canvas.print_figure(*args, **kwargs) >> > File >> "C:\Python27\lib\site-packages\matplotlib\backend_bases.py", >> > line 2220, in print_figure >> > **kwargs) >> > File >> > >> "C:\Python27\lib\site-packages\matplotlib\backends\backend_agg.py", >> > line 505, in print_png >> > FigureCanvasAgg.draw(self) >> > File >> > >> "C:\Python27\lib\site-packages\matplotlib\backends\backend_agg.py", >> > line 451, 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 >> > 1034, 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 2086, >> > 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 1091, >> > in draw >> > ticks_to_draw = self._update_ticks(renderer) >> > File "C:\Python27\lib\site-packages\matplotlib\axis.py", >> line 945, >> > in _update_ticks >> > tick_tups = [t for t in self.iter_ticks()] >> > File "C:\Python27\lib\site-packages\matplotlib\axis.py", >> line 889, >> > in iter_ticks >> > majorLocs = self.major.locator() >> > File "C:\Python27\lib\site-packages\matplotlib\dates.py", >> line 802, >> > in __call__ >> > self.refresh() >> > File "C:\Python27\lib\site-packages\matplotlib\dates.py", >> line 820, >> > in refresh >> > self._locator = self.get_locator(dmin, dmax) >> > File "C:\Python27\lib\site-packages\matplotlib\dates.py", >> line 896, >> > in get_locator >> > raise ValueError('No sensible date limit could be found >> in the ' >> > ValueError: No sensible date limit could be found in the >> AutoDateLocator. >> >> >> ------------------------------------------------------------------------------ >> Want excitement? >> Manually upgrade your production database. >> When you want reliability, choose Perforce. >> Perforce version control. Predictably reliable. >> http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> <mailto:Mat...@li...> >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> > > > ------------------------------------------------------------------------------ > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce. > Perforce version control. Predictably reliable. > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > <mailto:Mat...@li...> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >
Perhaps something is odd with the date values you have? Can you make an SSCCE (sscce.org)that demonstrates the problem? There is definitely some sort of bug at play here. Cheers! Ben Root On Tue, Sep 16, 2014 at 9:20 AM, Gerd Wellenreuther < Ger...@xf...> wrote: > Tried this before, I think, here is the traceback (it is kind of > different) - maybe it tells some of you where to look at IF this should > really be a bug: > > > Traceback (most recent call last): > File "C:\Users\gwellenr\Desktop\Test_Sabine\Plot_csv.py", line 187, in > <module> > matplotlib.pyplot.savefig(save_path+'test.png') > File "C:\Python27\lib\site-packages\matplotlib\pyplot.py", line 561, in > savefig > return fig.savefig(*args, **kwargs) > File "C:\Python27\lib\site-packages\matplotlib\figure.py", line 1421, in > savefig > self.canvas.print_figure(*args, **kwargs) > File "C:\Python27\lib\site-packages\matplotlib\backend_bases.py", line > 2220, in print_figure > **kwargs) > File "C:\Python27\lib\site-packages\matplotlib\backends\backend_agg.py", > line 505, in print_png > FigureCanvasAgg.draw(self) > File "C:\Python27\lib\site-packages\matplotlib\backends\backend_agg.py", > line 451, 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 1034, 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 2086, 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 1091, in > draw > ticks_to_draw = self._update_ticks(renderer) > File "C:\Python27\lib\site-packages\matplotlib\axis.py", line 945, in > _update_ticks > tick_tups = [t for t in self.iter_ticks()] > File "C:\Python27\lib\site-packages\matplotlib\axis.py", line 889, in > iter_ticks > majorLocs = self.major.locator() > File "C:\Python27\lib\site-packages\matplotlib\dates.py", line 802, in > __call__ > self.refresh() > File "C:\Python27\lib\site-packages\matplotlib\dates.py", line 820, in > refresh > self._locator = self.get_locator(dmin, dmax) > File "C:\Python27\lib\site-packages\matplotlib\dates.py", line 896, in > get_locator > raise ValueError('No sensible date limit could be found in the ' > ValueError: No sensible date limit could be found in the AutoDateLocator. > > > Cheers, Gerd > > > On 16.09.2014 13:45, Joe Kington wrote: > > A quick way to do this is ``ax.invert_yaxis()`` (and invert_xaxis() for > the x-axis). That way you preserve auto-scaling and don't wind up with > manually set axis limits. > > What you did should have worked, but ``ymin`` and ``ymax`` are probably > datetime objects. ``ylim`` isn't smart enough to convert them to the > datetime units that matplotlib uses internally. > > Hope that helps! > -Joe > > On Tue, Sep 16, 2014 at 4:00 AM, Gerd Wellenreuther < > Ger...@xf...> wrote: > >> Dear all, >> >> I hope some of you could help me out. I am currently trying to generate >> some timetables using matplotlib.pyplot.plot_date, having the time-axis >> on the y-axis. Typically, one would like to read these plots from top to >> bottom, from older to newer items (future on the bottom). Unfortunately, >> the default enumeration of the y-axis is the other way around, and it >> resists my attempts to invert its direction e.g. by changing limits >> using matplotlib.pyplot.ylim (Traceback below). I found a quite old >> entry in stackoverflow which is most probably outdated, at least the >> proposed solution did not work for me... >> ( >> http://stackoverflow.com/questions/5804969/displaying-an-inverted-vertical-date-axis >> ). >> >> Since the longish traceback seems to try to tell me I did not understand >> some kind of important - even trivial - point about those datetime-axis >> maybe some of you came about this problem before? >> >> Thanks, Gerd >> >> P.S.: Traceback after trying to use something like >> "matplotlib.pyplot.ylim(ymax,ymin)": >> > Traceback (most recent call last): >> > File "C:\Users\gwellenr\Desktop\Test_Sabine\Plot_csv.py", line 187, >> > in <module> >> > matplotlib.pyplot.savefig(save_path+'test.png') >> > File "C:\Python27\lib\site-packages\matplotlib\pyplot.py", line 561, >> > in savefig >> > return fig.savefig(*args, **kwargs) >> > File "C:\Python27\lib\site-packages\matplotlib\figure.py", line >> > 1421, in savefig >> > self.canvas.print_figure(*args, **kwargs) >> > File "C:\Python27\lib\site-packages\matplotlib\backend_bases.py", >> > line 2220, in print_figure >> > **kwargs) >> > File >> > "C:\Python27\lib\site-packages\matplotlib\backends\backend_agg.py", >> > line 505, in print_png >> > FigureCanvasAgg.draw(self) >> > File >> > "C:\Python27\lib\site-packages\matplotlib\backends\backend_agg.py", >> > line 451, 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 >> > 1034, 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 2086, >> > 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 1091, >> > in draw >> > ticks_to_draw = self._update_ticks(renderer) >> > File "C:\Python27\lib\site-packages\matplotlib\axis.py", line 945, >> > in _update_ticks >> > tick_tups = [t for t in self.iter_ticks()] >> > File "C:\Python27\lib\site-packages\matplotlib\axis.py", line 889, >> > in iter_ticks >> > majorLocs = self.major.locator() >> > File "C:\Python27\lib\site-packages\matplotlib\dates.py", line 802, >> > in __call__ >> > self.refresh() >> > File "C:\Python27\lib\site-packages\matplotlib\dates.py", line 820, >> > in refresh >> > self._locator = self.get_locator(dmin, dmax) >> > File "C:\Python27\lib\site-packages\matplotlib\dates.py", line 896, >> > in get_locator >> > raise ValueError('No sensible date limit could be found in the ' >> > ValueError: No sensible date limit could be found in the >> AutoDateLocator. >> >> >> >> ------------------------------------------------------------------------------ >> Want excitement? >> Manually upgrade your production database. >> When you want reliability, choose Perforce. >> Perforce version control. Predictably reliable. >> >> http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > > > > ------------------------------------------------------------------------------ > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce. > Perforce version control. Predictably reliable. > > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >
Tried this before, I think, here is the traceback (it is kind of different) - maybe it tells some of you where to look at IF this should really be a bug: > Traceback (most recent call last): > File "C:\Users\gwellenr\Desktop\Test_Sabine\Plot_csv.py", line 187, > in <module> > matplotlib.pyplot.savefig(save_path+'test.png') > File "C:\Python27\lib\site-packages\matplotlib\pyplot.py", line 561, > in savefig > return fig.savefig(*args, **kwargs) > File "C:\Python27\lib\site-packages\matplotlib\figure.py", line > 1421, in savefig > self.canvas.print_figure(*args, **kwargs) > File "C:\Python27\lib\site-packages\matplotlib\backend_bases.py", > line 2220, in print_figure > **kwargs) > File > "C:\Python27\lib\site-packages\matplotlib\backends\backend_agg.py", > line 505, in print_png > FigureCanvasAgg.draw(self) > File > "C:\Python27\lib\site-packages\matplotlib\backends\backend_agg.py", > line 451, 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 > 1034, 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 2086, > 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 1091, > in draw > ticks_to_draw = self._update_ticks(renderer) > File "C:\Python27\lib\site-packages\matplotlib\axis.py", line 945, > in _update_ticks > tick_tups = [t for t in self.iter_ticks()] > File "C:\Python27\lib\site-packages\matplotlib\axis.py", line 889, > in iter_ticks > majorLocs = self.major.locator() > File "C:\Python27\lib\site-packages\matplotlib\dates.py", line 802, > in __call__ > self.refresh() > File "C:\Python27\lib\site-packages\matplotlib\dates.py", line 820, > in refresh > self._locator = self.get_locator(dmin, dmax) > File "C:\Python27\lib\site-packages\matplotlib\dates.py", line 896, > in get_locator > raise ValueError('No sensible date limit could be found in the ' > ValueError: No sensible date limit could be found in the AutoDateLocator. Cheers, Gerd On 16.09.2014 13:45, Joe Kington wrote: > A quick way to do this is ``ax.invert_yaxis()`` (and invert_xaxis() > for the x-axis). That way you preserve auto-scaling and don't wind up > with manually set axis limits. > > What you did should have worked, but ``ymin`` and ``ymax`` are > probably datetime objects. ``ylim`` isn't smart enough to convert > them to the datetime units that matplotlib uses internally. > > Hope that helps! > -Joe > > On Tue, Sep 16, 2014 at 4:00 AM, Gerd Wellenreuther > <Ger...@xf... <mailto:Ger...@xf...>> wrote: > > Dear all, > > I hope some of you could help me out. I am currently trying to > generate > some timetables using matplotlib.pyplot.plot_date, having the > time-axis > on the y-axis. Typically, one would like to read these plots from > top to > bottom, from older to newer items (future on the bottom). > Unfortunately, > the default enumeration of the y-axis is the other way around, and it > resists my attempts to invert its direction e.g. by changing limits > using matplotlib.pyplot.ylim (Traceback below). I found a quite old > entry in stackoverflow which is most probably outdated, at least the > proposed solution did not work for me... > (http://stackoverflow.com/questions/5804969/displaying-an-inverted-vertical-date-axis). > > Since the longish traceback seems to try to tell me I did not > understand > some kind of important - even trivial - point about those > datetime-axis > maybe some of you came about this problem before? > > Thanks, Gerd > > P.S.: Traceback after trying to use something like > "matplotlib.pyplot.ylim(ymax,ymin)": > > Traceback (most recent call last): > > File "C:\Users\gwellenr\Desktop\Test_Sabine\Plot_csv.py", line > 187, > > in <module> > > matplotlib.pyplot.savefig(save_path+'test.png') > > File "C:\Python27\lib\site-packages\matplotlib\pyplot.py", > line 561, > > in savefig > > return fig.savefig(*args, **kwargs) > > File "C:\Python27\lib\site-packages\matplotlib\figure.py", line > > 1421, in savefig > > self.canvas.print_figure(*args, **kwargs) > > File "C:\Python27\lib\site-packages\matplotlib\backend_bases.py", > > line 2220, in print_figure > > **kwargs) > > File > > "C:\Python27\lib\site-packages\matplotlib\backends\backend_agg.py", > > line 505, in print_png > > FigureCanvasAgg.draw(self) > > File > > "C:\Python27\lib\site-packages\matplotlib\backends\backend_agg.py", > > line 451, 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 > > 1034, 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 > 2086, > > 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 > 1091, > > in draw > > ticks_to_draw = self._update_ticks(renderer) > > File "C:\Python27\lib\site-packages\matplotlib\axis.py", line 945, > > in _update_ticks > > tick_tups = [t for t in self.iter_ticks()] > > File "C:\Python27\lib\site-packages\matplotlib\axis.py", line 889, > > in iter_ticks > > majorLocs = self.major.locator() > > File "C:\Python27\lib\site-packages\matplotlib\dates.py", line > 802, > > in __call__ > > self.refresh() > > File "C:\Python27\lib\site-packages\matplotlib\dates.py", line > 820, > > in refresh > > self._locator = self.get_locator(dmin, dmax) > > File "C:\Python27\lib\site-packages\matplotlib\dates.py", line > 896, > > in get_locator > > raise ValueError('No sensible date limit could be found in the ' > > ValueError: No sensible date limit could be found in the > AutoDateLocator. > > > ------------------------------------------------------------------------------ > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce. > Perforce version control. Predictably reliable. > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > <mailto:Mat...@li...> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >
I would still consider this to be a bug, though. Gerd, could you please file a bug report? Cheers! Ben Root On Tue, Sep 16, 2014 at 7:45 AM, Joe Kington <jof...@gm...> wrote: > A quick way to do this is ``ax.invert_yaxis()`` (and invert_xaxis() for > the x-axis). That way you preserve auto-scaling and don't wind up with > manually set axis limits. > > What you did should have worked, but ``ymin`` and ``ymax`` are probably > datetime objects. ``ylim`` isn't smart enough to convert them to the > datetime units that matplotlib uses internally. > > Hope that helps! > -Joe > > On Tue, Sep 16, 2014 at 4:00 AM, Gerd Wellenreuther < > Ger...@xf...> wrote: > >> Dear all, >> >> I hope some of you could help me out. I am currently trying to generate >> some timetables using matplotlib.pyplot.plot_date, having the time-axis >> on the y-axis. Typically, one would like to read these plots from top to >> bottom, from older to newer items (future on the bottom). Unfortunately, >> the default enumeration of the y-axis is the other way around, and it >> resists my attempts to invert its direction e.g. by changing limits >> using matplotlib.pyplot.ylim (Traceback below). I found a quite old >> entry in stackoverflow which is most probably outdated, at least the >> proposed solution did not work for me... >> ( >> http://stackoverflow.com/questions/5804969/displaying-an-inverted-vertical-date-axis >> ). >> >> Since the longish traceback seems to try to tell me I did not understand >> some kind of important - even trivial - point about those datetime-axis >> maybe some of you came about this problem before? >> >> Thanks, Gerd >> >> P.S.: Traceback after trying to use something like >> "matplotlib.pyplot.ylim(ymax,ymin)": >> > Traceback (most recent call last): >> > File "C:\Users\gwellenr\Desktop\Test_Sabine\Plot_csv.py", line 187, >> > in <module> >> > matplotlib.pyplot.savefig(save_path+'test.png') >> > File "C:\Python27\lib\site-packages\matplotlib\pyplot.py", line 561, >> > in savefig >> > return fig.savefig(*args, **kwargs) >> > File "C:\Python27\lib\site-packages\matplotlib\figure.py", line >> > 1421, in savefig >> > self.canvas.print_figure(*args, **kwargs) >> > File "C:\Python27\lib\site-packages\matplotlib\backend_bases.py", >> > line 2220, in print_figure >> > **kwargs) >> > File >> > "C:\Python27\lib\site-packages\matplotlib\backends\backend_agg.py", >> > line 505, in print_png >> > FigureCanvasAgg.draw(self) >> > File >> > "C:\Python27\lib\site-packages\matplotlib\backends\backend_agg.py", >> > line 451, 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 >> > 1034, 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 2086, >> > 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 1091, >> > in draw >> > ticks_to_draw = self._update_ticks(renderer) >> > File "C:\Python27\lib\site-packages\matplotlib\axis.py", line 945, >> > in _update_ticks >> > tick_tups = [t for t in self.iter_ticks()] >> > File "C:\Python27\lib\site-packages\matplotlib\axis.py", line 889, >> > in iter_ticks >> > majorLocs = self.major.locator() >> > File "C:\Python27\lib\site-packages\matplotlib\dates.py", line 802, >> > in __call__ >> > self.refresh() >> > File "C:\Python27\lib\site-packages\matplotlib\dates.py", line 820, >> > in refresh >> > self._locator = self.get_locator(dmin, dmax) >> > File "C:\Python27\lib\site-packages\matplotlib\dates.py", line 896, >> > in get_locator >> > raise ValueError('No sensible date limit could be found in the ' >> > ValueError: No sensible date limit could be found in the >> AutoDateLocator. >> >> >> >> ------------------------------------------------------------------------------ >> Want excitement? >> Manually upgrade your production database. >> When you want reliability, choose Perforce. >> Perforce version control. Predictably reliable. >> >> http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > > > ------------------------------------------------------------------------------ > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce. > Perforce version control. Predictably reliable. > > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >
A quick way to do this is ``ax.invert_yaxis()`` (and invert_xaxis() for the x-axis). That way you preserve auto-scaling and don't wind up with manually set axis limits. What you did should have worked, but ``ymin`` and ``ymax`` are probably datetime objects. ``ylim`` isn't smart enough to convert them to the datetime units that matplotlib uses internally. Hope that helps! -Joe On Tue, Sep 16, 2014 at 4:00 AM, Gerd Wellenreuther < Ger...@xf...> wrote: > Dear all, > > I hope some of you could help me out. I am currently trying to generate > some timetables using matplotlib.pyplot.plot_date, having the time-axis > on the y-axis. Typically, one would like to read these plots from top to > bottom, from older to newer items (future on the bottom). Unfortunately, > the default enumeration of the y-axis is the other way around, and it > resists my attempts to invert its direction e.g. by changing limits > using matplotlib.pyplot.ylim (Traceback below). I found a quite old > entry in stackoverflow which is most probably outdated, at least the > proposed solution did not work for me... > ( > http://stackoverflow.com/questions/5804969/displaying-an-inverted-vertical-date-axis > ). > > Since the longish traceback seems to try to tell me I did not understand > some kind of important - even trivial - point about those datetime-axis > maybe some of you came about this problem before? > > Thanks, Gerd > > P.S.: Traceback after trying to use something like > "matplotlib.pyplot.ylim(ymax,ymin)": > > Traceback (most recent call last): > > File "C:\Users\gwellenr\Desktop\Test_Sabine\Plot_csv.py", line 187, > > in <module> > > matplotlib.pyplot.savefig(save_path+'test.png') > > File "C:\Python27\lib\site-packages\matplotlib\pyplot.py", line 561, > > in savefig > > return fig.savefig(*args, **kwargs) > > File "C:\Python27\lib\site-packages\matplotlib\figure.py", line > > 1421, in savefig > > self.canvas.print_figure(*args, **kwargs) > > File "C:\Python27\lib\site-packages\matplotlib\backend_bases.py", > > line 2220, in print_figure > > **kwargs) > > File > > "C:\Python27\lib\site-packages\matplotlib\backends\backend_agg.py", > > line 505, in print_png > > FigureCanvasAgg.draw(self) > > File > > "C:\Python27\lib\site-packages\matplotlib\backends\backend_agg.py", > > line 451, 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 > > 1034, 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 2086, > > 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 1091, > > in draw > > ticks_to_draw = self._update_ticks(renderer) > > File "C:\Python27\lib\site-packages\matplotlib\axis.py", line 945, > > in _update_ticks > > tick_tups = [t for t in self.iter_ticks()] > > File "C:\Python27\lib\site-packages\matplotlib\axis.py", line 889, > > in iter_ticks > > majorLocs = self.major.locator() > > File "C:\Python27\lib\site-packages\matplotlib\dates.py", line 802, > > in __call__ > > self.refresh() > > File "C:\Python27\lib\site-packages\matplotlib\dates.py", line 820, > > in refresh > > self._locator = self.get_locator(dmin, dmax) > > File "C:\Python27\lib\site-packages\matplotlib\dates.py", line 896, > > in get_locator > > raise ValueError('No sensible date limit could be found in the ' > > ValueError: No sensible date limit could be found in the AutoDateLocator. > > > > ------------------------------------------------------------------------------ > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce. > Perforce version control. Predictably reliable. > > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
Dear all, I hope some of you could help me out. I am currently trying to generate some timetables using matplotlib.pyplot.plot_date, having the time-axis on the y-axis. Typically, one would like to read these plots from top to bottom, from older to newer items (future on the bottom). Unfortunately, the default enumeration of the y-axis is the other way around, and it resists my attempts to invert its direction e.g. by changing limits using matplotlib.pyplot.ylim (Traceback below). I found a quite old entry in stackoverflow which is most probably outdated, at least the proposed solution did not work for me... (http://stackoverflow.com/questions/5804969/displaying-an-inverted-vertical-date-axis). Since the longish traceback seems to try to tell me I did not understand some kind of important - even trivial - point about those datetime-axis maybe some of you came about this problem before? Thanks, Gerd P.S.: Traceback after trying to use something like "matplotlib.pyplot.ylim(ymax,ymin)": > Traceback (most recent call last): > File "C:\Users\gwellenr\Desktop\Test_Sabine\Plot_csv.py", line 187, > in <module> > matplotlib.pyplot.savefig(save_path+'test.png') > File "C:\Python27\lib\site-packages\matplotlib\pyplot.py", line 561, > in savefig > return fig.savefig(*args, **kwargs) > File "C:\Python27\lib\site-packages\matplotlib\figure.py", line > 1421, in savefig > self.canvas.print_figure(*args, **kwargs) > File "C:\Python27\lib\site-packages\matplotlib\backend_bases.py", > line 2220, in print_figure > **kwargs) > File > "C:\Python27\lib\site-packages\matplotlib\backends\backend_agg.py", > line 505, in print_png > FigureCanvasAgg.draw(self) > File > "C:\Python27\lib\site-packages\matplotlib\backends\backend_agg.py", > line 451, 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 > 1034, 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 2086, > 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 1091, > in draw > ticks_to_draw = self._update_ticks(renderer) > File "C:\Python27\lib\site-packages\matplotlib\axis.py", line 945, > in _update_ticks > tick_tups = [t for t in self.iter_ticks()] > File "C:\Python27\lib\site-packages\matplotlib\axis.py", line 889, > in iter_ticks > majorLocs = self.major.locator() > File "C:\Python27\lib\site-packages\matplotlib\dates.py", line 802, > in __call__ > self.refresh() > File "C:\Python27\lib\site-packages\matplotlib\dates.py", line 820, > in refresh > self._locator = self.get_locator(dmin, dmax) > File "C:\Python27\lib\site-packages\matplotlib\dates.py", line 896, > in get_locator > raise ValueError('No sensible date limit could be found in the ' > ValueError: No sensible date limit could be found in the AutoDateLocator.
Yes. They are on the same webpage to which I linked earlier. http://matplotlib.org/search.html?q=codex+webagg&check_keywords=yes&area=default On Mon, Sep 15, 2014 at 9:28 AM, Tom Young <xia...@gm...> wrote: > Thank you for your quick answer. I understand the performance issue you > mentioned. For now it is only a proof of concept. > > I just figured out how to do it in theory by using > figure.subplot.left|right|bottom|top plus a few other settings. > > I'll certainly look at the webagg backend. Are there any examples > available? > > > > -- > View this message in context: > http://matplotlib.1069221.n5.nabble.com/zoom-a-plot-tp43952p43954.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce > Perforce version control. Predictably reliable. > > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
Thank you for your quick answer. I understand the performance issue you mentioned. For now it is only a proof of concept. I just figured out how to do it in theory by using figure.subplot.left|right|bottom|top plus a few other settings. I'll certainly look at the webagg backend. Are there any examples available? -- View this message in context: http://matplotlib.1069221.n5.nabble.com/zoom-a-plot-tp43952p43954.html Sent from the matplotlib - users mailing list archive at Nabble.com.
I don't think you'll get acceptable performance out of that workflow. I recommend looking into the webagg backend: http://matplotlib.org/users/whats_new.html#webagg-backend On Mon, Sep 15, 2014 at 8:38 AM, Xiaobo Yang <xia...@gm...> wrote: > Hi, I use matplotlib to create a png file, then display it in a web > browser. All works fine. Now I want to zoom the plot. What I can think of > is: > > 1) Get coordinates (x1, y1), (x2, y2) of the image when user makes an area > selection on the image; > > 2) Convert (x1, y1), (x2, y2) to the real values matplotlib was plotting; > > 3) Request matplotlib to create a new png file using the updated area > values. > > Could anybody please let me know how to accomplish step 2? > > Many thanks, > Tom > > > ------------------------------------------------------------------------------ > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce > Perforce version control. Predictably reliable. > > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >
Hi, I use matplotlib to create a png file, then display it in a web browser. All works fine. Now I want to zoom the plot. What I can think of is: 1) Get coordinates (x1, y1), (x2, y2) of the image when user makes an area selection on the image; 2) Convert (x1, y1), (x2, y2) to the real values matplotlib was plotting; 3) Request matplotlib to create a new png file using the updated area values. Could anybody please let me know how to accomplish step 2? Many thanks, Tom
python 3.3.2, everything else is whatever Ubuntu 14.04 amd64 uses in its latest updates. kbriggs:~> cat bug.py #!/usr/bin/env python3 from matplotlib import pyplot as plt plt.matshow([[0.0]]) kbriggs:~> ./bug.py Error in atexit._run_exitfuncs: AttributeError: 'FigureManagerGTK3Cairo' object has no attribute 'canvas' ________________________________________ From: Thomas Caswell [tca...@gm...] Sent: 15 September 2014 13:38 To: Briggs,KM,Keith,TUB2 R Cc: mat...@li... Subject: Re: [Matplotlib-users] Error in atexit._run_exitfuncs What versions of things are you using (python, mpl, gtk, gtk's python bindings, and cairo) and how did you install them? Can you also include the full backtrace? On Mon, Sep 15, 2014 at 8:28 AM, <kei...@bt...> wrote: > How's this for minimal? > > from matplotlib import pyplot as plt > plt.matshow([[0.0]]) > > It crashes with the FigureManagerGTK3Cairo error. > Keith > > > -----Original Message----- > From: Thomas Caswell [mailto:tca...@gm...] > Sent: 15 September 2014 13:23 > To: Briggs,KM,Keith,TUB2 R > Cc: mat...@li... > Subject: Re: [Matplotlib-users] Error in atexit._run_exitfuncs > > Can you provide a minimal example that will trigger the bug? > > From the description you have given we don't have enough information to diagnose the problem. > > Ben thinks this is related to some long-standing issues, if you could help us track them down it would be greatly appreciated. > > Tom > > On Mon, Sep 15, 2014 at 7:19 AM, keithbriggs <kei...@bt...> wrote: >> I am still getting this error, this time with matplotlib.pyplot.matshow, and >> I do not get any plot. This bug really needs to be fixed! >> >> >> >> -- >> View this message in context: >> http://matplotlib.1069221.n5.nabble.com/Error-in-atexit-run-exitfuncs- >> tp43566p43947.html Sent from the matplotlib - users mailing list >> archive at Nabble.com. >> >> ---------------------------------------------------------------------- >> -------- >> Want excitement? >> Manually upgrade your production database. >> When you want reliability, choose Perforce Perforce version control. >> Predictably reliable. >> http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg. >> clktrk _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > -- > Thomas Caswell > tca...@gm... -- Thomas Caswell tca...@gm...
How's this for minimal? from matplotlib import pyplot as plt plt.matshow([[0.0]]) It crashes with the FigureManagerGTK3Cairo error. Keith -----Original Message----- From: Thomas Caswell [mailto:tca...@gm...] Sent: 15 September 2014 13:23 To: Briggs,KM,Keith,TUB2 R Cc: mat...@li... Subject: Re: [Matplotlib-users] Error in atexit._run_exitfuncs Can you provide a minimal example that will trigger the bug? From the description you have given we don't have enough information to diagnose the problem. Ben thinks this is related to some long-standing issues, if you could help us track them down it would be greatly appreciated. Tom On Mon, Sep 15, 2014 at 7:19 AM, keithbriggs <kei...@bt...> wrote: > I am still getting this error, this time with matplotlib.pyplot.matshow, and > I do not get any plot. This bug really needs to be fixed! > > > > -- > View this message in context: > http://matplotlib.1069221.n5.nabble.com/Error-in-atexit-run-exitfuncs- > tp43566p43947.html Sent from the matplotlib - users mailing list > archive at Nabble.com. > > ---------------------------------------------------------------------- > -------- > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce Perforce version control. > Predictably reliable. > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg. > clktrk _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Thomas Caswell tca...@gm...
What versions of things are you using (python, mpl, gtk, gtk's python bindings, and cairo) and how did you install them? Can you also include the full backtrace? On Mon, Sep 15, 2014 at 8:28 AM, <kei...@bt...> wrote: > How's this for minimal? > > from matplotlib import pyplot as plt > plt.matshow([[0.0]]) > > It crashes with the FigureManagerGTK3Cairo error. > Keith > > > -----Original Message----- > From: Thomas Caswell [mailto:tca...@gm...] > Sent: 15 September 2014 13:23 > To: Briggs,KM,Keith,TUB2 R > Cc: mat...@li... > Subject: Re: [Matplotlib-users] Error in atexit._run_exitfuncs > > Can you provide a minimal example that will trigger the bug? > > From the description you have given we don't have enough information to diagnose the problem. > > Ben thinks this is related to some long-standing issues, if you could help us track them down it would be greatly appreciated. > > Tom > > On Mon, Sep 15, 2014 at 7:19 AM, keithbriggs <kei...@bt...> wrote: >> I am still getting this error, this time with matplotlib.pyplot.matshow, and >> I do not get any plot. This bug really needs to be fixed! >> >> >> >> -- >> View this message in context: >> http://matplotlib.1069221.n5.nabble.com/Error-in-atexit-run-exitfuncs- >> tp43566p43947.html Sent from the matplotlib - users mailing list >> archive at Nabble.com. >> >> ---------------------------------------------------------------------- >> -------- >> Want excitement? >> Manually upgrade your production database. >> When you want reliability, choose Perforce Perforce version control. >> Predictably reliable. >> http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg. >> clktrk _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > -- > Thomas Caswell > tca...@gm... -- Thomas Caswell tca...@gm...
Can you provide a minimal example that will trigger the bug? >From the description you have given we don't have enough information to diagnose the problem. Ben thinks this is related to some long-standing issues, if you could help us track them down it would be greatly appreciated. Tom On Mon, Sep 15, 2014 at 7:19 AM, keithbriggs <kei...@bt...> wrote: > I am still getting this error, this time with matplotlib.pyplot.matshow, and > I do not get any plot. This bug really needs to be fixed! > > > > -- > View this message in context: http://matplotlib.1069221.n5.nabble.com/Error-in-atexit-run-exitfuncs-tp43566p43947.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce > Perforce version control. Predictably reliable. > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Thomas Caswell tca...@gm...
I am still getting this error, this time with matplotlib.pyplot.matshow, and I do not get any plot. This bug really needs to be fixed! -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Error-in-atexit-run-exitfuncs-tp43566p43947.html Sent from the matplotlib - users mailing list archive at Nabble.com.
Hi, I have a plot with 9 lines, representing datasets with two varying parameters, say f_11, f_12, f_13, ..., f_33. To make the plot (a bit) clearer, I encode the first parameter as the color of the line and the second one as the linestyle (so f_11 is red & dashed, f12 is red & dotted, f21 is green & dashed, f22 is green & dotted, etc.). So, for the legend, I would like to make a 3x3 table, looking like param1 \ param2 | value1 | value2 | value3 ------------------------------------------------------------- value1| value2| <artists go there> value3| (it probably is going to look terrible in a proportional font but hopefully you get the idea...). Is there any way I can make this with matplotlib? An idea would be to make this box with LaTeX, but I need a way to plot the legend artists at the right position. Thanks, Antony
Hi matplotlib-users@, I have a graph that looks like this [1], in which each line has different markers for the same number of points. I'd like to add a separate "legend box" (like the one already in the graph) for the markers only: <circle>: description for circle <right triangle>: description for right triangle [1] http://imgur.com/tmFpix1
Hi all, I'm very pleased to announce the publication of a paper I've written with Michael Droettboom and Philip E. Bourne. Ten Simple Rules for Better Figures Nicolas P. Rougier, Michael Droettboom, Philip E. Bourne PLOS Computational Biology URL: http://www.ploscompbiol.org/article/info:doi/10.1371/journal.pcbi.1003833 All the figures have been made using matplotlib and sources are available from: https://github.com/rougier/ten-rules We even managed to use the XKCD filter ! Thanks a lot for this great library. Nicolas
Jonno, Unfortunately, I'm not sure that the matplotlibrc file will cover every type of customization. If you don't find it on the customization page ( http://matplotlib.org/users/customizing.html), then it might not be possible to have it be a default. In principle, I like the matplotlibrc file; however, it does cause some problems if you are distributing code to colleagues. When they run your code, the plots will not look the same unless they have your rc parameters as well. Perhaps an alternative would be to write a small module that you could import/distribute. Set the PYTHONPATH variable ( https://docs.python.org/2/using/cmdline.html#environment-variables), so that it is importable in any script. It could look something like this: ### mpl_format.py ### import matplotlib.pyplot as plt plt.rc('lines', linewidth=2, color='r') plt.rc('font', size=16.0) def ax_format(axes): axes.get_xaxis().tick_bottom() axes.get_yaxis().tick_left() ######### And then in your code, you could do something like this: ### fake_example.py ### import matplotlib.pyplot as plt import mpl_format ax = plt.axes() ax.plot([1,3,7], [-1, 4, 2], 'o-') mpl_format.ax_format(ax) plt.show() ######## I hope this helps. Ryan On Thu, Sep 11, 2014 at 1:18 PM, Jonno <jon...@gm...> wrote: > I'm looking for some help understanding how I can add new lines to my > matplotlibrc but I'm struggling to correlate the default matplotlibrc to > the api. > > For example if I want to have axis ticks only show up on the bottom and > left axes how would I add that to mapltlotlibrc? > I can do this in my code with: > ax.get_xaxis().tick_bottom() > ax.get_yaxis().tick_left() > But don't get how to do it using the documentation at > http://matplotlib.org/api/axis_api.html > > Thanks, > > Jonno. > > > ------------------------------------------------------------------------------ > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce > Perforce version control. Predictably reliable. > > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >
I'm looking for some help understanding how I can add new lines to my matplotlibrc but I'm struggling to correlate the default matplotlibrc to the api. For example if I want to have axis ticks only show up on the bottom and left axes how would I add that to mapltlotlibrc? I can do this in my code with: ax.get_xaxis().tick_bottom() ax.get_yaxis().tick_left() But don't get how to do it using the documentation at http://matplotlib.org/api/axis_api.html Thanks, Jonno.
Off the bat, all I can think of is to use figimage: http://matplotlib.org/api/pyplot_api.html?highlight=figimage#matplotlib.pyplot.figimage Of course, an issue is how to determine the location for the flags. Perhaps one could take advantage of each label object's position and transform that into figure coordinates. Or possibly with just simply imshow(), but specifying the extents determined from the label object's position. Cheers! Ben Root On Sat, Sep 6, 2014 at 9:34 PM, fizix137 <fiz...@gm...> wrote: > My full question is in stack overflow. Basically I want to add an image > of a > flag into each of the wedges of a pie chart. The wedges will never be > smaller than 1/8 of the pie so the flag should always fit nicely. > > I can't figure out how to get an image to be inside a wedge. That's what I > need help with. > > Thanks! > > > http://stackoverflow.com/questions/25596938/matplotlib-applying-an-image-as-the-background-of-a-matplotlib-wedge > > > > -- > View this message in context: > http://matplotlib.1069221.n5.nabble.com/Get-an-image-into-a-wedge-of-a-pie-chart-tp43899.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Slashdot TV. > Video for Nerds. Stuff that matters. > http://tv.slashdot.org/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
Hi, Thanks a lot for the clue, Pierre. Unicode fix this thread, at least for my case. Cheers, Arnaldo. --- *Arnaldo D'Amaral Pereira Granja Russo* Lab. de Estudos dos Oceanos e Clima Instituto de Oceanografia - FURG 2014年09月08日 7:06 GMT-03:00 Pierre Haesssig <pie...@cr...>: > > Le 05/09/2014 21:53, Arnaldo Russo a écrit : > >> The following code plots my table, but greek letters are not in Arial. >> > What about adding greek letters directly with a Unicode string and keeping > LaTex only for the table? > > best, > Pierre > > (my greek and math unicode "copy-pasting files" attached) > > > ------------------------------------------------------------------------------ > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce > Perforce version control. Predictably reliable. > > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >