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
(1) |
2
|
3
(10) |
4
(17) |
5
(7) |
6
(21) |
7
(15) |
8
(6) |
9
(7) |
10
(8) |
11
(6) |
12
(11) |
13
(11) |
14
(13) |
15
(4) |
16
(5) |
17
(8) |
18
(8) |
19
(15) |
20
(3) |
21
(10) |
22
(5) |
23
(7) |
24
(8) |
25
(29) |
26
(26) |
27
(7) |
28
(2) |
29
(3) |
30
(3) |
|
|
|
|
|
|
Hi all, I've been having some trouble getting interactive mode to work correctly with the WxAgg backend. I have these versions: [craigb@xxxxxx hists]$ python Python 2.7.3 (default, Aug 13 2012, 16:13:38) [GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import matplotlib >>> matplotlib.__version__ '1.1.1rc' >>> import wx >>> wx.__version__ '2.8.12.1' >>> When I do something like this, >>> from matplotlib import pyplot >>> import numpy >>> pyplot.plot(numpy.arange(10), numpy.arange(10), 'r.') [<matplotlib.lines.Line2D object at 0x5561750>] >>> pyplot.show() I get a good-looking window with my plot. I can mouse over the window and get coordinates, there are buttons on the bottom of the window that I can push, etc. However, if I turn on interactive mode (I read somewhere that it's bad to turn on interactive mode after you've already made a plot, so below I've exited and started a new interactive session), >>> from matplotlib import pyplot >>> import numpy >>> pyplot.ion() >>> pyplot.plot(numpy.arange(10), numpy.arange(10), 'r.') [<matplotlib.lines.Line2D object at 0x153e2ad0>] Nothing shows at this point. If I continue, >>> pyplot.show() Still nothing shows. If I exit right now, I get a brief glimpse of my plot before python exits completely. I can get the plot to show by doing >>> pyplot.draw() But it's only the top half of the plot, and if I drag another window on top of it, it doesn't automatically redraw. No buttons, no mouse-over niceness. Issuing pyplot.draw() again gets me the full plot, but no mouse-overs, no buttons, and no redraw. Both MPL and wxPython were built from source on a RHEL5.8 machine, so maybe it's the libraries I am linking against...? Anyway, I've attached two screenshots of what my plots look like when they finally are drawn. Many many thanks in advance! --cb
Le 26/09/2012 15:25, Benjamin Root a écrit : > > Actually, if you are using the latest numpy (the 1.7 beta), that will > also not work unless you are using py3k or did "from __future__ import > division". Well, actually, using np.divide will always result in > integer division (this may or may not be a bug). Good point, I forgot I had set "from __future__ import division" some months ago in my IPython startup settings. So indeed, explicit casting to float is the safest approach. Best, Pierre
On Wed, Sep 26, 2012 at 10:27 AM, Michael Rawlins <raw...@ya...>wrote: > Recently built and installed netCDF4-1.0. I'm running a script that has > worked on two other linux OS systems. Error: > > File "test.py", line 96, in <module> > data.missing_value=-9.99 > File "netCDF4.pyx", line 2570, in netCDF4.Variable.__setattr__ > (netCDF4.c:28242) > File "netCDF4.pyx", line 2392, in netCDF4.Variable.setncattr > (netCDF4.c:26309) > File "netCDF4.pyx", line 1013, in netCDF4._set_att (netCDF4.c:12699) > AttributeError: NetCDF: Write to read only > > > The statement in the code triggers the error is: > > data.missing_value=-9.99 . > > MR > > > This typically happens when one opens a netCDF4 Dataset object in 'r' mode, and/or if the file permissions for the file was set to read-only. When modifying an attribute, it is technically trying to write to the file. Ben Root
Recently built and installed netCDF4-1.0. I'm running a script that has worked on two other linux OS systems. Error: File "test.py", line 96, in <module> data.missing_value=-9.99 File "netCDF4.pyx", line 2570, in netCDF4.Variable.__setattr__ (netCDF4.c:28242) File "netCDF4.pyx", line 2392, in netCDF4.Variable.setncattr (netCDF4.c:26309) File "netCDF4.pyx", line 1013, in netCDF4._set_att (netCDF4.c:12699) AttributeError: NetCDF: Write to read only The statement in the code triggers the error is: data.missing_value=-9.99 . MR
On 09/26/2012 09:33 AM, Benjamin Root wrote: > > > On Wed, Sep 26, 2012 at 9:10 AM, Michael Droettboom <md...@st... > <mailto:md...@st...>> wrote: > > On 09/26/2012 12:28 AM, jos...@gm... > <mailto:jos...@gm...> wrote: > > On Wed, Sep 26, 2012 at 12:05 AM, Paul Tremblay > <pau...@gm... <mailto:pau...@gm...>> wrote: > >> In R, there are many default data sets one can use to both > illustrate code > >> and explore the scripting language. Instead of having to fake > data, one can > >> pull from meaningful data sets, created in the real world. For > example, this > >> one liner actually produces a plot: > >> > >> plot(mtcars$hp~mtcars$mpg) > >> > >> where mtcars refers to a built-in data set taken from Motor > Trend Magazine. > >> I don't believe matplotlib has anything similar. I have started > to download > >> some of the R data sets and store them as pickles for my own > use. Does > >> anyone else have any interest in creating a repository for > these data sets > >> or otherwise sharing them in some way? > > Vincent converted several R datasets back to csv, that can be easily > > loaded from the web with, for example, pandas. > > http://vincentarelbundock.github.com/Rdatasets/ > > The collection is a bit random. > > > > statsmodels has some datasets that we use for examples and tests > > http://statsmodels.sourceforge.net/devel/datasets/index.html > > We were always a bit slow with adding datasets because we were too > > cautious about licensing issues. But R seems to get away with > > considering most datasets to be public domain. > > We keep adding datasets to statsmodels as we need them for new > models. > > > > The machine learning packages like sklearn have packaged the typical > > machine learning datasets. > > > > If you are interested, you could join up with statsmodels or with > > Vincent to expand on what's available. > > > It seems to me like contributing to (rather than duplicating) the work > of one of these projects would be a great idea. It would also be nice > to add functionality in matplotlib to make it easier to download these > things as a one-off -- obviously not exactly the same syntax as > with R, > but ideally with a single function call. > > Mike > > > We did have such a thing. matplotlib.cbook.get_sample_data(). I think > we got rid of it for 1.2.0? It was removed because the server side was a moving target and would constantly break. It was based on pulling files out of the svn (and later git) repository, and sourceforge and github have had a habit of changing the urls used to do so. All of the data that was there was moved into the main repository and is now installed alongside matplotlib, so get_sample_data() still works. See this PR: https://github.com/matplotlib/matplotlib/pull/498 I should have mentioned it earlier, that we do have a very small set of standard data sets included there -- but these other projects linked to above are much better and more extensive. If we can rely on them to have static urls over time, I think they are much better options than anything matplotlib has had in the past. Mike
On Wed, Sep 26, 2012 at 9:33 AM, Benjamin Root <ben...@ou...> wrote: > > > On Wed, Sep 26, 2012 at 9:10 AM, Michael Droettboom <md...@st...> wrote: >> >> On 09/26/2012 12:28 AM, jos...@gm... wrote: >> > On Wed, Sep 26, 2012 at 12:05 AM, Paul Tremblay >> > <pau...@gm...> wrote: >> >> In R, there are many default data sets one can use to both illustrate >> >> code >> >> and explore the scripting language. Instead of having to fake data, one >> >> can >> >> pull from meaningful data sets, created in the real world. For example, >> >> this >> >> one liner actually produces a plot: >> >> >> >> plot(mtcars$hp~mtcars$mpg) >> >> >> >> where mtcars refers to a built-in data set taken from Motor Trend >> >> Magazine. >> >> I don't believe matplotlib has anything similar. I have started to >> >> download >> >> some of the R data sets and store them as pickles for my own use. Does >> >> anyone else have any interest in creating a repository for these data >> >> sets >> >> or otherwise sharing them in some way? >> > Vincent converted several R datasets back to csv, that can be easily >> > loaded from the web with, for example, pandas. >> > http://vincentarelbundock.github.com/Rdatasets/ >> > The collection is a bit random. >> > >> > statsmodels has some datasets that we use for examples and tests >> > http://statsmodels.sourceforge.net/devel/datasets/index.html >> > We were always a bit slow with adding datasets because we were too >> > cautious about licensing issues. But R seems to get away with >> > considering most datasets to be public domain. >> > We keep adding datasets to statsmodels as we need them for new models. >> > >> > The machine learning packages like sklearn have packaged the typical >> > machine learning datasets. >> > >> > If you are interested, you could join up with statsmodels or with >> > Vincent to expand on what's available. >> > >> It seems to me like contributing to (rather than duplicating) the work >> of one of these projects would be a great idea. It would also be nice >> to add functionality in matplotlib to make it easier to download these >> things as a one-off -- obviously not exactly the same syntax as with R, >> but ideally with a single function call. >> >> Mike >> > > We did have such a thing. matplotlib.cbook.get_sample_data(). I think we > got rid of it for 1.2.0? I don't know the details, but it looks like in pandas they spend some time on python 3 compatibility, in case that was a problem https://github.com/pydata/pandas/pull/970 Josef > > Ben > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
On Wed, Sep 26, 2012 at 9:10 AM, Michael Droettboom <md...@st...> wrote: > On 09/26/2012 12:28 AM, jos...@gm... wrote: > > On Wed, Sep 26, 2012 at 12:05 AM, Paul Tremblay <pau...@gm...> > wrote: > >> In R, there are many default data sets one can use to both illustrate > code > >> and explore the scripting language. Instead of having to fake data, one > can > >> pull from meaningful data sets, created in the real world. For example, > this > >> one liner actually produces a plot: > >> > >> plot(mtcars$hp~mtcars$mpg) > >> > >> where mtcars refers to a built-in data set taken from Motor Trend > Magazine. > >> I don't believe matplotlib has anything similar. I have started to > download > >> some of the R data sets and store them as pickles for my own use. Does > >> anyone else have any interest in creating a repository for these data > sets > >> or otherwise sharing them in some way? > > Vincent converted several R datasets back to csv, that can be easily > > loaded from the web with, for example, pandas. > > http://vincentarelbundock.github.com/Rdatasets/ > > The collection is a bit random. > > > > statsmodels has some datasets that we use for examples and tests > > http://statsmodels.sourceforge.net/devel/datasets/index.html > > We were always a bit slow with adding datasets because we were too > > cautious about licensing issues. But R seems to get away with > > considering most datasets to be public domain. > > We keep adding datasets to statsmodels as we need them for new models. > > > > The machine learning packages like sklearn have packaged the typical > > machine learning datasets. > > > > If you are interested, you could join up with statsmodels or with > > Vincent to expand on what's available. > > > It seems to me like contributing to (rather than duplicating) the work > of one of these projects would be a great idea. It would also be nice > to add functionality in matplotlib to make it easier to download these > things as a one-off -- obviously not exactly the same syntax as with R, > but ideally with a single function call. > > Mike > > We did have such a thing. matplotlib.cbook.get_sample_data(). I think we got rid of it for 1.2.0? Ben
On Wed, Sep 26, 2012 at 5:58 AM, Pierre Haessig <pie...@cr...>wrote: > Hello, > > In relation to the recent thread on pareto chart, I have a question with > regards to the synchronization of ticks location when using twinx plots. > This question may have been adressed in the past, but my Google search > on this topic was unfruitful. Sorry if this question was already answered. > > Basically, when using twinx two plot two different data sets, the scale > of the data, in the general case, is to be different (thus the need for > twinx). However, adding a grid to such a twinx plot leads to a very > irregular placement because the ticks positions are not "synchronized". > (I pasted a quick example to illustrate the tick placement issue at the > end of this message) > > Ideally, I would like that both axis share a common placement for the > ticks. Is there a way to do that ? > > I guess this would require that the two ticks Locators share "some > algorithm" so that they would "agree" on the placement instead of > working separetely. Other option may be that one Locator could work as a > slave of the other one. (I'm just trying to draw a rough picture) > > Best, > Pierre > > quick example to illustrate the tick placement issue : > > import matplotlib.pyplot as plt > > ax1 = plt.subplot(111) > ax1.plot([1,2,3], 'bo-') > ax1.grid(True) > > ax2 = plt.twinx(ax1) > ax2.plot([11,12], 'rs-') > ax2.grid(True) > > ax1.set_xlim(-0.5,2.5) > > plt.show() > > > Probably could have the two axes listen for an "xlim_changed" event, check to see if it belongs to its twin, and update itself accordingly (without emitting). Ben Root
On Wed, Sep 26, 2012 at 4:31 AM, Pierre Haessig <pie...@cr...>wrote: > Hi, > > Just a detail : > > Le 26/09/2012 04:29, Paul Tremblay a écrit : > > percent = (np.divide(the_cumsum, the_sum)) * 100 > > This lines doesn't work on my computer (numpy 1.6.2) > > Indeed, there is a casting issue : > In [2]: percent > Out[2]: array([ 0, 0, 0, 0, 100]) > > However, using the regular "/" operator instead of np.divide gives the > proper result: > In [8]: the_cumsum/the_sum*100 > Out[8]: array([ 42.10526316, 71.05263158, 90.78947368, 97.36842105, > 100. ]) > > Best, > Pierre > > Actually, if you are using the latest numpy (the 1.7 beta), that will also not work unless you are using py3k or did "from __future__ import division". Well, actually, using np.divide will always result in integer division (this may or may not be a bug). The correct thing to do until we move on to py3k with its "true division" is to make sure we cast one of the operands as floats: the_sum.astype('f'). Plus, using '/' is more concise and readable. Cheers! Ben Root
On 09/26/2012 12:28 AM, jos...@gm... wrote: > On Wed, Sep 26, 2012 at 12:05 AM, Paul Tremblay <pau...@gm...> wrote: >> In R, there are many default data sets one can use to both illustrate code >> and explore the scripting language. Instead of having to fake data, one can >> pull from meaningful data sets, created in the real world. For example, this >> one liner actually produces a plot: >> >> plot(mtcars$hp~mtcars$mpg) >> >> where mtcars refers to a built-in data set taken from Motor Trend Magazine. >> I don't believe matplotlib has anything similar. I have started to download >> some of the R data sets and store them as pickles for my own use. Does >> anyone else have any interest in creating a repository for these data sets >> or otherwise sharing them in some way? > Vincent converted several R datasets back to csv, that can be easily > loaded from the web with, for example, pandas. > http://vincentarelbundock.github.com/Rdatasets/ > The collection is a bit random. > > statsmodels has some datasets that we use for examples and tests > http://statsmodels.sourceforge.net/devel/datasets/index.html > We were always a bit slow with adding datasets because we were too > cautious about licensing issues. But R seems to get away with > considering most datasets to be public domain. > We keep adding datasets to statsmodels as we need them for new models. > > The machine learning packages like sklearn have packaged the typical > machine learning datasets. > > If you are interested, you could join up with statsmodels or with > Vincent to expand on what's available. > It seems to me like contributing to (rather than duplicating) the work of one of these projects would be a great idea. It would also be nice to add functionality in matplotlib to make it easier to download these things as a one-off -- obviously not exactly the same syntax as with R, but ideally with a single function call. Mike
Hello, In relation to the recent thread on pareto chart, I have a question with regards to the synchronization of ticks location when using twinx plots. This question may have been adressed in the past, but my Google search on this topic was unfruitful. Sorry if this question was already answered. Basically, when using twinx two plot two different data sets, the scale of the data, in the general case, is to be different (thus the need for twinx). However, adding a grid to such a twinx plot leads to a very irregular placement because the ticks positions are not "synchronized". (I pasted a quick example to illustrate the tick placement issue at the end of this message) Ideally, I would like that both axis share a common placement for the ticks. Is there a way to do that ? I guess this would require that the two ticks Locators share "some algorithm" so that they would "agree" on the placement instead of working separetely. Other option may be that one Locator could work as a slave of the other one. (I'm just trying to draw a rough picture) Best, Pierre quick example to illustrate the tick placement issue : import matplotlib.pyplot as plt ax1 = plt.subplot(111) ax1.plot([1,2,3], 'bo-') ax1.grid(True) ax2 = plt.twinx(ax1) ax2.plot([11,12], 'rs-') ax2.grid(True) ax1.set_xlim(-0.5,2.5) plt.show()
Hi, Just a detail : Le 26/09/2012 04:29, Paul Tremblay a écrit : > percent = (np.divide(the_cumsum, the_sum)) * 100 This lines doesn't work on my computer (numpy 1.6.2) Indeed, there is a casting issue : In [2]: percent Out[2]: array([ 0, 0, 0, 0, 100]) However, using the regular "/" operator instead of np.divide gives the proper result: In [8]: the_cumsum/the_sum*100 Out[8]: array([ 42.10526316, 71.05263158, 90.78947368, 97.36842105, 100. ]) Best, Pierre
On Wed, Sep 26, 2012 at 12:05 AM, Paul Tremblay <pau...@gm...> wrote: > In R, there are many default data sets one can use to both illustrate code > and explore the scripting language. Instead of having to fake data, one can > pull from meaningful data sets, created in the real world. For example, this > one liner actually produces a plot: > > plot(mtcars$hp~mtcars$mpg) > > where mtcars refers to a built-in data set taken from Motor Trend Magazine. > I don't believe matplotlib has anything similar. I have started to download > some of the R data sets and store them as pickles for my own use. Does > anyone else have any interest in creating a repository for these data sets > or otherwise sharing them in some way? Vincent converted several R datasets back to csv, that can be easily loaded from the web with, for example, pandas. http://vincentarelbundock.github.com/Rdatasets/ The collection is a bit random. statsmodels has some datasets that we use for examples and tests http://statsmodels.sourceforge.net/devel/datasets/index.html We were always a bit slow with adding datasets because we were too cautious about licensing issues. But R seems to get away with considering most datasets to be public domain. We keep adding datasets to statsmodels as we need them for new models. The machine learning packages like sklearn have packaged the typical machine learning datasets. If you are interested, you could join up with statsmodels or with Vincent to expand on what's available. Josef > > Paul > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
In R, there are many default data sets one can use to both illustrate code and explore the scripting language. Instead of having to fake data, one can pull from meaningful data sets, created in the real world. For example, this one liner actually produces a plot: plot(mtcars$hp~mtcars$mpg) where mtcars refers to a built-in data set taken from Motor Trend Magazine. I don't believe matplotlib has anything similar. I have started to download some of the R data sets and store them as pickles for my own use. Does anyone else have any interest in creating a repository for these data sets or otherwise sharing them in some way? Paul
It doesn't have that functionality because we haven't needed it internally. Feel free to add it if you need it. Mike On 09/25/2012 07:13 PM, Damon McDougall wrote: > Hi, > > I'm playing with cbook.Grouper(), and I see that join() adds elements. > How do I remove elements? > > Best, > Damon >
Yes, that works nice. So my final code, as minimalist as possible (while still maintaining readability): import matplotlib.pyplot as plt import numpy as np # the data to plot defects = [32, 22, 15, 5, 2] labels = ['vertical', 'horizontal', 'behind', 'left area', 'other'] the_sum = sum(defects) # ie, 32 + 22 + 15 + 5 + 2 the_cumsum = np.cumsum(defects) # 32, 32 + 22, 32 + 22 + 15, 32 + 22 + 15 + 5, 32 + 22, + 15 + 5 + 2 percent = (np.divide(the_cumsum, the_sum)) * 100 ind = np.arange(len(defects)) # the x locations for the groups width = .98 # with do of the bars, where a width of 1 indidcates no space between bars x = ind + .5 * width # find the middle of the bar fig = plt.figure() # create a figure ax1 = fig.add_subplot(111) # and a subplot ax2 = ax1.twinx() # create a duplicate y axis rects1 = ax1.bar(ind, defects, width=width) # draw the chart line, = ax2.plot(x, percent) # draw the line ax1.set_ylim(ymax=the_sum) # without these limits, graphs will not work ax2.set_ylim(0, 100) ax1.set_xticks(x) # set ticks for middle of bars ax1.set_xticklabels(labels) # create the labels for the bars ax1.set_ylabel('Defects') # create the left y axis label ax2.set_ylabel('Percentage') # create the right y axis label plt.show() On Tue, Sep 25, 2012 at 2:31 PM, Jeffrey Melloy <jm...@gm...> wrote: > ax1.set_ylim(0, sum(data)) > ax2.set_ylim(0, 100) > seems to solve both of these issues. > > On Tue, Sep 25, 2012 at 11:16 AM, Paul Tremblay <pau...@gm...> > wrote: > > There are two problems with this chart: > > > > 1. The scale is wrong. Imagine that you can stack all the bars on top of > > each other. When stacked, all the bars should fill in the graph exactly. > In > > other words: ax1.set_ylim = sum(defects). See my original, or the wiki > page. > > > > 2. The line starts in the middle of the bar. It needs to start on top, in > > the middle. > > > > Maybe there is a way to correct 1 & 2 with your method, but I can't > seem to > > find it. > > > > Thanks! > > > > Paul > > > > > > On Tue, Sep 25, 2012 at 12:58 PM, Jeffrey Melloy <jm...@gm...> > wrote: > >> > >> I think pareto charts are supposed to be percentages, not totals. > >> > >> data = [83, 38, 7, 5, 5, 4, 4, 2, 1] > >> labels = ["Vertical", "Horizontal", "Upper", "Lower", "Left", "Right", > >> "Behind", "Front", "Down"] > >> colors = ["#001499", "#ff7f00", "#9440ed", "#edc240", "#238c3f", > >> "#a60085", "#00cca3", "#464f8c", "#005947", "#00004d", > >> "#cc0052", "#591616", "#7d8060", "#299da6", "#9c8fbf", > >> "#4c132a", "#8c3f23", "#85cc33", "#607980", "#7c30bf", "#bf9360", > >> "#324d13", "#13394d", "#4c1659", "#b25f00", "#99cca7", > >> "#669ccc", "#594358"] > >> > >> fig, ax1 = plt.subplots() > >> ax2 = ax1.twinx() > >> > >> for i, d in enumerate(data): > >> ax1.bar(i + .25, d, .5, zorder=0, alpha=0.5, label = labels[i], > >> color=colors[i % len(colors)]) > >> > >> percent = [d*1.0/sum(data) * 100 for d in np.cumsum(data)] > >> ax2.plot(np.arange(len(data)) + 0.5, percent, linestyle='-', > >> color='k', linewidth=2, zorder=5) > >> > >> ax1.set_xticks(np.arange(len(data)) + 0.5) > >> ax1.set_xticklabels(labels, rotation=30, ha='right') > >> #ax1.legend() > >> > >> ax1.set_ylabel('Defects') > >> ax2.set_ylabel('Percentage') > >> ax2.set_ylim(0,110) > >> > >> plt.show() > >> > >> > >> On Mon, Sep 24, 2012 at 11:43 PM, Paul Hobson <pmh...@gm...> > wrote: > >> >> On Mon, Sep 24, 2012 at 12:21 AM, Paul Tremblay > >> >> <pau...@gm...> > >> >> wrote: > >> >>> > >> >>> Here is my example of a Pareto chart. > >> >>> > >> >>> For an explanation of a Pareto chart: > >> >>> > >> >>> http://en.wikipedia.org/wiki/Pareto_chart > >> >>> > >> >>> Could I get this chart added to the matplolib gallery? > >> >>> > >> >>> > >> >>> Thanks > >> >>> > >> >>> Paul > >> >>> > >> > > >> >> On 9/24/12 4:40 PM, Benjamin Root wrote: > >> >> Your code looks overly complicated. You shouldn't have to be doing > the > >> >> connection to the ylim_changed event, I don't think. I think your > main > >> >> problem is that you are calling ax1.plot instead of ax2.plot. > >> >> > >> >> I am not against adding more examples to the gallery, but this would > >> >> have to > >> >> be cleaned up before it gets included. > >> >> > >> >> Ben Root > >> > > >> > On Mon, Sep 24, 2012 at 5:50 PM, Paul Tremblay < > pau...@gm...> > >> > wrote: > >> >> I took my example from the matplotlib pages itself: > >> >> > >> >> http://matplotlib.org/examples/api/fahrenheit_celcius_scales.html > >> >> > >> >> If you know a better way, please show me. > >> >> > >> >> P. > >> > > >> > Paul, > >> > > >> > That example is an overly complicated template for making a pareto > >> > chart. > >> > > >> > Here's how I'd do it: > >> > > >> > # data > >> > defects = [0, 32, 22, 15, 5, 2] > >> > labels = ['', 'vertical', 'horizontal', 'behind', 'left area', > 'other'] > >> > > >> > # axes > >> > fig, ax1 = plt.subplots() > >> > ax2 = ax1.twinx() > >> > > >> > # plotting > >> > ax1.bar(np.arange(len(defects))-0.4, defects, zorder=0, alpha=0.5) > >> > ax2.plot(np.cumsum(defects), linestyle='-', color='k', linewidth=2, > >> > zorder=5) > >> > > >> > # formatting > >> > ax1.set_xticks(np.arange(len(defects))) > >> > ax1.set_xticklabels(labels) > >> > ax1.set_ylabel('Defects') > >> > ax2.set_ylabel('Percentage') > >> > plt.show() > >> > > >> > > >> > > ------------------------------------------------------------------------------ > >> > Live Security Virtual Conference > >> > Exclusive live event will cover all the ways today's security and > >> > threat landscape has changed and how IT managers can respond. > >> > Discussions > >> > will include endpoint security, mobile security and the latest in > >> > malware > >> > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > >> > _______________________________________________ > >> > Matplotlib-users mailing list > >> > Mat...@li... > >> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > >
Hi, I'm playing with cbook.Grouper(), and I see that join() adds elements. How do I remove elements? Best, Damon -- Damon McDougall http://www.damon-is-a-geek.com B2.39 Mathematics Institute University of Warwick Coventry West Midlands CV4 7AL United Kingdom
I have fixed it. Or, I have a better handle on what the stupid thing is doing. LOL. The problem was a couple of things. 1. Michael was right. There was no file named Helvetica.ttf installed on my machine. 2. The path were I thought MPL was looking for files wasn't the right path. I thought it was looking in the mpl-data/fonts/ttf directory... Which it does. But it ALSO looks in system's font directories. So I was finding fonts that weren't in the mpl-data directory. This was very confusing. 3. I was generally angry at it. Now, if you want to change the font, just look in the system's font directory, pick the one you want, and then change the font.family name. It will change everything else. Easy as pie. On Tue Sep 25 15:59:10 2012, Steven Boada wrote: > I fail to understand what I am doing wrong and how I supposed to fix it.... > > using backend :TkAgg > > Again in ipython, after I have imported rc from matplotlib... > > In [5]: rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']}) > > In [6]: figure() > Out[6]: <matplotlib.figure.Figure at 0x104bc6890> > > In [7]: xlabel('z') > Out[7]: <matplotlib.text.Text at 0x104bd05d0> > > In [8]: > /opt/python/lib/python2.7/site-packages/matplotlib/font_manager.py:1214: > UserWarning: findfont: Font family ['sans-serif'] not found. Falling > back to Bitstream Vera Sans > (prop.get_family(), self.defaultFamily[fontext])) > > > This fails... > > In [8]: rc('font',**{'family':'serif','serif':['times new roman']}) > > In [9]: xlabel('z') > Out[9]: <matplotlib.text.Text at 0x104bd05d0> > > > This works fine. The labels on the plot change and everything. Neither > of these two fonts are located in the ttf directory. Both seem to be in > the pdfcorefonts directory, and both have afm extensions.. > > > This should not be this hard... > > Steven > > > > On 9/25/12 1:04 PM, Michael Droettboom wrote: >> Those *.afm fonts are only available in the postscript backend when >> "ps.usecorefonts" is set to True. Otherwise, you have to use >> TrueType/OpenType fonts. >> >> Mike >> >> On 09/25/2012 12:11 PM, Steven Boada wrote: >>> Hey Mike >>> >>> $ fc-match Helvetica >>> n019003l.pfb: "Nimbus Sans L" "Regular" >>> >>> >>> Perhaps I don't have the fonts installed... >>> >>> In my matplotlib/mpl-data/fonts/ I have the following fonts installed... >>> >>> in ttf/ >>> >>> cmb10.ttf RELEASENOTES.TXT STIXSizFourSymBol.ttf VeraIt.ttf >>> cmex10.ttf STIXGeneralBolIta.ttf STIXSizFourSymReg.ttf VeraMoBd.ttf >>> cmmi10.ttf STIXGeneralBol.ttf STIXSizOneSymBol.ttf VeraMoBI.ttf >>> cmr10.ttf STIXGeneralItalic.ttf STIXSizOneSymReg.ttf VeraMoIt.ttf >>> cmss10.ttf STIXGeneral.ttf STIXSizThreeSymBol.ttf VeraMono.ttf >>> cmsy10.ttf STIXNonUniBolIta.ttf STIXSizThreeSymReg.ttf VeraSeBd.ttf >>> cmtt10.ttf STIXNonUniBol.ttf STIXSizTwoSymBol.ttf VeraSe.ttf >>> COPYRIGHT.TXT STIXNonUniIta.ttf STIXSizTwoSymReg.ttf Vera.ttf >>> LICENSE_STIX STIXNonUni.ttf VeraBd.ttf >>> README.TXT STIXSizFiveSymReg.ttf VeraBI.ttf >>> >>> and in pdfcorefonts >>> >>> Courier.afm Helvetica-Bold.afm Times-Bold.afm >>> Courier-Bold.afm Helvetica-BoldOblique.afm Times-BoldItalic.afm >>> Courier-BoldOblique.afm Helvetica-Oblique.afm Times-Italic.afm >>> Courier-Oblique.afm readme.txt Times-Roman.afm >>> Helvetica.afm Symbol.afm ZapfDingbats.afm >>> >>> >>> Which does include some Helvetica fonts. And the font that I am trying >>> to use doesn't *have* to be helvetica. I just like that font, so I was >>> playing with it. >>> >>> Steven >>> >>> >>> On 9/25/12 10:41 AM, Michael Droettboom wrote: >>>> Do you have a font installed called Helvetica? That's pretty rare these >>>> days... most systems have one of the many Helvetica clones instead. >>>> >>>> Does "fc-match Helvetica" (at the commandline) return anything? >>>> >>>> Mike >>>> >>>> On 09/25/2012 10:05 AM, Steven Boada wrote: >>>>> List, >>>>> >>>>> I am trying, with little success, to change the fonts on my plots. It >>>>> seems like a simple thing to do, but I can't seem to make it work. >>>>> >>>>> First, here is the relevant section of my Matplotlibrc file: >>>>> >>>>> backend : GTKAgg >>>>> >>>>> font.family : sans-serif >>>>> font.style : normal >>>>> font.weight : medium >>>>> font.sans-serif : Helvetica >>>>> >>>>> (I copied this from the Matplotlibrc documentation page) >>>>> >>>>> >>>>> Now if I make a plot, and put some labels on there... (just using ipython) >>>>> >>>>> In [3]: figure() >>>>> Out[3]: <matplotlib.figure.Figure at 0x2acb950> >>>>> >>>>> In [4]: xlabel('Hz',fontsize=20) >>>>> Out[4]: <matplotlib.text.Text at 0x2ae3510> >>>>> >>>>> In [5]: >>>>> /opt/python/lib/python2.7/site-packages/matplotlib/font_manager.py:1216: >>>>> UserWarning: findfont: Font family ['sans-serif'] not found. Falling >>>>> back to Bitstream Vera Sans >>>>> (prop.get_family(), self.defaultFamily[fontext])) >>>>> >>>>> >>>>> I get this over and over and over again. I have deleted everything in my >>>>> ~/.matplotlib folder. That is, I have deleted all of the font caches... >>>>> I can't come up with anything else. The internet seems to thing that >>>>> just deleting the caches will fix everything. In my case it doesn't. >>>>> >>>>> I get this problem on both my mac, and my Ubuntu Linux 12.04 machine. >>>>> >>>>> Thanks! >>>>> >>>>> Steven >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> Live Security Virtual Conference >>>>> Exclusive live event will cover all the ways today's security and >>>>> threat landscape has changed and how IT managers can respond. Discussions >>>>> will include endpoint security, mobile security and the latest in malware >>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>> _______________________________________________ >>>>> Matplotlib-users mailing list >>>>> Mat...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>>> ------------------------------------------------------------------------------ >>>> Live Security Virtual Conference >>>> Exclusive live event will cover all the ways today's security and >>>> threat landscape has changed and how IT managers can respond. Discussions >>>> will include endpoint security, mobile security and the latest in malware >>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>> _______________________________________________ >>>> Matplotlib-users mailing list >>>> Mat...@li... >>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>>> >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > -- Steven Boada Doctoral Student Dept of Physics and Astronomy Texas A&M University bo...@ph...
On 2012年09月25日 9:23 AM, Damon McDougall wrote: > On Tue, Sep 25, 2012 at 8:09 PM, Benjamin Root <ben...@ou...> wrote: >> >> >> On Tue, Sep 25, 2012 at 8:53 AM, mdekauwe <mde...@gm...> wrote: >>> >>> I tried your suggestions...the first one (Qt4Agg) resulted in an error >>> (below) so it looks like I am missing some packages and the second option >>> (TkAgg) pretty much gave the same quality as the macosx backend. >>> >>> thanks. >>> >> >> I am still doubtful that there is any actual bug here (at least, not without >> evidence from screen captures), but for something to impact both the TkAgg >> backend and the macosx backend, it can't be an Agg-snapping issue. I know >> it sounds ridiculous, but could it be possible that we are hitting limits of >> floating point numbers? >> >> What is the resolution of your display and its size? >> >> Ben Root >> >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > Doesn't Eric have a retina display mac? Eric, do you see this behaviour? I think that what is described is typical for applications that lack specific retina display support. In that case the retina display uses 4 physical pixels for each virtual pixel, so that the program operates as if it were working with a typical dpi. It seems that there are different ways and stages at which this remapping can happen; I don't fully understand it. The way it works with mpl using either the macosx or qt4agg backends is, to me, not bad; maybe a little better than what happens with un-tweaked Firefox or Thunderbird, for example, and better than what happens with "ipython qtconsole". Some degree of fuzziness is seen in all these cases. My guess is that taking full advantage of the retina's resolution, for text and for lines, is going to require changes to underlying toolkits, and to some of our backends (certainly to the macosx backend). Given that even Mozilla, with its rapid release cycle, still hasn't released versions of Firefox or Thunderbird that properly handle the retina display, I suspect it will be a long time before we can do so in mpl. In the meantime, mpl is perfectly usable with the retina, no worse to my eye than with an ordinary display resolution. Eric > > Screenshots would be a real help here as extra information to diagnose > the problem. >
I fail to understand what I am doing wrong and how I supposed to fix it.... using backend :TkAgg Again in ipython, after I have imported rc from matplotlib... In [5]: rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']}) In [6]: figure() Out[6]: <matplotlib.figure.Figure at 0x104bc6890> In [7]: xlabel('z') Out[7]: <matplotlib.text.Text at 0x104bd05d0> In [8]: /opt/python/lib/python2.7/site-packages/matplotlib/font_manager.py:1214: UserWarning: findfont: Font family ['sans-serif'] not found. Falling back to Bitstream Vera Sans (prop.get_family(), self.defaultFamily[fontext])) This fails... In [8]: rc('font',**{'family':'serif','serif':['times new roman']}) In [9]: xlabel('z') Out[9]: <matplotlib.text.Text at 0x104bd05d0> This works fine. The labels on the plot change and everything. Neither of these two fonts are located in the ttf directory. Both seem to be in the pdfcorefonts directory, and both have afm extensions.. This should not be this hard... Steven On 9/25/12 1:04 PM, Michael Droettboom wrote: > Those *.afm fonts are only available in the postscript backend when > "ps.usecorefonts" is set to True. Otherwise, you have to use > TrueType/OpenType fonts. > > Mike > > On 09/25/2012 12:11 PM, Steven Boada wrote: >> Hey Mike >> >> $ fc-match Helvetica >> n019003l.pfb: "Nimbus Sans L" "Regular" >> >> >> Perhaps I don't have the fonts installed... >> >> In my matplotlib/mpl-data/fonts/ I have the following fonts installed... >> >> in ttf/ >> >> cmb10.ttf RELEASENOTES.TXT STIXSizFourSymBol.ttf VeraIt.ttf >> cmex10.ttf STIXGeneralBolIta.ttf STIXSizFourSymReg.ttf VeraMoBd.ttf >> cmmi10.ttf STIXGeneralBol.ttf STIXSizOneSymBol.ttf VeraMoBI.ttf >> cmr10.ttf STIXGeneralItalic.ttf STIXSizOneSymReg.ttf VeraMoIt.ttf >> cmss10.ttf STIXGeneral.ttf STIXSizThreeSymBol.ttf VeraMono.ttf >> cmsy10.ttf STIXNonUniBolIta.ttf STIXSizThreeSymReg.ttf VeraSeBd.ttf >> cmtt10.ttf STIXNonUniBol.ttf STIXSizTwoSymBol.ttf VeraSe.ttf >> COPYRIGHT.TXT STIXNonUniIta.ttf STIXSizTwoSymReg.ttf Vera.ttf >> LICENSE_STIX STIXNonUni.ttf VeraBd.ttf >> README.TXT STIXSizFiveSymReg.ttf VeraBI.ttf >> >> and in pdfcorefonts >> >> Courier.afm Helvetica-Bold.afm Times-Bold.afm >> Courier-Bold.afm Helvetica-BoldOblique.afm Times-BoldItalic.afm >> Courier-BoldOblique.afm Helvetica-Oblique.afm Times-Italic.afm >> Courier-Oblique.afm readme.txt Times-Roman.afm >> Helvetica.afm Symbol.afm ZapfDingbats.afm >> >> >> Which does include some Helvetica fonts. And the font that I am trying >> to use doesn't *have* to be helvetica. I just like that font, so I was >> playing with it. >> >> Steven >> >> >> On 9/25/12 10:41 AM, Michael Droettboom wrote: >>> Do you have a font installed called Helvetica? That's pretty rare these >>> days... most systems have one of the many Helvetica clones instead. >>> >>> Does "fc-match Helvetica" (at the commandline) return anything? >>> >>> Mike >>> >>> On 09/25/2012 10:05 AM, Steven Boada wrote: >>>> List, >>>> >>>> I am trying, with little success, to change the fonts on my plots. It >>>> seems like a simple thing to do, but I can't seem to make it work. >>>> >>>> First, here is the relevant section of my Matplotlibrc file: >>>> >>>> backend : GTKAgg >>>> >>>> font.family : sans-serif >>>> font.style : normal >>>> font.weight : medium >>>> font.sans-serif : Helvetica >>>> >>>> (I copied this from the Matplotlibrc documentation page) >>>> >>>> >>>> Now if I make a plot, and put some labels on there... (just using ipython) >>>> >>>> In [3]: figure() >>>> Out[3]: <matplotlib.figure.Figure at 0x2acb950> >>>> >>>> In [4]: xlabel('Hz',fontsize=20) >>>> Out[4]: <matplotlib.text.Text at 0x2ae3510> >>>> >>>> In [5]: >>>> /opt/python/lib/python2.7/site-packages/matplotlib/font_manager.py:1216: >>>> UserWarning: findfont: Font family ['sans-serif'] not found. Falling >>>> back to Bitstream Vera Sans >>>> (prop.get_family(), self.defaultFamily[fontext])) >>>> >>>> >>>> I get this over and over and over again. I have deleted everything in my >>>> ~/.matplotlib folder. That is, I have deleted all of the font caches... >>>> I can't come up with anything else. The internet seems to thing that >>>> just deleting the caches will fix everything. In my case it doesn't. >>>> >>>> I get this problem on both my mac, and my Ubuntu Linux 12.04 machine. >>>> >>>> Thanks! >>>> >>>> Steven >>>> >>>> ------------------------------------------------------------------------------ >>>> Live Security Virtual Conference >>>> Exclusive live event will cover all the ways today's security and >>>> threat landscape has changed and how IT managers can respond. Discussions >>>> will include endpoint security, mobile security and the latest in malware >>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>> _______________________________________________ >>>> Matplotlib-users mailing list >>>> Mat...@li... >>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>> ------------------------------------------------------------------------------ >>> Live Security Virtual Conference >>> Exclusive live event will cover all the ways today's security and >>> threat landscape has changed and how IT managers can respond. Discussions >>> will include endpoint security, mobile security and the latest in malware >>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>> _______________________________________________ >>> Matplotlib-users mailing list >>> Mat...@li... >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>> > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Steven Boada Doctoral Student Dept of Physics and Astronomy Texas A&M University bo...@ph...
Well perhaps it is fine, I wasn't really suggesting it was a bug. Just if I stretched the plot window a bit the resolution looked a bit fuzzier than i remembered. Perhaps my memory isn't a good test and I will compare it to the computer at work. I just did a screen print and it looks fine unless you put the screen close to your eyes and then the lettering etc is a bit fuzzy, but you won't see that in the screen dump. Attached anyway. <http://matplotlib.1069221.n5.nabble.com/file/n39086/Screen_Shot_2012年09月26日_at_6.35.55_AM.png> -- View this message in context: http://matplotlib.1069221.n5.nabble.com/resolution-on-plotting-for-retina-displays-tp39068p39086.html Sent from the matplotlib - users mailing list archive at Nabble.com.
On 09/25/2012 03:27 PM, andreasl wrote: > Thanks Mike. Interesting that it works for you with mathtext only. > > I am in some confusion about the matplotlib version I'm using. Synaptic > (package manager) says that for matplotlib I have > 0.99.1.2-3ubuntu1installed. Asking for help(matplotlib) in python gives > >> FILE >> /usr/local/lib/python2.6/dist-packages/matplotlib-1.0.1-py2.6-linux-i686.egg/matplotlib/__init__.py It looks like you have both a package manager installed and a locally installed copy then, and the one that is being imported is the local copy (1.0.1). I believe this bug existed then, but was fixed in 1.1. You may want to upgrade to 1.1.1 or the new 1.2.0rc2 if you want to live on the edge. Mike > I did not change anything manually in matplotlibrc, of which I seem to > have three versions: > >> /etc/matplotlibrc >> /usr/local/lib/python2.6/dist-packages/matplotlib/mpl-data/matplotlibrc >> /usr/local/lib/python2.6/dist-packages/matplotlib-1.0.1-py2.6-linux-i686.egg/matplotlib/mpl-data/matplotlibrc > The first one has backend: TkAgg whereas the other two have backend: > GTKAgg. Everything else is commented out. I usually work from within the > Spyder IDE, where the backend is set (via Preferences) to Qt4Agg. I get > the faulty behaviour (omega instead of !) both from within Spyder and > from within a console ipython session (where presumably either TkAgg or > GTKAgg is used). Setting the backend to either TkAgg or GTKAgg in Spyder > results in no plot at all. > > > On 25/09/12 19:05, mat...@li... wrote: >> Message: 1 >> Date: 2012年9月25日 09:01:14 -0400 >> From: Michael Droettboom <md...@st...> >> Subject: Re: [Matplotlib-users] Tex-style factorial ! in legend >> To: <mat...@li...> >> Message-ID: <506...@st...> >> Content-Type: text/plain; charset="iso-8859-1" >> >> This is working for me, even with text.usetex set to "False". What >> version of matplotlib are you using? Do you have anything set in your >> matplotlibrc file? >> >> Mike >> >> On 09/25/2012 06:10 AM, andreasl wrote: >>> Hello, >>> >>> When I use something along the lines of >>> >>> legend( (r'0ドル.5^x/x!$', r'1ドル^x/x!$') ) >>> >>> for some reason omegas are drawn instead of the ! sign. I can't find >>> an alternative here <http://matplotlib.org/users/mathtext.html> nor >>> elsewhere. Any ideas? >>> >>> Many thanks, >>> >>> Andreas > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Thanks Mike. Interesting that it works for you with mathtext only. I am in some confusion about the matplotlib version I'm using. Synaptic (package manager) says that for matplotlib I have 0.99.1.2-3ubuntu1installed. Asking for help(matplotlib) in python gives > FILE > /usr/local/lib/python2.6/dist-packages/matplotlib-1.0.1-py2.6-linux-i686.egg/matplotlib/__init__.py I did not change anything manually in matplotlibrc, of which I seem to have three versions: > /etc/matplotlibrc > /usr/local/lib/python2.6/dist-packages/matplotlib/mpl-data/matplotlibrc > /usr/local/lib/python2.6/dist-packages/matplotlib-1.0.1-py2.6-linux-i686.egg/matplotlib/mpl-data/matplotlibrc The first one has backend: TkAgg whereas the other two have backend: GTKAgg. Everything else is commented out. I usually work from within the Spyder IDE, where the backend is set (via Preferences) to Qt4Agg. I get the faulty behaviour (omega instead of !) both from within Spyder and from within a console ipython session (where presumably either TkAgg or GTKAgg is used). Setting the backend to either TkAgg or GTKAgg in Spyder results in no plot at all. On 25/09/12 19:05, mat...@li... wrote: > Message: 1 > Date: 2012年9月25日 09:01:14 -0400 > From: Michael Droettboom <md...@st...> > Subject: Re: [Matplotlib-users] Tex-style factorial ! in legend > To: <mat...@li...> > Message-ID: <506...@st...> > Content-Type: text/plain; charset="iso-8859-1" > > This is working for me, even with text.usetex set to "False". What > version of matplotlib are you using? Do you have anything set in your > matplotlibrc file? > > Mike > > On 09/25/2012 06:10 AM, andreasl wrote: >> Hello, >> >> When I use something along the lines of >> >> legend( (r'0ドル.5^x/x!$', r'1ドル^x/x!$') ) >> >> for some reason omegas are drawn instead of the ! sign. I can't find >> an alternative here <http://matplotlib.org/users/mathtext.html> nor >> elsewhere. Any ideas? >> >> Many thanks, >> >> Andreas
On Tue, Sep 25, 2012 at 8:09 PM, Benjamin Root <ben...@ou...> wrote: > > > On Tue, Sep 25, 2012 at 8:53 AM, mdekauwe <mde...@gm...> wrote: >> >> I tried your suggestions...the first one (Qt4Agg) resulted in an error >> (below) so it looks like I am missing some packages and the second option >> (TkAgg) pretty much gave the same quality as the macosx backend. >> >> thanks. >> > > I am still doubtful that there is any actual bug here (at least, not without > evidence from screen captures), but for something to impact both the TkAgg > backend and the macosx backend, it can't be an Agg-snapping issue. I know > it sounds ridiculous, but could it be possible that we are hitting limits of > floating point numbers? > > What is the resolution of your display and its size? > > Ben Root > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > Doesn't Eric have a retina display mac? Eric, do you see this behaviour? Screenshots would be a real help here as extra information to diagnose the problem. -- Damon McDougall http://www.damon-is-a-geek.com B2.39 Mathematics Institute University of Warwick Coventry West Midlands CV4 7AL United Kingdom
On Tue, Sep 25, 2012 at 8:53 AM, mdekauwe <mde...@gm...> wrote: > I tried your suggestions...the first one (Qt4Agg) resulted in an error > (below) so it looks like I am missing some packages and the second option > (TkAgg) pretty much gave the same quality as the macosx backend. > > thanks. > > I am still doubtful that there is any actual bug here (at least, not without evidence from screen captures), but for something to impact both the TkAgg backend and the macosx backend, it can't be an Agg-snapping issue. I know it sounds ridiculous, but could it be possible that we are hitting limits of floating point numbers? What is the resolution of your display and its size? Ben Root