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: Nicolas Bigaouette [mailto:nbi...@gm...] Sent: Thursday, September 30, 2010 18:00 What I would like to do it have a colormap which is transparent for lower values of data and opaque for high values, so the blue on the figure would appear white/transparent. Would it suffice for the colormap to be light or white for low values but still opaque? There are several built-in maps [1] with a light color at one end; if it's light at the high end, append "_r" to the colormap name to get the reversed version. [1] http://matplotlib.sourceforge.net/examples/pylab_examples/show_colormaps.html
I temporarily fixed this by commenting the following lines in pkg_resources.py folder in /site-packages/distribute.. folder. issue_warning( "Module %s was already imported from %s, but %s is being added" " to sys.path" % (modname, fn, self.location), ) Now, I don't get any dateutil imported messages each time I launch an IPython session. On Wed, Sep 8, 2010 at 1:26 PM, Gökhan Sever <gok...@gm...> wrote: > It is clear with python -c "import matplotlib" > I can't seem to find any "dateutil" phrase occurring within the IPython > installation folder (/site-packages/IPython) > Where else to look for? > > On Wed, Sep 8, 2010 at 12:35 PM, Aman Thakral <ama...@gm...> > wrote: >> >> try this in the terminal: >> python -c "import matplotlib" >> >> -Aman >> >> On Wed, Sep 8, 2010 at 12:17 PM, Gökhan Sever <gok...@gm...> >> wrote: >>> >>> Hello, >>> My usual ipython -pylab is giving me these warnings after I installed >>> matplotlib from the source (matplotlib rev.8624 using python setupegg.py >>> develop). >>> >>> /usr/lib/python2.6/site-packages/EPDLab-3.0.1.dev_r24658-py2.6.egg/enthought/__init__.py:7: >>> UserWarning: Module dateutil was already imported from >>> /home/user/Desktop/python-repo/matplotlib/lib/dateutil/__init__.pyc, but >>> /usr/lib/python2.6/site-packages is being added to sys.path >>> __import__('pkg_resources').declare_namespace(__name__) >>> >>> Under /site-packages in easy-install.pth I moved >>> the /home/user/Desktop/python-repo/matplotlib/lib line to the very bottom of >>> the file but this doesn't make any change. >>> Any ideas how to remove this warning? >>> -- >>> Gökhan >>> >>> >>> ------------------------------------------------------------------------------ >>> This SF.net Dev2Dev email is sponsored by: >>> >>> Show off your parallel programming skills. >>> Enter the Intel(R) Threading Challenge 2010. >>> http://p.sf.net/sfu/intel-thread-sfd >>> _______________________________________________ >>> Matplotlib-users mailing list >>> Mat...@li... >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>> >> >> >> >> -- >> Aman Thakral >> B.Eng & Biosci, M.Eng Design > > > > -- > Gökhan > -- Gökhan
On 10/01/2010 11:46 AM, Jason Grout wrote: > On 10/01/2010 10:40 AM, Michael Droettboom wrote: >> On 10/01/2010 11:31 AM, Jason Grout wrote: >>> I'm working on updating matplotlib in Sage to 1.0. We're running into >>> a problem where it seems that the fontList.cache is not being updated. >>> I've included an example session below. The .matplotlib directory is >>> accessible here: >>> http://sage.math.washington.edu/home/jason/.matplotlib/ The problem >>> seems to be that it is looking for a file that does not exist: >>> >>> [jason@sage:/scratch/jason/sage-4.6.alpha2]$ ls >>> /scratch/grout/sage-4.5.3/local/lib/python2.6/site-packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf >>> ls: cannot access >>> /scratch/grout/sage-4.5.3/local/lib/python2.6/site-packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf: >>> No such file or directory >>> >>> >>> Does anyone have any idea what is going on? Why is the fontList.cache >>> file not being updated, instead of trying to access a path that doesn't >>> exist? >> There is a fix in SVN for this, but it has not yet been released. When >> a font file is not found, it rebuilds the entire font cache on the spot. > Thanks. Do you know the commit? We'll apply it to the Sage matplotlib > package. > > It's r8712. >>> A related question is: I see the variable USE_FONTCONFIG in >>> font_manager.py. It says it is experimental. How stable is that code? >>> It's tempting to switch to using fontconfig. >> I use it as a matter of course on my Linux box and haven't had any >> issues. It's experimental because it's the kind of thing that is so >> affected by external environmental issues and distro differences. Just >> because it "works for me", there's no guarantee it will work >> everywhere. But go ahead and give it a try and report back with the >> distro you're using. >> > Well, with Sage, we're using it on a number of distros, flavors of OSX, > Solaris, etc. So maybe I'll stick with the home-grown caching > solution. At least until we've tested it a bit on different support > platforms for Sage. > > I thought there was some sort of build bot for matplotlib that tested on > a number of platforms. Do you know how the fontconfig stuff does on > that (if it exists...). I don't think the buildbots are turning on fontconfig support. And I believe all of the buildbots are some flavour of Ubuntu (the OS-X buildbot is not running), so there's not a lot of coverage. Mike > Thanks, > > Jason > > > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
On 10/01/2010 10:40 AM, Michael Droettboom wrote: > On 10/01/2010 11:31 AM, Jason Grout wrote: >> I'm working on updating matplotlib in Sage to 1.0. We're running into >> a problem where it seems that the fontList.cache is not being updated. >> I've included an example session below. The .matplotlib directory is >> accessible here: >> http://sage.math.washington.edu/home/jason/.matplotlib/ The problem >> seems to be that it is looking for a file that does not exist: >> >> [jason@sage:/scratch/jason/sage-4.6.alpha2]$ ls >> /scratch/grout/sage-4.5.3/local/lib/python2.6/site-packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf >> ls: cannot access >> /scratch/grout/sage-4.5.3/local/lib/python2.6/site-packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf: >> No such file or directory >> >> >> Does anyone have any idea what is going on? Why is the fontList.cache >> file not being updated, instead of trying to access a path that doesn't >> exist? > There is a fix in SVN for this, but it has not yet been released. When > a font file is not found, it rebuilds the entire font cache on the spot. Thanks. Do you know the commit? We'll apply it to the Sage matplotlib package. >> A related question is: I see the variable USE_FONTCONFIG in >> font_manager.py. It says it is experimental. How stable is that code? >> It's tempting to switch to using fontconfig. > I use it as a matter of course on my Linux box and haven't had any > issues. It's experimental because it's the kind of thing that is so > affected by external environmental issues and distro differences. Just > because it "works for me", there's no guarantee it will work > everywhere. But go ahead and give it a try and report back with the > distro you're using. > Well, with Sage, we're using it on a number of distros, flavors of OSX, Solaris, etc. So maybe I'll stick with the home-grown caching solution. At least until we've tested it a bit on different support platforms for Sage. I thought there was some sort of build bot for matplotlib that tested on a number of platforms. Do you know how the fontconfig stuff does on that (if it exists...). Thanks, Jason
On 10/01/2010 11:31 AM, Jason Grout wrote: > I'm working on updating matplotlib in Sage to 1.0. We're running into > a problem where it seems that the fontList.cache is not being updated. > I've included an example session below. The .matplotlib directory is > accessible here: > http://sage.math.washington.edu/home/jason/.matplotlib/ The problem > seems to be that it is looking for a file that does not exist: > > [jason@sage:/scratch/jason/sage-4.6.alpha2]$ ls > /scratch/grout/sage-4.5.3/local/lib/python2.6/site-packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf > ls: cannot access > /scratch/grout/sage-4.5.3/local/lib/python2.6/site-packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf: > No such file or directory > > > Does anyone have any idea what is going on? Why is the fontList.cache > file not being updated, instead of trying to access a path that doesn't > exist? There is a fix in SVN for this, but it has not yet been released. When a font file is not found, it rebuilds the entire font cache on the spot. > A related question is: I see the variable USE_FONTCONFIG in > font_manager.py. It says it is experimental. How stable is that code? > It's tempting to switch to using fontconfig. I use it as a matter of course on my Linux box and haven't had any issues. It's experimental because it's the kind of thing that is so affected by external environmental issues and distro differences. Just because it "works for me", there's no guarantee it will work everywhere. But go ahead and give it a try and report back with the distro you're using. Mike > Thanks, > > Jason > > > Here is my example session: > > In [1]: from pylab import * > > In [2]: text(0.5, 0.5, 'text 0') > Out[2]:<matplotlib.text.Text object at 0x18e7b50> > > In [3]: savefig('test.png') > 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', (532, 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', (643, 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', (10, 0)) > > --------------------------------------------------------------------------- > RuntimeError Traceback (most recent call last) > > /mnt/usb1/scratch/jason/sage-4.6.alpha2/<ipython console> in<module>() > > /mnt/usb1/scratch/jason/sage-4.6.alpha2/local/lib/python2.6/site-packages/matplotlib/pyplot.pyc > in savefig(*args, **kwargs) > 361 def savefig(*args, **kwargs): > 362 fig = gcf() > --> 363 return fig.savefig(*args, **kwargs) > 364 > 365 @docstring.copy_dedent(Figure.ginput) > > /mnt/usb1/scratch/jason/sage-4.6.alpha2/local/lib/python2.6/site-packages/matplotlib/figure.pyc > in savefig(self, *args, **kwargs) > 1082 kwargs.setdefault('edgecolor', > rcParams['savefig.edgecolor']) > 1083 > -> 1084 self.canvas.print_figure(*args, **kwargs) > 1085 > 1086 if transparent: > > /mnt/usb1/scratch/jason/sage-4.6.alpha2/local/lib/python2.6/site-packages/matplotlib/backend_bases.pyc > in print_figure(self, filename, dpi, facecolor, edgecolor, orientation, > format, **kwargs) > 1884 orientation=orientation, > 1885 bbox_inches_restore=_bbox_inches_restore, > -> 1886 **kwargs) > 1887 finally: > 1888 if bbox_inches and restore_bbox: > > /mnt/usb1/scratch/jason/sage-4.6.alpha2/local/lib/python2.6/site-packages/matplotlib/backends/backend_agg.pyc > in print_png(self, filename_or_obj, *args, **kwargs) > 436 > 437 def print_png(self, filename_or_obj, *args, **kwargs): > --> 438 FigureCanvasAgg.draw(self) > 439 renderer = self.get_renderer() > 440 original_dpi = renderer.dpi > > /mnt/usb1/scratch/jason/sage-4.6.alpha2/local/lib/python2.6/site-packages/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): > > /mnt/usb1/scratch/jason/sage-4.6.alpha2/local/lib/python2.6/site-packages/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 > > /mnt/usb1/scratch/jason/sage-4.6.alpha2/local/lib/python2.6/site-packages/matplotlib/figure.pyc > in draw(self, renderer) > 796 dsu.sort(key=itemgetter(0)) > 797 for zorder, func, args in dsu: > --> 798 func(*args) > 799 > 800 renderer.close_group('figure') > > /mnt/usb1/scratch/jason/sage-4.6.alpha2/local/lib/python2.6/site-packages/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 > > /mnt/usb1/scratch/jason/sage-4.6.alpha2/local/lib/python2.6/site-packages/matplotlib/axes.pyc > in draw(self, renderer, inframe) > 1932 > 1933 for zorder, a in dsu: > -> 1934 a.draw(renderer) > 1935 > 1936 renderer.close_group('axes') > > /mnt/usb1/scratch/jason/sage-4.6.alpha2/local/lib/python2.6/site-packages/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 > > /mnt/usb1/scratch/jason/sage-4.6.alpha2/local/lib/python2.6/site-packages/matplotlib/axis.pyc > in draw(self, renderer, *args, **kwargs) > 1015 tick.set_label1(label) > 1016 tick.set_label2(label) > -> 1017 tick.draw(renderer) > 1018 if tick.label1On and tick.label1.get_visible(): > 1019 extent = tick.label1.get_window_extent(renderer) > > /mnt/usb1/scratch/jason/sage-4.6.alpha2/local/lib/python2.6/site-packages/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 > > /mnt/usb1/scratch/jason/sage-4.6.alpha2/local/lib/python2.6/site-packages/matplotlib/axis.pyc > in draw(self, renderer) > 232 > 233 if self.label1On: > --> 234 self.label1.draw(renderer) > 235 if self.label2On: > 236 self.label2.draw(renderer) > > /mnt/usb1/scratch/jason/sage-4.6.alpha2/local/lib/python2.6/site-packages/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 > > /mnt/usb1/scratch/jason/sage-4.6.alpha2/local/lib/python2.6/site-packages/matplotlib/text.pyc > in draw(self, renderer) > 522 renderer.open_group('text', self.get_gid()) > 523 > --> 524 bbox, info = self._get_layout(renderer) > 525 trans = self.get_transform() > 526 > > /mnt/usb1/scratch/jason/sage-4.6.alpha2/local/lib/python2.6/site-packages/matplotlib/text.pyc > in _get_layout(self, renderer) > 296 tmp, lp_h, lp_bl = get_text_width_height_descent('lp', > 297 > self._fontproperties, > --> 298 > ismath=False) > 299 offsety = lp_h * self._linespacing > 300 > > /mnt/usb1/scratch/jason/sage-4.6.alpha2/local/lib/python2.6/site-packages/matplotlib/backends/backend_agg.pyc > in get_text_width_height_descent(self, s, prop, ismath) > 178 > 179 flags = self._get_hinting_flag() > --> 180 font = self._get_agg_font(prop) > 181 font.set_text(s, 0.0, flags=flags) # the width and > height of unrotated string > 182 w, h = font.get_width_height() > > /mnt/usb1/scratch/jason/sage-4.6.alpha2/local/lib/python2.6/site-packages/matplotlib/backends/backend_agg.pyc > in _get_agg_font(self, prop) > 219 font = self._fontd.get(fname) > 220 if font is None: > --> 221 font = FT2Font(str(fname)) > 222 self._fontd[fname] = font > 223 self._fontd[key] = font > > RuntimeError: Could not open facefile > /scratch/grout/sage-4.5.3/local/lib/python2.6/site-packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf; > Cannot_Open_Resource > > > > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
I'm working on updating matplotlib in Sage to 1.0. We're running into a problem where it seems that the fontList.cache is not being updated. I've included an example session below. The .matplotlib directory is accessible here: http://sage.math.washington.edu/home/jason/.matplotlib/ The problem seems to be that it is looking for a file that does not exist: [jason@sage:/scratch/jason/sage-4.6.alpha2]$ ls /scratch/grout/sage-4.5.3/local/lib/python2.6/site-packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf ls: cannot access /scratch/grout/sage-4.5.3/local/lib/python2.6/site-packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf: No such file or directory Does anyone have any idea what is going on? Why is the fontList.cache file not being updated, instead of trying to access a path that doesn't exist? A related question is: I see the variable USE_FONTCONFIG in font_manager.py. It says it is experimental. How stable is that code? It's tempting to switch to using fontconfig. Thanks, Jason Here is my example session: In [1]: from pylab import * In [2]: text(0.5, 0.5, 'text 0') Out[2]: <matplotlib.text.Text object at 0x18e7b50> In [3]: savefig('test.png') 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', (532, 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', (643, 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', (10, 0)) --------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) /mnt/usb1/scratch/jason/sage-4.6.alpha2/<ipython console> in <module>() /mnt/usb1/scratch/jason/sage-4.6.alpha2/local/lib/python2.6/site-packages/matplotlib/pyplot.pyc in savefig(*args, **kwargs) 361 def savefig(*args, **kwargs): 362 fig = gcf() --> 363 return fig.savefig(*args, **kwargs) 364 365 @docstring.copy_dedent(Figure.ginput) /mnt/usb1/scratch/jason/sage-4.6.alpha2/local/lib/python2.6/site-packages/matplotlib/figure.pyc in savefig(self, *args, **kwargs) 1082 kwargs.setdefault('edgecolor', rcParams['savefig.edgecolor']) 1083 -> 1084 self.canvas.print_figure(*args, **kwargs) 1085 1086 if transparent: /mnt/usb1/scratch/jason/sage-4.6.alpha2/local/lib/python2.6/site-packages/matplotlib/backend_bases.pyc in print_figure(self, filename, dpi, facecolor, edgecolor, orientation, format, **kwargs) 1884 orientation=orientation, 1885 bbox_inches_restore=_bbox_inches_restore, -> 1886 **kwargs) 1887 finally: 1888 if bbox_inches and restore_bbox: /mnt/usb1/scratch/jason/sage-4.6.alpha2/local/lib/python2.6/site-packages/matplotlib/backends/backend_agg.pyc in print_png(self, filename_or_obj, *args, **kwargs) 436 437 def print_png(self, filename_or_obj, *args, **kwargs): --> 438 FigureCanvasAgg.draw(self) 439 renderer = self.get_renderer() 440 original_dpi = renderer.dpi /mnt/usb1/scratch/jason/sage-4.6.alpha2/local/lib/python2.6/site-packages/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): /mnt/usb1/scratch/jason/sage-4.6.alpha2/local/lib/python2.6/site-packages/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 /mnt/usb1/scratch/jason/sage-4.6.alpha2/local/lib/python2.6/site-packages/matplotlib/figure.pyc in draw(self, renderer) 796 dsu.sort(key=itemgetter(0)) 797 for zorder, func, args in dsu: --> 798 func(*args) 799 800 renderer.close_group('figure') /mnt/usb1/scratch/jason/sage-4.6.alpha2/local/lib/python2.6/site-packages/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 /mnt/usb1/scratch/jason/sage-4.6.alpha2/local/lib/python2.6/site-packages/matplotlib/axes.pyc in draw(self, renderer, inframe) 1932 1933 for zorder, a in dsu: -> 1934 a.draw(renderer) 1935 1936 renderer.close_group('axes') /mnt/usb1/scratch/jason/sage-4.6.alpha2/local/lib/python2.6/site-packages/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 /mnt/usb1/scratch/jason/sage-4.6.alpha2/local/lib/python2.6/site-packages/matplotlib/axis.pyc in draw(self, renderer, *args, **kwargs) 1015 tick.set_label1(label) 1016 tick.set_label2(label) -> 1017 tick.draw(renderer) 1018 if tick.label1On and tick.label1.get_visible(): 1019 extent = tick.label1.get_window_extent(renderer) /mnt/usb1/scratch/jason/sage-4.6.alpha2/local/lib/python2.6/site-packages/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 /mnt/usb1/scratch/jason/sage-4.6.alpha2/local/lib/python2.6/site-packages/matplotlib/axis.pyc in draw(self, renderer) 232 233 if self.label1On: --> 234 self.label1.draw(renderer) 235 if self.label2On: 236 self.label2.draw(renderer) /mnt/usb1/scratch/jason/sage-4.6.alpha2/local/lib/python2.6/site-packages/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 /mnt/usb1/scratch/jason/sage-4.6.alpha2/local/lib/python2.6/site-packages/matplotlib/text.pyc in draw(self, renderer) 522 renderer.open_group('text', self.get_gid()) 523 --> 524 bbox, info = self._get_layout(renderer) 525 trans = self.get_transform() 526 /mnt/usb1/scratch/jason/sage-4.6.alpha2/local/lib/python2.6/site-packages/matplotlib/text.pyc in _get_layout(self, renderer) 296 tmp, lp_h, lp_bl = get_text_width_height_descent('lp', 297 self._fontproperties, --> 298 ismath=False) 299 offsety = lp_h * self._linespacing 300 /mnt/usb1/scratch/jason/sage-4.6.alpha2/local/lib/python2.6/site-packages/matplotlib/backends/backend_agg.pyc in get_text_width_height_descent(self, s, prop, ismath) 178 179 flags = self._get_hinting_flag() --> 180 font = self._get_agg_font(prop) 181 font.set_text(s, 0.0, flags=flags) # the width and height of unrotated string 182 w, h = font.get_width_height() /mnt/usb1/scratch/jason/sage-4.6.alpha2/local/lib/python2.6/site-packages/matplotlib/backends/backend_agg.pyc in _get_agg_font(self, prop) 219 font = self._fontd.get(fname) 220 if font is None: --> 221 font = FT2Font(str(fname)) 222 self._fontd[fname] = font 223 self._fontd[key] = font RuntimeError: Could not open facefile /scratch/grout/sage-4.5.3/local/lib/python2.6/site-packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf; Cannot_Open_Resource
On Oct 1, 2010, at 9:40 AM, Benjamin Root wrote: > On Thu, Sep 30, 2010 at 8:44 PM, Tony S Yu <ts...@gm...> wrote: > I'd like to make something in between a box plot [1] and a histogram. Each histogram would be represented by a single, tall, rectangular patch (like the box in a box plot), and the patch would be subdivided by the bin edges of the histogram. The face color of each sub-patch would replace the bar height in the histogram. > > If any of that actually made sense: > > * Does this type of plot have a name? > > * Is there an easy way to do this in Matplotlib? > > * If there isn't an easy way, what would be a good starting point? Initial ideas: 1) Use pcolor or imshow and embed this axes in a larger axes, 2) represent the sub-patches as a PolyCollection. > > Thoughts? > -Tony > > [1] e.g. http://matplotlib.sourceforge.net/examples/pylab_examples/boxplot_demo.html > > Tony, > > I am not quite sure I understand. [snip] > Or maybe something else in the gallery is more like what you want: > > http://matplotlib.sourceforge.net/gallery.html > > Ben Root > I've checked the gallery, but I don't see anything that appears similar. In any case, I ended up hacking together something that works. I've attached an image of what I had in mind (created with the code at the very bottom of this reply). I ended up using mpl Rectangle objects and stringing them together using a PatchCollection. Maybe there's a more efficient way to do this, but this approach worked well-enough. Best, -Tony """ First attempt at a histogram strip chart (made up name). if-main block taken from [1] except that I've replaced uniform distributions with normal distributions. [1] http://matplotlib.sourceforge.net/examples/pylab_examples/boxplot_demo3.html """ import numpy as np import matplotlib.pyplot as plt from matplotlib import collections NORM_TYPES = dict(max=max, sum=sum) class BinCollection(collections.PatchCollection): def __init__(self, hist, bin_edges, x=0, width=1, cmap=plt.cm.gray_r, norm_type='max', **kwargs): yy = (bin_edges[:-1] + bin_edges[1:])/2. heights = np.diff(bin_edges) bins = [plt.Rectangle((x, y), width, h) for y, h in zip(yy, heights)] norm = NORM_TYPES[norm_type] fc = cmap(np.asarray(hist, dtype=float)/norm(hist)) super(BinCollection, self).__init__(bins, facecolors=fc, **kwargs) def histstrip(x, positions=None, widths=None, ax=None): if ax is None: ax = plt.gca() if positions is None: positions = range(1, len(x) + 1) if widths is None: widths = np.min(np.diff(positions)) / 2. * np.ones(len(positions)) for data, x_pos, w in zip(x, positions, widths): x_pos -= w/2. hist, bin_edges = np.histogram(data) bins = BinCollection(hist, bin_edges, width=w, x=x_pos) ax.add_collection(bins, autolim=True) ax.set_xticks(positions) ax.autoscale_view() if __name__ == '__main__': import matplotlib.pyplot as plt import numpy as np np.random.seed(2) inc = 0.1 e1 = np.random.normal(0,1, size=(500,)) e2 = np.random.normal(0,1, size=(500,)) e3 = np.random.normal(0,1 + inc, size=(500,)) e4 = np.random.normal(0,1 + 2*inc, size=(500,)) treatments = [e1,e2,e3,e4] fig, ax = plt.subplots() pos = np.array(range(len(treatments)))+1 histstrip(treatments, ax=ax) ax.set_xlabel('treatment') ax.set_ylabel('response') fig.subplots_adjust(right=0.99,top=0.99) plt.show()
On Thu, Sep 30, 2010 at 8:44 PM, Tony S Yu <ts...@gm...> wrote: > I'd like to make something in between a box plot [1] and a histogram. Each > histogram would be represented by a single, tall, rectangular patch (like > the box in a box plot), and the patch would be subdivided by the bin edges > of the histogram. The face color of each sub-patch would replace the bar > height in the histogram. > > If any of that actually made sense: > > * Does this type of plot have a name? > > * Is there an easy way to do this in Matplotlib? > > * If there isn't an easy way, what would be a good starting point? Initial > ideas: 1) Use pcolor or imshow and embed this axes in a larger axes, 2) > represent the sub-patches as a PolyCollection. > > Thoughts? > -Tony > > [1] e.g. > http://matplotlib.sourceforge.net/examples/pylab_examples/boxplot_demo.html > Tony, I am not quite sure I understand. Are you looking for error bars on the histogram, maybe? http://matplotlib.sourceforge.net/users/screenshots.html#bar-charts Or maybe something more like this: http://matplotlib.sourceforge.net/examples/pylab_examples/bar_stacked.html Or maybe something else in the gallery is more like what you want: http://matplotlib.sourceforge.net/gallery.html Ben Root
hi ! i would like to write a server side python script that generate .pdf documents. for the moment i have Python 2.7 installed server side and matplolib installed server side too. A simple script that create a simple plot and generate a .png picture works. this is the script i use : #------------------------------------------- # to access standard output : import sys # select a non-GUI backend : import matplotlib matplotlib.use('Agg') #matplotlib.use("cairo.pdf") #matplotlib.use('PDF') # import plotting module : import matplotlib.pyplot as plt # generate the plot : plt.plot([1,2,3,2,3,4]) # print the content type (what's the data type) # the new line is embedded, using '\n' notation : print "Content-Type: image/png\n" # print "Content-Type: image/PDF\n" # print "Content-type: application/pdf" # output directly to webserver, as a png file : plt.savefig(sys.stdout, format='png') # plt.savefig(sys.stdout, format='PDF') # plt.savefig( "test.pdf", format='pdf' ) #----------------------------------------------- I am wondering how to do the same thing but with sending a pdf file instead of a png picture. (the # are for all the things i tried) Does someone know ? thanks. jean-claude
Can you get us a gdb backtrace? Type "gdb python" at the prompt, then at the gdb prompt, type "r /usr/bin/ipython -pylab". After it segfaults, type "bt" to get a backtrace, and send the output to this list. Mike On 10/01/2010 07:04 AM, Eric Emsellem wrote: > Hi > > I just upgraded to opensuse 11.3. > > And I get now: > > ipython -pylab: > > matplotlib version 1.0.0 > verbose.level helpful > platform is linux2 > *Segmentation fault* > > > Any clue? > > I am using IPython 0.10, Python 2.6.5 > > Eric > > > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Hi I just upgraded to opensuse 11.3. And I get now: ipython -pylab: matplotlib version 1.0.0 verbose.level helpful platform is linux2 *Segmentation fault* Any clue? I am using IPython 0.10, Python 2.6.5 Eric
I'd like to make something in between a box plot [1] and a histogram. Each histogram would be represented by a single, tall, rectangular patch (like the box in a box plot), and the patch would be subdivided by the bin edges of the histogram. The face color of each sub-patch would replace the bar height in the histogram. If any of that actually made sense: * Does this type of plot have a name? * Is there an easy way to do this in Matplotlib? * If there isn't an easy way, what would be a good starting point? Initial ideas: 1) Use pcolor or imshow and embed this axes in a larger axes, 2) represent the sub-patches as a PolyCollection. Thoughts? -Tony [1] e.g. http://matplotlib.sourceforge.net/examples/pylab_examples/boxplot_demo.html