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
(5) |
2
(23) |
3
(17) |
4
(14) |
5
(12) |
6
(2) |
7
(3) |
8
(7) |
9
(13) |
10
(19) |
11
(24) |
12
(28) |
13
(9) |
14
(5) |
15
(7) |
16
(17) |
17
(17) |
18
(15) |
19
(6) |
20
|
21
(7) |
22
(20) |
23
(6) |
24
(4) |
25
(5) |
26
(11) |
27
(1) |
28
(2) |
29
(14) |
30
(7) |
|
|
|
|
From: Gökhan S. <gok...@gm...> - 2010-11-30 17:35:10
|
On Mon, Nov 29, 2010 at 3:01 PM, Matthew W. Priddy <mwp...@gm...> wrote: > Matplotlib developers, > > I really like using matplotlib to create quality plots, and it seems to have an option for just about everything. However, one thing that is not easy to change is the location of minor tick marks. To set major tick mark locations, one can simply use the "xticks" command. And now we can atleast turn on the minor tick marks with the "minorticks_on()" command. > > But, is there any way to implement something similar to "xticks" for minor tick marks? Even better would be a feature that allowed the user to simply specify the number of minor tick marks that are evenly spaced between the major tick marks? > > Thanks. > > --Matthew It is easy with MultipleLocator class. I[1]: y = np.random.randn(100) I[2]: plt.plot(y) O[2]: [<matplotlib.lines.Line2D object at 0xa82ea6c>] I[3]: from matplotlib.ticker import MultipleLocator I[4]: ax = plt.gca() I[5]: ax.xaxis.set_minor_locator(MultipleLocator(5)) -- Gökhan |
From: Ryan M. <rm...@gm...> - 2010-11-30 17:23:38
|
On Tue, Nov 30, 2010 at 10:44 AM, C M <cmp...@gm...> wrote: > > > On Sun, Nov 28, 2010 at 8:52 PM, C M <cmp...@gm...> wrote: >> >> How can I correctly subclass AutoDateFormatter and use it in my code? >> >> What I am doing is copying the code from matplotlib's AutoDateFormatter >> and changing the strings for how the dates are represented and making that a >> class, MyAutoDateFormatter. AutoDateFormatter expects a locator, and I >> think (?) the default is AutoDateLocator. So in my code I am doing this: >> >> adl = AutoDateLocator() >> myformatter = MyAutoDateFormatter(adl) >> axis.xaxis.set_major_formatter(myformatter) >> >> But when I run it, no matter the level of zoom, it says "2010" (when it >> should change depending on zoom level). >> >> However, if I go into the matplotlib dates.py code itself and save the >> same changes to the date strings there, and I comment out the above code, >> then it works: the date strings change depending on level of zoom. > > I've also just noticed that if I use the above code after the lines have > been plotted, but then I click on one of the points (which causes a > point-picking routine that ultimately plots a highlighting marker over that > point), the x axis suddenly changes to use MyAutoDateFormatter's format > strings. (If I call it before I plot anything, it doesn't help, though). > > Is the act of plotting somehow "refreshing" things? What can I call in > order to force this to happen without actually plotting any additional > points after my lines are plotted? It's difficult to tell without seeing the code that's producing the problem. If you can boil your problem down to a simple, self-contained script and post it here, then we can take a look and see what's going on. Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma |
From: C M <cmp...@gm...> - 2010-11-30 16:44:38
|
On Sun, Nov 28, 2010 at 8:52 PM, C M <cmp...@gm...> wrote: > How can I correctly subclass AutoDateFormatter and use it in my code? > > What I am doing is copying the code from matplotlib's AutoDateFormatter and > changing the strings for how the dates are represented and making that a > class, MyAutoDateFormatter. AutoDateFormatter expects a locator, and I > think (?) the default is AutoDateLocator. So in my code I am doing this: > > adl = AutoDateLocator() > myformatter = MyAutoDateFormatter(adl) > axis.xaxis.set_major_formatter(myformatter) > > But when I run it, no matter the level of zoom, it says "2010" (when it > should change depending on zoom level). > > However, if I go into the matplotlib dates.py code itself and save the same > changes to the date strings there, and I comment out the above code, then it > works: the date strings change depending on level of zoom. > I've also just noticed that if I use the above code after the lines have been plotted, but then I click on one of the points (which causes a point-picking routine that ultimately plots a highlighting marker over that point), the x axis suddenly changes to use MyAutoDateFormatter's format strings. (If I call it before I plot anything, it doesn't help, though). Is the act of plotting somehow "refreshing" things? What can I call in order to force this to happen without actually plotting any additional points after my lines are plotted? Thanks, Che |
From: Benjamin R. <ben...@ou...> - 2010-11-30 16:29:01
|
On Sun, Nov 28, 2010 at 7:48 PM, Jae-Joon Lee <lee...@gm...> wrote: > If you want the whole background to disappear, simply call set_axis_off > method. > > ax.set_axis_off() > > To control the visibility of each element, use something like below. > > for axis in ax.w_xaxis, ax.w_yaxis, ax.w_zaxis: > for elt in axis.get_ticklines() + axis.get_ticklabels(): > elt.set_visible(False) > > axis.pane.set_visible(False) > axis.gridlines.set_visible(False) > axis.line.set_visible(False) > > IHTH, > > -JJ > > On Mon, Nov 29, 2010 at 9:08 AM, Nicolas Pinto <nic...@gm...> > wrote: > > Thanks for the quick reply Ben. Let me know how I can help. > > > > Regards, > > > > N > > > > On Sun, Nov 28, 2010 at 6:54 PM, Benjamin Root <ben...@ou...> wrote: > >> On Sunday, November 28, 2010, Nicolas Pinto <nic...@gm...> > wrote: > >>> Dear all, > >>> > >>> I'm trying to get rid of the mplot3d background (in vain, see below), > >>> how can I do this? > >>> > >>> Thanks for your help. > >>> > >>> Best, > >>> > >>> Nicolas > >>> > >>> demo: > >>> > >>> from mpl_toolkits.mplot3d import axes3d, axis3d > >>> import matplotlib.pyplot as plt > >>> import numpy as np > >>> > >>> fig = plt.figure() > >>> ax = axes3d.Axes3D(fig) > >>> > >>> for axis in ax.w_xaxis, ax.w_yaxis, ax.w_zaxis: > >>> for elt in axis.get_ticklines() + axis.get_ticklabels(): > >>> elt.set_visible(False) > >>> > >>> myAXINFO = { > >>> 'x': {'i': 0, 'tickdir': 1, 'juggled': (1, 0, 2), > >>> 'color': (0, 0, 0, 0, 0)}, > >>> 'y': {'i': 1, 'tickdir': 0, 'juggled': (0, 1, 2), > >>> 'color': (0, 0, 0, 0, 0)}, > >>> 'z': {'i': 2, 'tickdir': 0, 'juggled': (0, 2, 1), > >>> 'color': (0, 0, 0, 0, 0)}, > >>> } > >>> > >>> ax.w_xaxis._AXINFO = myAXINFO > >>> ax.w_yaxis._AXINFO = myAXINFO > >>> ax.w_zaxis._AXINFO = myAXINFO > >>> > >>> plt.show() > >>> > >>> > ------------------------------------------------------------------------------ > >>> Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! > >>> Tap into the largest installed PC base & get more eyes on your game by > >>> optimizing for Intel(R) Graphics Technology. Get started today with the > >>> Intel(R) Software Partner Program. Five $500 cash prizes are up for > grabs. > >>> http://p.sf.net/sfu/intelisp-dev2dev > >>> _______________________________________________ > >>> Matplotlib-users mailing list > >>> Mat...@li... > >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >>> > >> > >> Unfortunately, I doubt you will be able to in the current state of > >> mplot3d's code. The background objects get remade at every change of > >> viewing angle or change in the figure window. I am working on some > >> refactoring, but it will be a while before I tackle the drawing > >> behavior. > >> > >> Let me take a look in the next couple of days on a possible workaround > >> > >> Ben Root > >> > > > > > > > > -- > > Nicolas Pinto > > Ph.D. Candidate, Brain & Computer Sciences > > Massachusetts Institute of Technology, USA > > http://web.mit.edu/pinto > > Indeed, Jae-Joon is correct. I now see why Nicolas's code did not work. The assignment of _AXINFO occurred after the initial creation of the axes panels. While the code does reuse the _AXINFO data for some things in later redraws, it does not re-use the color information. I should also point out that changing the _AXINFO data has the side affect of being applicable to all future instantiations of 3D axes within that process run. That could be a bug or a feature, but it is something to be aware of in the future. Ben Root |
From: Matthias M. <Mat...@gm...> - 2010-11-30 16:23:23
|
On Monday November 29 2010 22:01:29 Matthew W. Priddy wrote: > Matplotlib developers, > > I really like using matplotlib to create quality plots, and it seems to > have an option for just about everything. However, one thing that is not > easy to change is the location of minor tick marks. To set major tick > mark locations, one can simply use the "xticks" command. And now we can > atleast turn on the minor tick marks with the "minorticks_on()" command. > > But, is there any way to implement something similar to "xticks" for minor > tick marks? Even better would be a feature that allowed the user to > simply specify the number of minor tick marks that are evenly spaced > between the major tick marks? Hi Matthew, one thing, which should work is the following. If you want to set the positions of minor ticks of an axes 'ax', you can use ax.set_xticks([0.02, 0.04, 0.06, 0.08, 0.1], minor=True) but I'm not an expert and I'm not sure if something like you mentioned is already supported (namely providing the number of minor tick marks). Kind regards, Matthias |
From: Benjamin R. <ben...@ou...> - 2010-11-30 15:00:11
|
On Tue, Nov 30, 2010 at 2:49 AM, David Pine <dp...@ny...> wrote: > Is there a simple way to make a plot with axes that look like those in > test1.png rather than like those in test.png? Here is the code that > produced test.png. Thanks. > > Dave Pine > > import numpy as np > import matplotlib.pyplot as plt > > t = np.linspace(0., 20., 100) > y = np.sin(t) > > fig = plt.figure(1, figsize=(6,3) ) > fig.subplots_adjust(bottom=0.2) > > ax = fig.add_subplot(1,1,1) > ax.plot(t, y) > ax.set_xlabel('t') > ax.set_ylabel('y') > > plt.savefig('test.png') > > plt.show() > > > Dave, I believe that the axis spine feature is what you are looking for: http://matplotlib.sourceforge.net/users/whats_new.html#axis-spine-placement I hope that helps! Ben Root |
From: David P. <dp...@ny...> - 2010-11-30 08:49:30
|
Is there a simple way to make a plot with axes that look like those in test1.png rather than like those in test.png? Here is the code that produced test.png. Thanks. Dave Pine import numpy as np import matplotlib.pyplot as plt t = np.linspace(0., 20., 100) y = np.sin(t) fig = plt.figure(1, figsize=(6,3) ) fig.subplots_adjust(bottom=0.2) ax = fig.add_subplot(1,1,1) ax.plot(t, y) ax.set_xlabel('t') ax.set_ylabel('y') plt.savefig('test.png') plt.show() |
From: Benjamin R. <ben...@ou...> - 2010-11-29 21:05:44
|
On Mon, Nov 29, 2010 at 1:48 PM, Massimo Di Stefano < mas...@gm...> wrote: > Hello All, > > i'm tring to write python code to display images from a directory .. but > i'm not able to learn how to use the matplotlib events > to handle how the images will be displaied. > > simpli i need to pass to the code the path to directory where i have > several tiff files and disply them one at time using a key event. > > to display a single image i'm using somethin like : > > > > #!/usr/bin/env python > from pylab import * > try: > import Image > except ImportError, exc: > raise SystemExit("PIL must be installed to run this example") > import glob > > def dispimg(input): > image = Image.open(input) > im = imshow(image, origin='lower') > show() > > > > ########### > > i tried to define a key action like : > > > def onpress(event): > if event.key=='a': > fig.canvas.draw() > > > # and set my directory with : > > fig = figure() > fig.canvas.mpl_connect('key_press_event', onpress) > TIFFS = glob.glob("/home/habcam/habcamdata/20100820_1840/*.tif") > print "num TIFFS %d" % len(TIFFS) > > ############## > > but i'm not able to learn how to plot them and update the displayed image > using the key bindings : > > for tif in TIFFS: > print tif > show() > > > thanks a lot for Any help! > > > Massimo. > Massimo, You might want to try a different approach. Instead of having a keypress binding, why not just have a normal for-loop with a call to dispimg() and some sort of blocking input like a wait for keypress or something? You might even be able to do something with a while loop that checks for a 'q' input (for quit) and then have two keys be used for forward and backwards progression through your list of TIFFS. Another thing to consider is just not use matplotlib at all, and just use linux's image viewer (called "eog") which you can give it the first file in a directory, and you can use the arrow keys to move through the list of all image files in that directory. I hope that helps, Ben Root |
From: Matthew W. P. <mwp...@gm...> - 2010-11-29 21:01:38
|
Matplotlib developers, I really like using matplotlib to create quality plots, and it seems to have an option for just about everything. However, one thing that is not easy to change is the location of minor tick marks. To set major tick mark locations, one can simply use the "xticks" command. And now we can atleast turn on the minor tick marks with the "minorticks_on()" command. But, is there any way to implement something similar to "xticks" for minor tick marks? Even better would be a feature that allowed the user to simply specify the number of minor tick marks that are evenly spaced between the major tick marks? Thanks. --Matthew |
From: Massimo Di S. <mas...@gm...> - 2010-11-29 19:48:12
|
Hello All, i'm tring to write python code to display images from a directory .. but i'm not able to learn how to use the matplotlib events to handle how the images will be displaied. simpli i need to pass to the code the path to directory where i have several tiff files and disply them one at time using a key event. to display a single image i'm using somethin like : #!/usr/bin/env python from pylab import * try: import Image except ImportError, exc: raise SystemExit("PIL must be installed to run this example") import glob def dispimg(input): image = Image.open(input) im = imshow(image, origin='lower') show() ########### i tried to define a key action like : def onpress(event): if event.key=='a': fig.canvas.draw() # and set my directory with : fig = figure() fig.canvas.mpl_connect('key_press_event', onpress) TIFFS = glob.glob("/home/habcam/habcamdata/20100820_1840/*.tif") print "num TIFFS %d" % len(TIFFS) ############## but i'm not able to learn how to plot them and update the displayed image using the key bindings : for tif in TIFFS: print tif show() thanks a lot for Any help! Massimo. |
From: Michael D. <md...@st...> - 2010-11-29 16:06:33
|
On 11/29/2010 10:52 AM, Daniel Hyams wrote: > Just out of curiosity, is anyone using the fontconfig way of mapping > fonts? I turned it on one day, but the immediate problem was that no > mathtext worked any more; so I turned it back off. Any mathtext in > titles, labels, etc. just rendered as a much of seemingly random letters. That's one of the drawbacks of the fontconfig mode -- probably the main reason it isn't turned on by default. fontconfig only looks in system-standard locations for fonts (by default), and matplotlib installs its special math fonts in a different place. fontconfig provides a C-level API to add another search directory, but it would have to be wrapped for Python. > > And I'll tack a second question in here as well; the reason that I was > playing with fontconfig is that the font cache takes a really long > time to build in certain circumstances (I'm having trouble identifying > exactly when)....so I guess the question is...has anyone else seen > this? For example, on my (2008 vintage) mac mini, a complete rebuild > of the font cache takes around 3 seconds, which is fine. On a macbook > pro (tested on three different machines so far), it takes 30 seconds. > This makes no sense at all to me, so any insights welcome :) It's dependent on a) how many fonts you have installed and b) the performance of the file system they are on. On my Linux machine with a number of network shares involved, it can take a very long time. > > I initially thought that perhaps the other users had a ton more fonts > than I, but I don't think so...if I remember correctly, their font > cache on the macbook pro ended up being smaller than mine on the mini. It's hard to say what might be causing this. However, why are you concerned about it, since the cache only has to be built once? (After all, that is the point of an on-disk font cache in the first place...) Mike > > > On Mon, Nov 29, 2010 at 10:10 AM, Michael Droettboom <md...@st... > <mailto:md...@st...>> wrote: > > The fontManager is essentially a replacement for what fontconfig > provides on many platforms -- so it's intended that the fontManager > doesn't exist if the user opts to use fontconfig. However, that's > still > an "experimental" option because it hasn't been formally tested on > many > platforms, and, as you point out, there may still be code paths that > aren't coded correctly for that option. > > Mike > > On 11/25/2010 10:34 AM, Benjamin Root wrote: > > On Wednesday, November 24, 2010, Daniel Hyams<dh...@gm... > <mailto:dh...@gm...>> wrote: > >> MPL 1.0.0, OSX > >> If USE_FONTCONFIG is turned on, the function > FontProperties.get_size_in_points will sometimes fail, because it > is wanting to use "fontManager", which is still 'None' if > USE_FONTCONFIG is on. I'm not sure if it's the proper way to fix > it, but here is a small patch that works (meaning that at least > the code doesn't die; I can't vouch for much else): > >> > >> > >> ORIGINAL: > >> def get_size_in_points(self): if self._size is not > None: try: return float(self._size) > >> > >> except ValueError: pass > default_size = fontManager.get_default_size() return > default_size * font_scalings.get(self._size) > >> > >> > >> NEW: > >> def get_size_in_points(self): if self._size is not > None: try: return float(self._size) > except ValueError: > >> > >> pass if fontManager: > default_size = fontManager.get_default_size() else: > default_size = rcParams['font.size'] > >> > >> return default_size * font_scalings.get(self._size) > >> > >> -- > >> Daniel Hyams > >> dh...@gm... <mailto:dh...@gm...> > >> > >> > > I personally think that this is reasonable, as it guarantees a size > > value to come from somewhere. However, I am concerned about > > fontManager being None. If it isn't a bug for it to be None at this > > point, then I have to wonder where-else in the code needs a > check for > > None? If it is a bug, then what should it be when USE_FONTCONFIG is > > true? > > > > Good catch Daniel. > > > > Ben Root > > > > > ------------------------------------------------------------------------------ > > Increase Visibility of Your 3D Game App& Earn a Chance To Win $500! > > Tap into the largest installed PC base& get more eyes on your > game by > > optimizing for Intel(R) Graphics Technology. Get started today > with the > > Intel(R) Software Partner Program. Five $500 cash prizes are up > for grabs. > > http://p.sf.net/sfu/intelisp-dev2dev > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > <mailto:Mat...@li...> > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! > Tap into the largest installed PC base & get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today > with the > Intel(R) Software Partner Program. Five $500 cash prizes are up > for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > <mailto:Mat...@li...> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > -- > Daniel Hyams > dh...@gm... <mailto:dh...@gm...> > > > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App& Earn a Chance To Win $500! > Tap into the largest installed PC base& get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Daniel H. <dh...@gm...> - 2010-11-29 15:52:29
|
Just out of curiosity, is anyone using the fontconfig way of mapping fonts? I turned it on one day, but the immediate problem was that no mathtext worked any more; so I turned it back off. Any mathtext in titles, labels, etc. just rendered as a much of seemingly random letters. And I'll tack a second question in here as well; the reason that I was playing with fontconfig is that the font cache takes a really long time to build in certain circumstances (I'm having trouble identifying exactly when)....so I guess the question is...has anyone else seen this? For example, on my (2008 vintage) mac mini, a complete rebuild of the font cache takes around 3 seconds, which is fine. On a macbook pro (tested on three different machines so far), it takes 30 seconds. This makes no sense at all to me, so any insights welcome :) I initially thought that perhaps the other users had a ton more fonts than I, but I don't think so...if I remember correctly, their font cache on the macbook pro ended up being smaller than mine on the mini. On Mon, Nov 29, 2010 at 10:10 AM, Michael Droettboom <md...@st...>wrote: > The fontManager is essentially a replacement for what fontconfig > provides on many platforms -- so it's intended that the fontManager > doesn't exist if the user opts to use fontconfig. However, that's still > an "experimental" option because it hasn't been formally tested on many > platforms, and, as you point out, there may still be code paths that > aren't coded correctly for that option. > > Mike > > On 11/25/2010 10:34 AM, Benjamin Root wrote: > > On Wednesday, November 24, 2010, Daniel Hyams<dh...@gm...> wrote: > >> MPL 1.0.0, OSX > >> If USE_FONTCONFIG is turned on, the function > FontProperties.get_size_in_points will sometimes fail, because it is wanting > to use "fontManager", which is still 'None' if USE_FONTCONFIG is on. I'm > not sure if it's the proper way to fix it, but here is a small patch that > works (meaning that at least the code doesn't die; I can't vouch for much > else): > >> > >> > >> ORIGINAL: > >> def get_size_in_points(self): if self._size is not None: > try: return float(self._size) > >> > >> except ValueError: pass default_size > = fontManager.get_default_size() return default_size * > font_scalings.get(self._size) > >> > >> > >> NEW: > >> def get_size_in_points(self): if self._size is not None: > try: return float(self._size) except > ValueError: > >> > >> pass if fontManager: default_size = > fontManager.get_default_size() else: default_size = > rcParams['font.size'] > >> > >> return default_size * font_scalings.get(self._size) > >> > >> -- > >> Daniel Hyams > >> dh...@gm... > >> > >> > > I personally think that this is reasonable, as it guarantees a size > > value to come from somewhere. However, I am concerned about > > fontManager being None. If it isn't a bug for it to be None at this > > point, then I have to wonder where-else in the code needs a check for > > None? If it is a bug, then what should it be when USE_FONTCONFIG is > > true? > > > > Good catch Daniel. > > > > Ben Root > > > > > ------------------------------------------------------------------------------ > > Increase Visibility of Your 3D Game App& Earn a Chance To Win $500! > > Tap into the largest installed PC base& get more eyes on your game by > > optimizing for Intel(R) Graphics Technology. Get started today with the > > Intel(R) Software Partner Program. Five $500 cash prizes are up for > grabs. > > http://p.sf.net/sfu/intelisp-dev2dev > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! > Tap into the largest installed PC base & get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Daniel Hyams dh...@gm... |
From: Michael D. <md...@st...> - 2010-11-29 15:19:19
|
I think you may have an .afm font file on your system that the AFM parser in matplotlib is having trouble with. Can you use the debugger to figure out what the value of "fpath" is on line 578 of font_manager.py is in the traceback below? Then we could figure out what the difficult file is. Mike On 11/25/2010 08:54 PM, Daoliang Tan wrote: > Dear all, > > I am facing a weird problem when I import pylab or pyplot modules. > Right now, I can successfully import matplotlib. But after I issue > the command "ipython -pylab --verbose-helpful", I get the following > error: > ================================================================================================================================================= > $HOME=/home/michael > CONFIGDIR=/home/michael/.matplotlib > matplotlib data path /usr/share/matplotlib/mpl-data > loaded rc file /etc/matplotlibrc > matplotlib version 0.99.3 > verbose.level helpful > interactive is False > units is False > platform is linux2 > font search path ['/usr/share/matplotlib/mpl-data/fonts/ttf', > '/usr/share/matplotlib/mpl-data/fonts/afm'] > Traceback (most recent call last): > File "/usr/bin/ipython", line 28, in<module> > IPython.Shell.start().mainloop() > File "/usr/lib/pymodules/python2.6/IPython/Shell.py", line 1241, in start > return shell(user_ns = user_ns) > File "/usr/lib/pymodules/python2.6/IPython/Shell.py", line 1106, in __init__ > shell_class=MatplotlibShell) > File "/usr/lib/pymodules/python2.6/IPython/Shell.py", line 73, in __init__ > debug=debug,shell_class=shell_class) > File "/usr/lib/pymodules/python2.6/IPython/ipmaker.py", line 100, in > make_IPython > embedded=embedded,**kw) > File "/usr/lib/pymodules/python2.6/IPython/Shell.py", line 627, in __init__ > user_ns,user_global_ns,b2 = > self._matplotlib_config(name,user_ns,user_global_ns) > File "/usr/lib/pymodules/python2.6/IPython/Shell.py", line 556, in > _matplotlib_config > import matplotlib.pylab as pylab > File "/usr/lib/pymodules/python2.6/matplotlib/pylab.py", line 206, in<module> > from matplotlib import mpl # pulls in most modules > File "/usr/lib/pymodules/python2.6/matplotlib/mpl.py", line 2, in<module> > from matplotlib import axis > File "/usr/lib/pymodules/python2.6/matplotlib/axis.py", line 10, in<module> > import matplotlib.font_manager as font_manager > File "/usr/lib/pymodules/python2.6/matplotlib/font_manager.py", line > 1301, in<module> > _rebuild() > File "/usr/lib/pymodules/python2.6/matplotlib/font_manager.py", line > 1292, in _rebuild > fontManager = FontManager() > File "/usr/lib/pymodules/python2.6/matplotlib/font_manager.py", line > 1010, in __init__ > self.afmlist = createFontList(self.afmfiles, fontext='afm') > File "/usr/lib/pymodules/python2.6/matplotlib/font_manager.py", line > 578, in createFontList > font = afm.AFM(fh) > File "/usr/lib/pymodules/python2.6/matplotlib/afm.py", line 303, in __init__ > parse_afm(fh) > File "/usr/lib/pymodules/python2.6/matplotlib/afm.py", line 291, in parse_afm > dcmetrics_ascii, dcmetrics_name = _parse_char_metrics(fh) > File "/usr/lib/pymodules/python2.6/matplotlib/afm.py", line 176, in > _parse_char_metrics > bbox = _to_list_of_floats(vals[3][2:]) > File "/usr/lib/pymodules/python2.6/matplotlib/afm.py", line 58, in > _to_list_of_floats > return [_to_float(val) for val in s.split()] > ValueError: invalid literal for float(): uni2605 > =========================================================================================================================================== > > Each time, as long as I import pylab OR pyplot, I will obtain > "ValueError: invalid literal for float(): uni2605". After googling a > long time, I can not get an idea to address this issue. Can anyone > give me some hints? > > My computer configuration is the following: > > 1. OS: debian squeeze Linux 2.6.32-5-amd64 #1 SMP Sat Oct 30 14:18:21 > UTC 2010 x86_64 GNU/Linux > 2. matplotlib version: 0.99.3 > 3. The matplotlib is installed from the debian repository. > 4. no any special customization of "matplotlibrc" > 5. import pylab will produce this error. > 6. python version: 2.6.6-3 > > > I have reinstalled these packages many times and this does not solve > this issue. > > Thanks for your help! > > Daoliang > > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App& Earn a Chance To Win $500! > Tap into the largest installed PC base& get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Michael D. <md...@st...> - 2010-11-29 15:11:07
|
The fontManager is essentially a replacement for what fontconfig provides on many platforms -- so it's intended that the fontManager doesn't exist if the user opts to use fontconfig. However, that's still an "experimental" option because it hasn't been formally tested on many platforms, and, as you point out, there may still be code paths that aren't coded correctly for that option. Mike On 11/25/2010 10:34 AM, Benjamin Root wrote: > On Wednesday, November 24, 2010, Daniel Hyams<dh...@gm...> wrote: >> MPL 1.0.0, OSX >> If USE_FONTCONFIG is turned on, the function FontProperties.get_size_in_points will sometimes fail, because it is wanting to use "fontManager", which is still 'None' if USE_FONTCONFIG is on. I'm not sure if it's the proper way to fix it, but here is a small patch that works (meaning that at least the code doesn't die; I can't vouch for much else): >> >> >> ORIGINAL: >> def get_size_in_points(self): if self._size is not None: try: return float(self._size) >> >> except ValueError: pass default_size = fontManager.get_default_size() return default_size * font_scalings.get(self._size) >> >> >> NEW: >> def get_size_in_points(self): if self._size is not None: try: return float(self._size) except ValueError: >> >> pass if fontManager: default_size = fontManager.get_default_size() else: default_size = rcParams['font.size'] >> >> return default_size * font_scalings.get(self._size) >> >> -- >> Daniel Hyams >> dh...@gm... >> >> > I personally think that this is reasonable, as it guarantees a size > value to come from somewhere. However, I am concerned about > fontManager being None. If it isn't a bug for it to be None at this > point, then I have to wonder where-else in the code needs a check for > None? If it is a bug, then what should it be when USE_FONTCONFIG is > true? > > Good catch Daniel. > > Ben Root > > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App& Earn a Chance To Win $500! > Tap into the largest installed PC base& get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Michael D. <md...@st...> - 2010-11-29 15:08:41
|
That is correct. Matplotlib doesn't have font substitution support -- it only ever uses a single font for each text object. You will need to use separate text objects to do this kind of multi-lingual text, unless you can find a single font with all of the glyphs. Mike On 11/24/2010 10:19 PM, honglei junan wrote: > > > i get matplotlib from Sourceforge ,it's matplotlib-1.0.0.win32-py2.6.exe > OS:Win7 > > ActivePython-2.6.6.15-win32-x86.msi > here is the code: > > # -*- coding: utf-8 -*- > import matplotlib.pyplot as plt > plt.figure(figsize=(8,4)) > a = plt.text(0.05, 0.05, u"Default Font缺省字体조선어にほんごภาษา > ไทย")#multi language ,some cann't display > plt.text(0.05, 0.45, u"Microsoft YaHei微软雅黑", > fontproperties='Microsoft YaHei')#Chinese OK > plt.text(0.05, 0.25, u"LilyUPCภาษาไทย", > fontproperties='LilyUPC')#Tai OK > plt.xlabel(u"xlabelにほん ご",fontproperties='STXihei')#Japanese ,OK > plt.ylabel(u"ylabel조선 어",fontproperties='Malgun Gothic')#Korea,OK > plt.show() > > > C:\Python26\Lib\site-packages\matplotlib\mpl-data\matplotlibrc: > > > > font.family : sans-serif > font.sans-serif : Microsoft YaHei,Malgun > Gothic,LilyUPC,FangSong,YouYuan,SimHei,STKaiti,STSong,SimSun-ExtB,Webdings,Bitstream > Vera Sans, Lucida Grande, Verdana, Geneva, Lucid, Arial, Helvetica, > Avant Garde, sans-serif > > it seems if a default font doesn't have all char's in the "Default > Font缺省字体조선어にほんごภาษาไทย" string,it won't display correctly. > > > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App& Earn a Chance To Win $500! > Tap into the largest installed PC base& get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Pascal H. <Pas...@un...> - 2010-11-29 08:29:25
|
Hi everybody, I'm trying to insert polar axes into another axis. I need to place many windrose-like plots (bar plots in a polar axis) inside an xy plot. I need them to move while panning the xy plot. To do so, I tried with inset_axes, but I cannot force the new axis to be polar. Or is there a better way to to it ? Here is the code: ---- #!/usr/bin/python import matplotlib.pyplot as plt import numpy as np import mpl_toolkits.axes_grid1.inset_locator as iloc angleStart = 0.75 angleEnd = 2.5 ringOutterLimit = 0.95 ringWidth = 0.4 lineWidth = 1 values = np.array([0., 0.3, 0.95, 0.5, 0.1]) # Figure and main axis fig = plt.figure(figsize=(5,5)) ax1 = fig.add_subplot(111) ax1.plot([0,1], [0,1]) ax1.set_aspect(1.) # Second axis ax2 = iloc.inset_axes(ax1, width="100%", height="100%", loc=3, bbox_to_anchor=(0.3, 0.5, 0.1, 0.1), bbox_transform=ax1.transData) bars = ax2.bar([np.pi/2., np.pi], [0.5, 0.2], width=.1*np.pi) # Third axis ax3 = iloc.inset_axes(ax1, width="100%", height="100%", loc=3, bbox_to_anchor=(0.5, 0.7, 0.1, 0.1), bbox_transform=ax1.transData) bars = ax3.bar([np.pi/2., np.pi/4.], [0.1, 0.4], width=.1*np.pi) plt.show() ---- Thanks a lot, Pascal |
From: Amit F. <ami...@gm...> - 2010-11-29 08:08:35
|
Hi, I am trying to produce a pcolor figure with a black background using pylab.figure(facecolor = 'black') Consequently, I need to change the tick colors and xlabel and ylabel colors to white using pylab.xlabel('whatever is on the xlabel', color = 'white', fontsize = 14) pylab.ylabel('whatever is on the ylabel', color = 'white', fontsize = 14) pylab.yticks(color = 'white') pylab.xticks(color = 'white') Up to this point, everything is OK. The next thing I need to do is change the colors of the ticks and the ticklabels in the colorbar. I understand that there are no simple pylab. commands which do so. I saw in some matplotlib-users messages that one can write the following to change the fontsize, for example: for t in cb.ax.get_yticklabels(): t.set_fontsize(14) I tried adding another line to this loop: t.set_color('white') On one hand, there is no error message during parsing or compilation. On the other hand, nothing actually changes, i.e. the color of the ticklabels and ticks stays black. How does one change this property? Amit |
From: Jae-Joon L. <lee...@gm...> - 2010-11-29 02:36:23
|
Unfortunately, matplotlib does not support fontset, and only a single font file can be used at a time. If you need to to use multiple fonts within a single text string, the only workaround I can think of is to use the offsetbox module to make a text for each font and concatenate them. If you're interested, I'll post the code. -JJ On Thu, Nov 25, 2010 at 12:19 PM, honglei junan <jho...@gm...> wrote: > > > i get matplotlib from Sourceforge ,it's matplotlib-1.0.0.win32-py2.6.exe > OS:Win7 > ActivePython-2.6.6.15-win32-x86.msi > here is the code: > > # -*- coding: utf-8 -*- > import matplotlib.pyplot as plt > plt.figure(figsize=(8,4)) > a = plt.text(0.05, 0.05, u"Default Font缺省字体조선어にほんごภาษาไทย")#multi language > ,some cann't display > plt.text(0.05, 0.45, u"Microsoft YaHei微软雅黑", fontproperties='Microsoft > YaHei')#Chinese OK > plt.text(0.05, 0.25, u"LilyUPCภาษาไทย", fontproperties='LilyUPC')#Tai OK > plt.xlabel(u"xlabelにほんご",fontproperties='STXihei')#Japanese ,OK > plt.ylabel(u"ylabel조선어",fontproperties='Malgun Gothic')#Korea,OK > plt.show() > > C:\Python26\Lib\site-packages\matplotlib\mpl-data\matplotlibrc: > font.family : sans-serif font.sans-serif : Microsoft YaHei,Malgun > Gothic,LilyUPC,FangSong,YouYuan,SimHei,STKaiti,STSong,SimSun-ExtB,Webdings,Bitstream > Vera Sans, Lucida Grande, Verdana, Geneva, Lucid, Arial, Helvetica, Avant > Garde, sans-serif > it seems if a default font doesn't have all char's in the "Default > Font缺省字体조선어にほんごภาษาไทย" string,it won't display correctly. > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! > Tap into the largest installed PC base & get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
From: C M <cmp...@gm...> - 2010-11-29 01:52:43
|
How can I correctly subclass AutoDateFormatter and use it in my code? What I am doing is copying the code from matplotlib's AutoDateFormatter and changing the strings for how the dates are represented and making that a class, MyAutoDateFormatter. AutoDateFormatter expects a locator, and I think (?) the default is AutoDateLocator. So in my code I am doing this: adl = AutoDateLocator() myformatter = MyAutoDateFormatter(adl) axis.xaxis.set_major_formatter(myformatter) But when I run it, no matter the level of zoom, it says "2010" (when it should change depending on zoom level). However, if I go into the matplotlib dates.py code itself and save the same changes to the date strings there, and I comment out the above code, then it works: the date strings change depending on level of zoom. I could just leave it changed in mpl's dates.py module, but I'd rather subclass AutoDateFormatter so that if I share the source code of my app with others, it will get this right. What am I doing wrong? Thanks, and any help appreciated as always. Che |
From: Jae-Joon L. <lee...@gm...> - 2010-11-29 01:48:53
|
If you want the whole background to disappear, simply call set_axis_off method. ax.set_axis_off() To control the visibility of each element, use something like below. for axis in ax.w_xaxis, ax.w_yaxis, ax.w_zaxis: for elt in axis.get_ticklines() + axis.get_ticklabels(): elt.set_visible(False) axis.pane.set_visible(False) axis.gridlines.set_visible(False) axis.line.set_visible(False) IHTH, -JJ On Mon, Nov 29, 2010 at 9:08 AM, Nicolas Pinto <nic...@gm...> wrote: > Thanks for the quick reply Ben. Let me know how I can help. > > Regards, > > N > > On Sun, Nov 28, 2010 at 6:54 PM, Benjamin Root <ben...@ou...> wrote: >> On Sunday, November 28, 2010, Nicolas Pinto <nic...@gm...> wrote: >>> Dear all, >>> >>> I'm trying to get rid of the mplot3d background (in vain, see below), >>> how can I do this? >>> >>> Thanks for your help. >>> >>> Best, >>> >>> Nicolas >>> >>> demo: >>> >>> from mpl_toolkits.mplot3d import axes3d, axis3d >>> import matplotlib.pyplot as plt >>> import numpy as np >>> >>> fig = plt.figure() >>> ax = axes3d.Axes3D(fig) >>> >>> for axis in ax.w_xaxis, ax.w_yaxis, ax.w_zaxis: >>> for elt in axis.get_ticklines() + axis.get_ticklabels(): >>> elt.set_visible(False) >>> >>> myAXINFO = { >>> 'x': {'i': 0, 'tickdir': 1, 'juggled': (1, 0, 2), >>> 'color': (0, 0, 0, 0, 0)}, >>> 'y': {'i': 1, 'tickdir': 0, 'juggled': (0, 1, 2), >>> 'color': (0, 0, 0, 0, 0)}, >>> 'z': {'i': 2, 'tickdir': 0, 'juggled': (0, 2, 1), >>> 'color': (0, 0, 0, 0, 0)}, >>> } >>> >>> ax.w_xaxis._AXINFO = myAXINFO >>> ax.w_yaxis._AXINFO = myAXINFO >>> ax.w_zaxis._AXINFO = myAXINFO >>> >>> plt.show() >>> >>> ------------------------------------------------------------------------------ >>> Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! >>> Tap into the largest installed PC base & get more eyes on your game by >>> optimizing for Intel(R) Graphics Technology. Get started today with the >>> Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. >>> http://p.sf.net/sfu/intelisp-dev2dev >>> _______________________________________________ >>> Matplotlib-users mailing list >>> Mat...@li... >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>> >> >> Unfortunately, I doubt you will be able to in the current state of >> mplot3d's code. The background objects get remade at every change of >> viewing angle or change in the figure window. I am working on some >> refactoring, but it will be a while before I tackle the drawing >> behavior. >> >> Let me take a look in the next couple of days on a possible workaround >> >> Ben Root >> > > > > -- > Nicolas Pinto > Ph.D. Candidate, Brain & Computer Sciences > Massachusetts Institute of Technology, USA > http://web.mit.edu/pinto > > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! > Tap into the largest installed PC base & get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Nicolas P. <nic...@gm...> - 2010-11-29 00:08:36
|
Thanks for the quick reply Ben. Let me know how I can help. Regards, N On Sun, Nov 28, 2010 at 6:54 PM, Benjamin Root <ben...@ou...> wrote: > On Sunday, November 28, 2010, Nicolas Pinto <nic...@gm...> wrote: >> Dear all, >> >> I'm trying to get rid of the mplot3d background (in vain, see below), >> how can I do this? >> >> Thanks for your help. >> >> Best, >> >> Nicolas >> >> demo: >> >> from mpl_toolkits.mplot3d import axes3d, axis3d >> import matplotlib.pyplot as plt >> import numpy as np >> >> fig = plt.figure() >> ax = axes3d.Axes3D(fig) >> >> for axis in ax.w_xaxis, ax.w_yaxis, ax.w_zaxis: >> for elt in axis.get_ticklines() + axis.get_ticklabels(): >> elt.set_visible(False) >> >> myAXINFO = { >> 'x': {'i': 0, 'tickdir': 1, 'juggled': (1, 0, 2), >> 'color': (0, 0, 0, 0, 0)}, >> 'y': {'i': 1, 'tickdir': 0, 'juggled': (0, 1, 2), >> 'color': (0, 0, 0, 0, 0)}, >> 'z': {'i': 2, 'tickdir': 0, 'juggled': (0, 2, 1), >> 'color': (0, 0, 0, 0, 0)}, >> } >> >> ax.w_xaxis._AXINFO = myAXINFO >> ax.w_yaxis._AXINFO = myAXINFO >> ax.w_zaxis._AXINFO = myAXINFO >> >> plt.show() >> >> ------------------------------------------------------------------------------ >> Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! >> Tap into the largest installed PC base & get more eyes on your game by >> optimizing for Intel(R) Graphics Technology. Get started today with the >> Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. >> http://p.sf.net/sfu/intelisp-dev2dev >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > Unfortunately, I doubt you will be able to in the current state of > mplot3d's code. The background objects get remade at every change of > viewing angle or change in the figure window. I am working on some > refactoring, but it will be a while before I tackle the drawing > behavior. > > Let me take a look in the next couple of days on a possible workaround > > Ben Root > -- Nicolas Pinto Ph.D. Candidate, Brain & Computer Sciences Massachusetts Institute of Technology, USA http://web.mit.edu/pinto |
From: Benjamin R. <ben...@ou...> - 2010-11-28 23:54:57
|
On Sunday, November 28, 2010, Nicolas Pinto <nic...@gm...> wrote: > Dear all, > > I'm trying to get rid of the mplot3d background (in vain, see below), > how can I do this? > > Thanks for your help. > > Best, > > Nicolas > > demo: > > from mpl_toolkits.mplot3d import axes3d, axis3d > import matplotlib.pyplot as plt > import numpy as np > > fig = plt.figure() > ax = axes3d.Axes3D(fig) > > for axis in ax.w_xaxis, ax.w_yaxis, ax.w_zaxis: > for elt in axis.get_ticklines() + axis.get_ticklabels(): > elt.set_visible(False) > > myAXINFO = { > 'x': {'i': 0, 'tickdir': 1, 'juggled': (1, 0, 2), > 'color': (0, 0, 0, 0, 0)}, > 'y': {'i': 1, 'tickdir': 0, 'juggled': (0, 1, 2), > 'color': (0, 0, 0, 0, 0)}, > 'z': {'i': 2, 'tickdir': 0, 'juggled': (0, 2, 1), > 'color': (0, 0, 0, 0, 0)}, > } > > ax.w_xaxis._AXINFO = myAXINFO > ax.w_yaxis._AXINFO = myAXINFO > ax.w_zaxis._AXINFO = myAXINFO > > plt.show() > > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! > Tap into the largest installed PC base & get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > Unfortunately, I doubt you will be able to in the current state of mplot3d's code. The background objects get remade at every change of viewing angle or change in the figure window. I am working on some refactoring, but it will be a while before I tackle the drawing behavior. Let me take a look in the next couple of days on a possible workaround Ben Root |
From: Nicolas P. <nic...@gm...> - 2010-11-28 19:10:35
|
Dear all, I'm trying to get rid of the mplot3d background (in vain, see below), how can I do this? Thanks for your help. Best, Nicolas demo: from mpl_toolkits.mplot3d import axes3d, axis3d import matplotlib.pyplot as plt import numpy as np fig = plt.figure() ax = axes3d.Axes3D(fig) for axis in ax.w_xaxis, ax.w_yaxis, ax.w_zaxis: for elt in axis.get_ticklines() + axis.get_ticklabels(): elt.set_visible(False) myAXINFO = { 'x': {'i': 0, 'tickdir': 1, 'juggled': (1, 0, 2), 'color': (0, 0, 0, 0, 0)}, 'y': {'i': 1, 'tickdir': 0, 'juggled': (0, 1, 2), 'color': (0, 0, 0, 0, 0)}, 'z': {'i': 2, 'tickdir': 0, 'juggled': (0, 2, 1), 'color': (0, 0, 0, 0, 0)}, } ax.w_xaxis._AXINFO = myAXINFO ax.w_yaxis._AXINFO = myAXINFO ax.w_zaxis._AXINFO = myAXINFO plt.show() |
From: Christoph G. <cg...@uc...> - 2010-11-27 00:59:03
|
On 11/26/2010 2:28 AM, Fred Pollard wrote: > Hi, > I'm trying to install matplotlib on a windows machine at work to try and > demonstrate its usefulness. I have Python 2.6 installed and managed to > use the numpy binary install without admin priviledges. > The matplotlib binary installer, however, requires admin priviledges, > and I don't understand why - is an alternative installer available, > because otherwise, I'll have to drop matplotlib and Python for somethign > else, as IT will take a month or two to install it for me. > I know I could build it myself, but the same restrictions are causing > problems getting the pre-requisites installed! > Cheers, > Fred > > The matplotlib installers for Windows are executable ZIP files generated by Python's builtin distutils package with the --user-access-control=auto option. See the following links for previous discussions and a workaround for your problem. <http://sourceforge.net/tracker/?func=detail&aid=2858636&group_id=80706&atid=560720> <http://www.mail-archive.com/mat...@li.../msg17728.html> <http://www.mail-archive.com/mat...@li.../msg13466.html> Christoph |
From: Benjamin R. <ben...@ou...> - 2010-11-26 21:45:08
|
On Friday, November 26, 2010, Fred Pollard <fre...@gm...> wrote: > Hi, > > I'm trying to install matplotlib on a windows machine at work to try and demonstrate its usefulness. I have Python 2.6 installed and managed to use the numpy binary install without admin priviledges. > > The matplotlib binary installer, however, requires admin priviledges, and I don't understand why - is an alternative installer available, because otherwise, I'll have to drop matplotlib and Python for somethign else, as IT will take a month or two to install it for me. > > > I know I could build it myself, but the same restrictions are causing problems getting the pre-requisites installed! > > Cheers, > Fred > Fred I have not tried installing mpl on windows, but when building on Linux, I can pass the --user option in the command-line to setupegg.py to do a local build and install. Maybe the same is available on Windows? Ben Root |