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
(10) |
2
(10) |
3
(8) |
4
(6) |
5
(10) |
6
(1) |
7
(3) |
8
|
9
(5) |
10
(4) |
11
(9) |
12
(6) |
13
(12) |
14
(3) |
15
(2) |
16
(13) |
17
(7) |
18
(14) |
19
(7) |
20
(3) |
21
(1) |
22
|
23
(8) |
24
(6) |
25
(3) |
26
(5) |
27
(10) |
28
(5) |
29
(1) |
30
(7) |
|
|
|
|
|
From: Tony Yu <ts...@gm...> - 2012-04-26 17:02:31
|
On Thu, Apr 26, 2012 at 12:51 PM, willfurnass <wi...@th...> wrote: > > I've converted a simple MATLAB script [1] for wavelet decomposition-based > analysis to Python. I now want to create figures similar to [2] that > feature five subplots in one column, with the 1st and 3rd being generated > using 'subplot.plot' and the others being generated using 'subplot.imshow'. > > I want to find a way of scaling the x and y axes of all subplots so that > they're the same size on screen across all subplots. Unfortunately I can't > find any combination of 'aspect' or 'extent' that will let me do this. I > should note that I've added colorbars to all my image plots; the problem > exists regardless of whether these are used. > > Has anyone got any suggestions? Apologies if this is a trivial matter; I'm > fairly new to MP. > > FYI I'm using matplotlib v1.1.0. > > [1] > > http://www.mathworks.com/matlabcentral/fileexchange/18409-comparing-time-series-using-semblance-analysis > [2] http://www.mathworks.com/matlabcentral/fx_files/18409/1/goldoil.jpg > > Regards, > > Will Furnass > > You could try fig, axes = plt.subplots(nrows=5, sharex=True, sharey=True) And then call `axes[0].plot(...)` and `axes[1].imshow(...)`. You could also unpack the axes array and access them that way (if you prefer): ax0, ax1, ax2, ax3, ax4 = axes ax0.plot(...) Best, -Tony |
From: willfurnass <wi...@th...> - 2012-04-26 16:51:20
|
I've converted a simple MATLAB script [1] for wavelet decomposition-based analysis to Python. I now want to create figures similar to [2] that feature five subplots in one column, with the 1st and 3rd being generated using 'subplot.plot' and the others being generated using 'subplot.imshow'. I want to find a way of scaling the x and y axes of all subplots so that they're the same size on screen across all subplots. Unfortunately I can't find any combination of 'aspect' or 'extent' that will let me do this. I should note that I've added colorbars to all my image plots; the problem exists regardless of whether these are used. Has anyone got any suggestions? Apologies if this is a trivial matter; I'm fairly new to MP. FYI I'm using matplotlib v1.1.0. [1] http://www.mathworks.com/matlabcentral/fileexchange/18409-comparing-time-series-using-semblance-analysis [2] http://www.mathworks.com/matlabcentral/fx_files/18409/1/goldoil.jpg Regards, Will Furnass -- View this message in context: http://old.nabble.com/Set-x-axis-length-of-all-subplots-to-same-width-on-screen-tp33753799p33753799.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Benjamin R. <ben...@ou...> - 2012-04-26 12:53:53
|
On Tue, Apr 24, 2012 at 9:39 AM, Bruce Ford <br...@cl...>wrote: > All, > > I often produce images for use in .KML with Google Earth. Sometimes I > need the masking effect > of matplotlib.toolkits.basemap.Basemap.fillcontinents but in the case of > Google Earth, I need to make continents transparent on the final image. > Any ideas on how to do this? > > Thanks! > > Bruce > > Have you tried setting the color argument in fillcontinents() with a RGBA tuple? Even if that doesn't work, you still have a list of matplotlib.patches.Polygon objects being returned by the function. You could then call set_alpha() on each of them to a transparency value of choice. I hope that helps! Ben Root |
From: Peter W. <pw...@go...> - 2012-04-25 14:25:09
|
On 04/25/2012 04:06 PM, Alejandro Weinstein wrote: > I use the following setup (under Ubuntu, in case that matters): > > params = {'backend': 'Agg', > 'ps.usedistiller' : 'xpdf', > 'text.usetex' : True, > 'font.family': 'serif', > 'font.serif' : ['Times'], > } > mpl.rcParams.update(params) This looks much better indeed. I played around a bit and found that only the removal of the default serif fonts was needed to fix the appearance. Using these options 'text.usetex' : True, 'font.family': 'serif', 'font.serif' : [], everything looks fine now. It seems that there is some default font that messes up the latex output. Bug? |
From: Alejandro W. <ale...@gm...> - 2012-04-25 14:06:30
|
On Wed, Apr 25, 2012 at 6:54 AM, Peter Würtz <pw...@go...> wrote: > I'm having trouble when creating plots for use in latex documents. I use the following setup (under Ubuntu, in case that matters): params = {'backend': 'Agg', 'ps.usedistiller' : 'xpdf', 'text.usetex' : True, 'font.family': 'serif', 'font.serif' : ['Times'], } mpl.rcParams.update(params) I am not sure if all of them are necessary. I made all the figures in this paper using these parameters: http://arxiv.org/pdf/1110.5063v1 Alejandro. |
From: Peter W. <pw...@go...> - 2012-04-25 12:54:48
|
Hi, I'm having trouble when creating plots for use in latex documents. I tried several methods, but the fonts are always inconsistent in size and weight. I thought the "text.usetex" option to provide a result closest to the latex document I want to include the plots in, but this minimal example shows that there is some weird behavior of matplotlib producing bold fonts by default: import pylab as p params_text = { 'text.usetex': True, } p.rcParams.update(params_text) X = range(10) Y = [x**2 for x in X] p.plot(X, Y) p.xlabel(ur"$\rm{time}$ \rm{time} time (s $10^3$)") p.show() In a normal latex document, the words within the xlabel should look the same. The "correct" font style seems to be the one within the math mode. Unfortunately the usetex option produces pdf files 10x larger, but without it, the text looks even more distorted. I get best results in terms of appearance and size when producing eps files with the usedistiller xpdf option and then manually convert eps to pdf. But still, the default fonts are too bold although the weight was never altered. -- View this message in context: http://old.nabble.com/Matplotlib-in-Latex-documents-tp33746279p33746279.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Russell E. O. <ro...@uw...> - 2012-04-24 18:33:34
|
In article <CAA...@ma...>, C M <cmp...@gm...> wrote: > > > Trying to help a Mac friend running OSX 10.7 (Lion) easily set up to test > > > scripts I send him, and have some questions: > > > > > > 1) Can Matplotlib 1.1 run on the Python 2.7.2 version that comes with > > > Lion? > > > > Yes. You can easily build it yoursef as long as you have XCode > > installed: > > > > - Edit setupext.py so that the list of values for "darwin" is > > ['/usr/local', '/usr', /usr/X11'] > > (and for a really vanilla build leave out /usr/local). (I have a pull > > request for this to be part of the standard distro, but I don't know if > > or when it will go in since not a big issue.) > > > > Then do the usual: > > % python setup.py build > > % sudo python setup.py install > > Where are you getting matplotlib 1.1 for Mac OSX 10.7 from to build it? 1.1.0 is the current release. I downloaded the unix tarball. > > > 2) When is there expected to be an installer for Matplotlib 1.1 for OSX > > > 10.7? > > > > There is one, but like all the matplotlib (and numpy and scipy) official > > binaries it uses python.org's python, not Apple's. > > > > To go this route install python.org's Python 2.7.2 for 10.6-and-later > > (which is 64-bit) and then install the official numpy and matpotlib > > binaries. > > >From where? I didn't see it. I am talking about having a binary > installer on the Matplotlib downloads page,,. the last one I see there > is this, which is for OSX-10.6: > > matplotlib-1.1.0-py2.7-python.org-macosx10.6.dmg 2012-02-15 That is the one. 10.6 means "10.6 and later". It is build for python.org's Mac binary installer for 10.6 and later, which works just fine on Lion. -- Russell |
From: C M <cmp...@gm...> - 2012-04-24 18:25:23
|
> > Trying to help a Mac friend running OSX 10.7 (Lion) easily set up to test > > scripts I send him, and have some questions: > > > > 1) Can Matplotlib 1.1 run on the Python 2.7.2 version that comes with > > Lion? > > Yes. You can easily build it yoursef as long as you have XCode > installed: > > - Edit setupext.py so that the list of values for "darwin" is > ['/usr/local', '/usr', /usr/X11'] > (and for a really vanilla build leave out /usr/local). (I have a pull > request for this to be part of the standard distro, but I don't know if > or when it will go in since not a big issue.) > > Then do the usual: > % python setup.py build > % sudo python setup.py install Where are you getting matplotlib 1.1 for Mac OSX 10.7 from to build it? > > 2) When is there expected to be an installer for Matplotlib 1.1 for OSX > > 10.7? > > There is one, but like all the matplotlib (and numpy and scipy) official > binaries it uses python.org's python, not Apple's. > > To go this route install python.org's Python 2.7.2 for 10.6-and-later > (which is 64-bit) and then install the official numpy and matpotlib > binaries. >From where? I didn't see it. I am talking about having a binary installer on the Matplotlib downloads page,,. the last one I see there is this, which is for OSX-10.6: matplotlib-1.1.0-py2.7-python.org-macosx10.6.dmg 2012-02-15 which is from about two month ago. Thanks, Che |
From: Bruce F. <br...@cl...> - 2012-04-24 14:48:07
|
All, I often produce images for use in .KML with Google Earth. Sometimes I need the masking effect of matplotlib.toolkits.basemap.Basemap.fillcontinents but in the case of Google Earth, I need to make continents transparent on the final image. Any ideas on how to do this? Thanks! Bruce --------------------------------------- Bruce W. Ford |
From: julien t. <ju...@ta...> - 2012-04-24 08:48:44
|
Hello 2012/4/24 Eric Firing <ef...@ha...>: > On Tue, Apr 24, 2012 at 12:21 AM, Tony Yu <ts...@gm...> wrote: >> On Mon, Apr 23, 2012 at 5:09 AM, jul tayon <jt...@gm...> wrote: >>> Hello list >>> Exected Result : >>> https://github.com/jul/pypi-stat/blob/master/why.png >>> >> Sorry, I'm not clear on what the bug is. Is the picture you link to the >> *expected* result or the result from *executing* the code snippet. There are >> some inconsistencies between the pic and the code (legend, time on xaxis, 3 >> point in pic, title), so it's a bit unclear what you're referring to. > With recent mpl you can use the ticklabel_format pyplot function or axes method. >> If this isn't the bug you were suggesting, please clarify. This was the feature I did not grasp. Thanks for your help list. :) Any chance there exists an HOWTO make nice looking graphs/plots for tasteblind developpers ? Cheers, |
From: Eric F. <ef...@ha...> - 2012-04-24 03:42:28
|
On Tue, Apr 24, 2012 at 12:21 AM, Tony Yu <ts...@gm...> wrote: > > > On Mon, Apr 23, 2012 at 5:09 AM, jul tayon <jt...@gm...> wrote: >> >> Hello list >> >> matplotlib website says this mailing is the prefered way to report >> bug, so here I am : >> >> System : >> python ; 2.7.2+ >> matplotlib 1.1.0 >> ubuntu TLS amd64 >> matplotlib Backend : TkAgg >> >> >> How to reproduce (on my pf) >> Code Snippet : >> >> ######CODE >> >> import matplotlib >> import matplotlib.pyplot as p >> import random >> y = random.randint(0,10000000) >> p.plot( [ int( y * ( 1 - 0.0006)) , y]) >> p.show() >> >> ######ENDCODE >> >> Exected Result : >> https://github.com/jul/pypi-stat/blob/master/why.png >> >> Cause ? >> >> It stinks something like a rounding error on the float. >> If it also happens in Qt/Gtk backend it might be a matplotlib bug, if >> it is only in Tk then it is either a Tk or a TkAgg bug. >> >> Cheers, >> -- >> Jul > > > Sorry, I'm not clear on what the bug is. Is the picture you link to the > *expected* result or the result from *executing* the code snippet. There are > some inconsistencies between the pic and the code (legend, time on xaxis, 3 > point in pic, title), so it's a bit unclear what you're referring to. > > If you're talking about the offset value added to the y-axis, it's actually > not a bug; it's a feature (usually that's a joke, but in this case, I'm > serious). > > This feature is useful when you have large numbers that vary over small > ranges. Maybe it's not so bad in your example, but for larger numbers with > smaller ranges (see code snippet below), it's quite helpful. I thought there > was an rc parameter to tweak the value for using offsets, but I can't seem > to find it. Below I create a custom tick formatter and turn offsets. There > may be a better way to do this. With recent mpl you can use the ticklabel_format pyplot function or axes method. Eric > > If this isn't the bug you were suggesting, please clarify. > > Best, > -Tony > > #~~~~~ > import matplotlib.pyplot as plt > > fig, ax = plt.subplots() > # or `ax = plt.gca()` for older versions of matplotlib > > y = 1e9 > ax.plot([y, y+1]) > ax.yaxis.set_major_formatter(plt.ScalarFormatter(useOffset=False)) > > 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 > |
From: Tony Yu <ts...@gm...> - 2012-04-24 00:21:56
|
On Mon, Apr 23, 2012 at 5:09 AM, jul tayon <jt...@gm...> wrote: > Hello list > > matplotlib website says this mailing is the prefered way to report > bug, so here I am : > > System : > python ; 2.7.2+ > matplotlib 1.1.0 > ubuntu TLS amd64 > matplotlib Backend : TkAgg > > > How to reproduce (on my pf) > Code Snippet : > > ######CODE > > import matplotlib > import matplotlib.pyplot as p > import random > y = random.randint(0,10000000) > p.plot( [ int( y * ( 1 - 0.0006)) , y]) > p.show() > > ######ENDCODE > > Exected Result : > https://github.com/jul/pypi-stat/blob/master/why.png > > Cause ? > > It stinks something like a rounding error on the float. > If it also happens in Qt/Gtk backend it might be a matplotlib bug, if > it is only in Tk then it is either a Tk or a TkAgg bug. > > Cheers, > -- > Jul > Sorry, I'm not clear on what the bug is. Is the picture you link to the *expected* result or the result from *executing* the code snippet. There are some inconsistencies between the pic and the code (legend, time on xaxis, 3 point in pic, title), so it's a bit unclear what you're referring to. If you're talking about the offset value added to the y-axis, it's actually not a bug; it's a feature (usually that's a joke, but in this case, I'm serious). This feature is useful when you have large numbers that vary over small ranges. Maybe it's not so bad in your example, but for larger numbers with smaller ranges (see code snippet below), it's quite helpful. I thought there was an rc parameter to tweak the value for using offsets, but I can't seem to find it. Below I create a custom tick formatter and turn offsets. There may be a better way to do this. If this isn't the bug you were suggesting, please clarify. Best, -Tony #~~~~~ import matplotlib.pyplot as plt fig, ax = plt.subplots() # or `ax = plt.gca()` for older versions of matplotlib y = 1e9 ax.plot([y, y+1]) ax.yaxis.set_major_formatter(plt.ScalarFormatter(useOffset=False)) plt.show() #~~~~~ |
From: questions a. <que...@gm...> - 2012-04-23 23:14:56
|
thanks for all the responses. still finding it very confusing!! but got it to work (without having to import in the loop). I used: from datetime import datetime as dt but I also had to call: from datetime import timedelta and now it seems to work nicely. thank you On Fri, Apr 20, 2012 at 3:36 AM, Benjamin Root <ben...@ou...> wrote: > > > On Thu, Apr 19, 2012 at 1:21 PM, Goyo <goy...@gm...> wrote: > >> El día 19 de abril de 2012 05:31, questions anon >> <que...@gm...> escribió: >> > Thank you, I was able to get it to work but only if I imported datetime >> > within the loop, otherwise I ended up with the >> > AttributeError: type object 'datetime.datetime' has no attribute >> 'datetime' >> > and if I added 'import datetime' at the top of my script it had an error >> > where I loop through combining each month >> > " stop_month = datetime(2011, 03, 01) >> > TypeError: 'module' object is not callable" >> >> If you can write a standalone, minimal executable script which >> reproduces the problem I'll take a look. Send it as an attachement and >> add sample data files if necessary. >> >> Goyo >> >> > The issue is that there is a slight mixup in namespaces. There is a > module called datetime, and that module contains a class object called > datetime. So, if your imports at the top are "import datetime", then all > your module-related stuff need to be prepended with "datetime.". But, if > your imports at the top are "from datetime import datetime", then you can > use the object freely, but you can't use anything else from the module > unless you also import it. > > Here is the tricky part. In your code, you did the following: > > from datetime import datetime > > If you then did: > > import datetime > > depending on the order the two were, one would overwrite the other. You > can only have one thing called "datetime". Personally, I would do one of > two things: > > import datetime as dt > > and use "dt.datetime()" to create datetime objects as well as call > functions like "dt.strftime()". Or, do > > from datetime import datetime, date, timedelta, strftime > > and get replace calls like "datetime.datetime()" and "datetime.strftime()" > with just "datetime()" and "strftime()". > > I hope that clears things up. Namespaces are a honking good idea, but > having objects be the same exact name as a module gets confusing very > easily. > > Cheers! > Ben Root > > |
From: Michael D. <md...@st...> - 2012-04-23 21:38:10
|
On 04/21/2012 06:35 PM, Ariel Rokem wrote: > > > ParseFatalException: Expected end of math '$' > $rac{S}{S_0}$ (at char 0), (line:1, col:1) > > Should this have been resolved already? Does it relate to this issue? > > https://github.com/matplotlib/matplotlib/issues/659 > The improved error messages are not on the 1.1.x branch. They will be in the first of the 1.2.x series. In this particular case, however, you seem to be running into a problem by not using raw strings. The "\f" in "\frac" is getting converted by Python into a formfeed character. Use r"\frac{S}{S_0}" and you should have more luck. Mike |
From: Russell E. O. <ro...@uw...> - 2012-04-23 21:22:11
|
In article <CAA...@ma...>, C M <cmp...@gm...> wrote: > Trying to help a Mac friend running OSX 10.7 (Lion) easily set up to test > scripts I send him, and have some questions: > > 1) Can Matplotlib 1.1 run on the Python 2.7.2 version that comes with > Lion? Yes. You can easily build it yoursef as long as you have XCode installed: - Edit setupext.py so that the list of values for "darwin" is ['/usr/local', '/usr', /usr/X11'] (and for a really vanilla build leave out /usr/local). (I have a pull request for this to be part of the standard distro, but I don't know if or when it will go in since not a big issue.) Then do the usual: % python setup.py build % sudo python setup.py install > 2) When is there expected to be an installer for Matplotlib 1.1 for OSX > 10.7? There is one, but like all the matplotlib (and numpy and scipy) official binaries it uses python.org's python, not Apple's. To go this route install python.org's Python 2.7.2 for 10.6-and-later (which is 64-bit) and then install the official numpy and matpotlib binaries. (It is a bit of a hassle to have to install a different python, but it has the advantage that you can freely upgrade python itself and packages without fear of breaking anything in the operating system.) There are lots of other options: Enthought has a python installer that includes lots of useful scientific packages. ActiveState has an installer with a lot of packages available (though last I checked matplotlib was out of date, which quite surprised me). MacPorts and competing package managers make it easy to install packages. Regards, -- Russell |
From: jul t. <jt...@gm...> - 2012-04-23 09:10:35
|
Sorry, I thougt I used the wrong address for mailing and resent. :'( |
From: jul t. <jt...@gm...> - 2012-04-23 09:09:42
|
Hello list matplotlib website says this mailing is the prefered way to report bug, so here I am : System : python ; 2.7.2+ matplotlib 1.1.0 ubuntu TLS amd64 matplotlib Backend : TkAgg How to reproduce (on my pf) Code Snippet : ######CODE import matplotlib import matplotlib.pyplot as p import random y = random.randint(0,10000000) p.plot( [ int( y * ( 1 - 0.0006)) , y]) p.show() ######ENDCODE Exected Result : https://github.com/jul/pypi-stat/blob/master/why.png Cause ? It stinks something like a rounding error on the float. If it also happens in Qt/Gtk backend it might be a matplotlib bug, if it is only in Tk then it is either a Tk or a TkAgg bug. Cheers, -- Jul |
From: julien t. <ju...@ta...> - 2012-04-23 09:03:35
|
Hello list matplotlib website says this mailing is the prefered way to report bug, so here I am : System : python ; 2.7.2+ matplotlib 1.1.0 ubuntu TLS amd64 matplotlib Backend : TkAgg How to reproduce (on my pf) Code Snippet : ######CODE import matplotlib import matplotlib.pyplot as p import random y = random.randint(0,10000000) p.plot( [ int( y * ( 1 - 0.0006)) , y]) p.show() ######ENDCODE Exected Result : https://github.com/jul/pypi-stat/blob/master/why.png Cause ? It stinks something like a rounding error on the float. If it also happens in Qt/Gtk backend it might be a matplotlib bug, if it is only in Tk then it is either a Tk or a TkAgg bug. Cheers, -- jul |
From: Clare S. <cla...@gm...> - 2012-04-23 08:03:48
|
Hi, I managed to figure this out. I need to pass an init function to FuncAnimation. Quoting from the MatPlotLib API documentation: *init_func* is a function used to draw a clear frame. If not given, the results of drawing from the first item in the frames sequence will be used. So just in case someone has the same problem, here's the correct code: import matplotlib import numpy as np from matplotlib.lines import Line2D import matplotlib.pyplot as plt import matplotlib.animation as animation class Scope: def __init__(self, ax, maxt=10, dt=1): self.ax = ax self.dt = dt self.maxt = maxt self.tdata = [0] self.ydata = [0] self.line = Line2D(self.tdata, self.ydata, marker='o') self.ax.add_line(self.line) self.ax.set_ylim(0, 200) self.ax.set_xlim(0, self.maxt) self.ax.set_xlabel("Time(s)") self.ax.set_ylabel("Jitter Buffer Size(ms)", color=self.line.get_color()) def init(self): self.line.set_data([], []) return self.line, def update(self, y): lastt = self.tdata[-1] if lastt == self.tdata[0] + self.maxt: # reset the arrays self.tdata = [self.tdata[-1]] self.ydata = [self.ydata[-1]] self.ax.set_xlim(self.tdata[0], self.tdata[0] + self.maxt) self.ax.figure.canvas.draw() t = self.tdata[-1] + self.dt self.tdata.append(t) self.ydata.append(y) self.line.set_data(self.tdata, self.ydata) return self.line, def emitter(): while True: yield np.random.randint(0,200) fig = plt.figure() ax = fig.add_subplot(111) scope = Scope(ax) # pass a generator in "emitter" to produce data for the update func ani = animation.FuncAnimation(fig, scope.update, emitter, interval=1000, blit=True, init_func=scope.init) plt.show() Best Regards, Clare. |
From: Clare K. <cla...@gm...> - 2012-04-23 03:57:30
|
Hi, I'm trying to learn how to use FuncAnimation. I made some small modifications to one of the matplotlib examples & tried it out, but I encounter a problem. I'm trying to update a line plot every 1 sec & I have my x-axis limit set to (0,10) initially. When the plot reaches x=10, I change the x-axis limit to (10,20) & continue the plot from there. I found that the 1st 2 seconds of the plot is always re-drawn in the 10th to 12th seconds, 20th to 22nd seconds and so on. I don't understand what's going on, so I hope someone here in this list can help me. Just in case you don't understand what I mean, I've included the code below so you'll have a better idea when you run the code: import matplotlib import numpy as np from matplotlib.lines import Line2D import matplotlib.pyplot as plt import matplotlib.animation as animation class Scope: def __init__(self, ax, maxt=10, dt=1): self.ax = ax self.dt = dt self.maxt = maxt self.tdata = [0] self.ydata = [0] self.line = Line2D(self.tdata, self.ydata, marker='o') self.ax.add_line(self.line) self.ax.set_ylim(0, 200) self.ax.set_xlim(0, self.maxt) self.ax.set_xlabel("Time(s)") self.ax.set_ylabel("Jitter Buffer Size(ms)", color=self.line.get_color()) # self.ax.yaxis.label.set_color(self.line.get_color()) def update(self, y): lastt = self.tdata[-1] if lastt == self.tdata[0] + self.maxt: # reset the arrays self.tdata = [self.tdata[-1]] self.ydata = [self.ydata[-1]] self.ax.set_xlim(self.tdata[0], self.tdata[0] + self.maxt) self.ax.figure.canvas.draw() t = self.tdata[-1] + self.dt self.tdata.append(t) self.ydata.append(y) self.line.set_data(self.tdata, self.ydata) return self.line, def emitter(): while True: yield np.random.randint(0,200) fig = plt.figure() ax = fig.add_subplot(111) scope = Scope(ax) # pass a generator in "emitter" to produce data for the update func ani = animation.FuncAnimation(fig, scope.update, emitter, interval=1000, blit=True) plt.show() Best Regards, Clare. |
From: C M <cmp...@gm...> - 2012-04-21 01:27:41
|
Trying to help a Mac friend running OSX 10.7 (Lion) easily set up to test scripts I send him, and have some questions: 1) Can Matplotlib 1.1 run on the Python 2.7.2 version that comes with Lion? 2) When is there expected to be an installer for Matplotlib 1.1 for OSX 10.7? Thanks, Che |
From: Paul H. <pmh...@gm...> - 2012-04-20 16:06:06
|
Pietro, Try the following: -set minor ticks at half intervals between your major ticks -labeling those as you currently label the major ticks -remove the minor tick markers (set markersize=0?) -clear out the major tick labels -paul On Fri, Apr 20, 2012 at 12:49 AM, Pietro <pet...@gm...> wrote: > On Fri, Apr 20, 2012 at 9:47 AM, Pietro <pet...@gm...> wrote: >>> https://gist.github.com/2412755 >> >> I realize that my ascii art was mess up by gmail! >> :-) >> >> I had all the stuff to the above link. Any idea? > > Sorry, I mean "I add". > > > Pietro > > ------------------------------------------------------------------------------ > For Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > http://p.sf.net/sfu/Boundary-d2dvs2 > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Pietro <pet...@gm...> - 2012-04-20 07:49:33
|
On Fri, Apr 20, 2012 at 9:47 AM, Pietro <pet...@gm...> wrote: >> https://gist.github.com/2412755 > > I realize that my ascii art was mess up by gmail! > :-) > > I had all the stuff to the above link. Any idea? Sorry, I mean "I add". Pietro |
From: Pietro <pet...@gm...> - 2012-04-20 07:47:45
|
On Thu, Apr 19, 2012 at 2:46 PM, Pietro <pet...@gm...> wrote: > Hi, > > I'm new to this mailing list, I'm writing here because I was not able to > solve searching in the web. > I would like to display subplot data divided per week, I write this code: > > https://gist.github.com/2412755 I realize that my ascii art was mess up by gmail! :-) I had all the stuff to the above link. Any idea? Thanks you. Pietro |
From: Benjamin R. <ben...@ou...> - 2012-04-19 17:36:40
|
On Thu, Apr 19, 2012 at 1:21 PM, Goyo <goy...@gm...> wrote: > El día 19 de abril de 2012 05:31, questions anon > <que...@gm...> escribió: > > Thank you, I was able to get it to work but only if I imported datetime > > within the loop, otherwise I ended up with the > > AttributeError: type object 'datetime.datetime' has no attribute > 'datetime' > > and if I added 'import datetime' at the top of my script it had an error > > where I loop through combining each month > > " stop_month = datetime(2011, 03, 01) > > TypeError: 'module' object is not callable" > > If you can write a standalone, minimal executable script which > reproduces the problem I'll take a look. Send it as an attachement and > add sample data files if necessary. > > Goyo > > The issue is that there is a slight mixup in namespaces. There is a module called datetime, and that module contains a class object called datetime. So, if your imports at the top are "import datetime", then all your module-related stuff need to be prepended with "datetime.". But, if your imports at the top are "from datetime import datetime", then you can use the object freely, but you can't use anything else from the module unless you also import it. Here is the tricky part. In your code, you did the following: from datetime import datetime If you then did: import datetime depending on the order the two were, one would overwrite the other. You can only have one thing called "datetime". Personally, I would do one of two things: import datetime as dt and use "dt.datetime()" to create datetime objects as well as call functions like "dt.strftime()". Or, do from datetime import datetime, date, timedelta, strftime and get replace calls like "datetime.datetime()" and "datetime.strftime()" with just "datetime()" and "strftime()". I hope that clears things up. Namespaces are a honking good idea, but having objects be the same exact name as a module gets confusing very easily. Cheers! Ben Root |