You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(12) |
Sep
(12) |
Oct
(56) |
Nov
(65) |
Dec
(37) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(59) |
Feb
(78) |
Mar
(153) |
Apr
(205) |
May
(184) |
Jun
(123) |
Jul
(171) |
Aug
(156) |
Sep
(190) |
Oct
(120) |
Nov
(154) |
Dec
(223) |
| 2005 |
Jan
(184) |
Feb
(267) |
Mar
(214) |
Apr
(286) |
May
(320) |
Jun
(299) |
Jul
(348) |
Aug
(283) |
Sep
(355) |
Oct
(293) |
Nov
(232) |
Dec
(203) |
| 2006 |
Jan
(352) |
Feb
(358) |
Mar
(403) |
Apr
(313) |
May
(165) |
Jun
(281) |
Jul
(316) |
Aug
(228) |
Sep
(279) |
Oct
(243) |
Nov
(315) |
Dec
(345) |
| 2007 |
Jan
(260) |
Feb
(323) |
Mar
(340) |
Apr
(319) |
May
(290) |
Jun
(296) |
Jul
(221) |
Aug
(292) |
Sep
(242) |
Oct
(248) |
Nov
(242) |
Dec
(332) |
| 2008 |
Jan
(312) |
Feb
(359) |
Mar
(454) |
Apr
(287) |
May
(340) |
Jun
(450) |
Jul
(403) |
Aug
(324) |
Sep
(349) |
Oct
(385) |
Nov
(363) |
Dec
(437) |
| 2009 |
Jan
(500) |
Feb
(301) |
Mar
(409) |
Apr
(486) |
May
(545) |
Jun
(391) |
Jul
(518) |
Aug
(497) |
Sep
(492) |
Oct
(429) |
Nov
(357) |
Dec
(310) |
| 2010 |
Jan
(371) |
Feb
(657) |
Mar
(519) |
Apr
(432) |
May
(312) |
Jun
(416) |
Jul
(477) |
Aug
(386) |
Sep
(419) |
Oct
(435) |
Nov
(320) |
Dec
(202) |
| 2011 |
Jan
(321) |
Feb
(413) |
Mar
(299) |
Apr
(215) |
May
(284) |
Jun
(203) |
Jul
(207) |
Aug
(314) |
Sep
(321) |
Oct
(259) |
Nov
(347) |
Dec
(209) |
| 2012 |
Jan
(322) |
Feb
(414) |
Mar
(377) |
Apr
(179) |
May
(173) |
Jun
(234) |
Jul
(295) |
Aug
(239) |
Sep
(276) |
Oct
(355) |
Nov
(144) |
Dec
(108) |
| 2013 |
Jan
(170) |
Feb
(89) |
Mar
(204) |
Apr
(133) |
May
(142) |
Jun
(89) |
Jul
(160) |
Aug
(180) |
Sep
(69) |
Oct
(136) |
Nov
(83) |
Dec
(32) |
| 2014 |
Jan
(71) |
Feb
(90) |
Mar
(161) |
Apr
(117) |
May
(78) |
Jun
(94) |
Jul
(60) |
Aug
(83) |
Sep
(102) |
Oct
(132) |
Nov
(154) |
Dec
(96) |
| 2015 |
Jan
(45) |
Feb
(138) |
Mar
(176) |
Apr
(132) |
May
(119) |
Jun
(124) |
Jul
(77) |
Aug
(31) |
Sep
(34) |
Oct
(22) |
Nov
(23) |
Dec
(9) |
| 2016 |
Jan
(26) |
Feb
(17) |
Mar
(10) |
Apr
(8) |
May
(4) |
Jun
(8) |
Jul
(6) |
Aug
(5) |
Sep
(9) |
Oct
(4) |
Nov
|
Dec
|
| 2017 |
Jan
(5) |
Feb
(7) |
Mar
(1) |
Apr
(5) |
May
|
Jun
(3) |
Jul
(6) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2025 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
1
(12) |
2
(13) |
3
(14) |
4
(9) |
|
5
(9) |
6
(22) |
7
(17) |
8
(16) |
9
(19) |
10
(17) |
11
(6) |
|
12
|
13
(20) |
14
(21) |
15
(20) |
16
(10) |
17
(14) |
18
(3) |
|
19
(3) |
20
(12) |
21
(22) |
22
(26) |
23
(31) |
24
(26) |
25
(9) |
|
26
(4) |
27
(33) |
28
(15) |
29
(37) |
30
(26) |
|
|
|
From: bollweevil <ly...@ro...> - 2009-04-10 23:06:59
|
sudo apt-get install python-matplotlib #This only gets matplotlib-0.91 I have tried downloading the matplotlib-0.98.5.2.tar.gz, but it requires an incredibly large number of prerequisites, and each of the prerequisites requires prerequisites, and I have now wasted hours on this. Please help me install matplotlib-0.98 on Ubuntu 8.04 Hardy Heron. I know that there is an apt-get package to install matplotlib-0.98 on Ubuntu Jaunty, but I don't know how to use it on Hardy. Thanks. -- View this message in context: http://www.nabble.com/How-do-I-install-Matplotlib-0.98-on-Ubuntu-8.04-Hardy-Heron--tp22996008p22996008.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Andrew S. <str...@as...> - 2009-04-10 21:49:01
|
jtamir wrote: > > Andrew Straw wrote: >> Does that file .h exist at that location? >> > Yes, __multiarray_api.h is in > ~/lib/python2.5/site-packages/numpy/core/include/numpy/ > I am installing with prefix set to home directory. > > > > Andrew Straw wrote: >> can you re-send the >> output including the first error? >> > The full output is quite long - 1650 lines (attached) > > >> $ python setup.py install --prefix=/home/jtamir > log >> error: Command "gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 >> -Wall -Wstrict-prototypes -fPIC -Isrc >> -I/home/jtamir/lib/python2.5/site-packages/numpy/core/include >> -I/home/jtamir/include/python2.5 -c src/_proj.c -o >> build/temp.linux-i686-2.5/src/_proj.o" failed with exit status 1 >> http://www.nabble.com/file/p22992540/log log > compile options: '-Isrc -I/home/jtamir/lib/python2.5/site-packages/numpy/core/include -I/home/jtamir/include/python2.5 -c' > gcc: src/_proj.c > src/_proj.c:4:20: error: Python.h: No such file or directory That's the first error -- and it's quite diagnostic. gcc can't find Python.h. I see you are doing some slightly non-standard stuff with paths. From your paths, it appears you have Python installed in /home/jtamir/bin/python. If this is the case, you should try "/home/jtamir/bin/python setup.py install" (without the --prefix=/home/jtamir). That will let distutils attempt to do everything normally. Otherwise, you'll have to figure out what Python.h isn't in /home/jtamir/include/python2.5 if you want the above to work. -- Andrew D. Straw, Ph.D. California Institute of Technology http://www.its.caltech.edu/~astraw/ |
|
From: Michael M. F. <mf...@ph...> - 2009-04-10 19:03:16
|
On 8 Apr 2009, at 12:29 PM, Gideon Simpson wrote: > Is there a way to save a figured at a specified size? > -gideon I have always specified the figure size first in the figure command: fig_width = 5 # Default unit is inches fig_height = 3 plt.figure(figsize=(fig_width, fig_height)) plt.plot(...) plt.savefig(...) As long as you don't resize the figure, this will save the figure in the specified size. I don't know if there is a good way to force the size after the fact, but things don't always scale nicely so I find it best to work with the desired size figure from the start. Michael. |
|
From: jtamir <jt...@ar...> - 2009-04-10 18:23:37
|
Andrew Straw wrote: > > Does that file .h exist at that location? > Yes, __multiarray_api.h is in ~/lib/python2.5/site-packages/numpy/core/include/numpy/ I am installing with prefix set to home directory. Andrew Straw wrote: > > can you re-send the > output including the first error? > The full output is quite long - 1650 lines (attached) > $ python setup.py install --prefix=/home/jtamir > log > error: Command "gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 > -Wall -Wstrict-prototypes -fPIC -Isrc > -I/home/jtamir/lib/python2.5/site-packages/numpy/core/include > -I/home/jtamir/include/python2.5 -c src/_proj.c -o > build/temp.linux-i686-2.5/src/_proj.o" failed with exit status 1 > http://www.nabble.com/file/p22992540/log log Jon -- View this message in context: http://www.nabble.com/Basemap-Installation-Errors-tp22915617p22992540.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Lorenzo Di G. <lor...@gm...> - 2009-04-10 16:40:56
|
Ouch, it looks like MinGW and Python do not fit 100% to each other. Please check out this bug report: http://bugs.python.org/issue3308 "Basically MinGW erroneously ships a .lib saying localtime is in MSVCR90.DLL when it isn't. That means there is no link failure but the *pyd* will fail to load without information as to why. Fixing the .lib means that localtime is picked up from MSVCRT.DLL (ie no version in name) and everything appears to work well." On 4/10/09, Lorenzo Di Gregorio <lor...@gm...> wrote: > > On 4/10/09, Michael Droettboom <md...@st...> wrote: >> >> Lorenzo Di Gregorio wrote: >> >>> Well, that's exactly the problem: I just can't load some DLLs! >>> >>> import matplotlib._path >>> >>> Traceback (most recent call last): >>> File "<pyshell#0>", line 1, in <module> >>> import matplotlib._path >>> ImportError: DLL load failed: Die angegebene Prozedur wurde nicht >>> gefunden. >>> >>> import matplotlib._delaunay >>> >>> import matplotlib._image >>> >>> Traceback (most recent call last): >>> File "<pyshell#2>", line 1, in <module> >>> import matplotlib._image >>> ImportError: DLL load failed: Die angegebene Prozedur wurde nicht >>> gefunden. >>> >>> I have run python -vv, it tries also ..._path but does not load it, so I >>> think it might be a linking problem. >>> I've noticed that _delaunay.cpp has a "PyMODINIT_FUNC >>> init_delaunay(void)" while _path.cpp has just a "void init_path(void)". >>> >> If you make that change, does it work? > > > No, I tried. > > I have also tried to start python -vv. > For _delaunay I get a correct import. > > # trying C:\Python26\lib\site-packages\matplotlib\_delaunay.pyd > import matplotlib._delaunay # dynamically loaded from > C:\Python26\lib\site-packages\matplotlib\_delaunay.pyd > > For _path and _image I get > > >>> import matplotlib._path > # trying C:\Python26\lib\site-packages\matplotlib\_path.pyd > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > ImportError: DLL load failed: Die angegebene Prozedur wurde nicht gefunden. > >>> import matplotlib._image > # trying C:\Python26\lib\site-packages\matplotlib\_image.pyd > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > ImportError: DLL load failed: Die angegebene Prozedur wurde nicht gefunden. > > So Python checks the right place but then concludes that the DLL is not > there. I guess something goes wrong with the linking, but in fact I do not > know how to write a DLL for Python and I'm stuck now. > I have checked that the compilation was ok and the rest of the installation > (GTK+ etc) is ok. I can import matplotlib itself. In the packages I had > only one package to patch: I think "gpobjects" had a reference to "@FFI_LIB@". > This was getting through pkg-config and stopping the compilation, so I have > removed it. > > ... HELP! ;-) > > Regards, > Lorenzo > |
|
From: Lorenzo Di G. <lor...@gm...> - 2009-04-10 15:42:03
|
On 4/10/09, Michael Droettboom <md...@st...> wrote: > > Lorenzo Di Gregorio wrote: > >> Well, that's exactly the problem: I just can't load some DLLs! >> >>> import matplotlib._path >> >> Traceback (most recent call last): >> File "<pyshell#0>", line 1, in <module> >> import matplotlib._path >> ImportError: DLL load failed: Die angegebene Prozedur wurde nicht >> gefunden. >> >>> import matplotlib._delaunay >> >>> import matplotlib._image >> >> Traceback (most recent call last): >> File "<pyshell#2>", line 1, in <module> >> import matplotlib._image >> ImportError: DLL load failed: Die angegebene Prozedur wurde nicht >> gefunden. >> >> I have run python -vv, it tries also ..._path but does not load it, so I >> think it might be a linking problem. >> I've noticed that _delaunay.cpp has a "PyMODINIT_FUNC init_delaunay(void)" >> while _path.cpp has just a "void init_path(void)". >> > If you make that change, does it work? No, I tried. I have also tried to start python -vv. For _delaunay I get a correct import. # trying C:\Python26\lib\site-packages\matplotlib\_delaunay.pyd import matplotlib._delaunay # dynamically loaded from C:\Python26\lib\site-packages\matplotlib\_delaunay.pyd For _path and _image I get >>> import matplotlib._path # trying C:\Python26\lib\site-packages\matplotlib\_path.pyd Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: DLL load failed: Die angegebene Prozedur wurde nicht gefunden. >>> import matplotlib._image # trying C:\Python26\lib\site-packages\matplotlib\_image.pyd Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: DLL load failed: Die angegebene Prozedur wurde nicht gefunden. So Python checks the right place but then concludes that the DLL is not there. I guess something goes wrong with the linking, but in fact I do not know how to write a DLL for Python and I'm stuck now. I have checked that the compilation was ok and the rest of the installation (GTK+ etc) is ok. I can import matplotlib itself. In the packages I had only one package to patch: I think "gpobjects" had a reference to "@FFI_LIB@". This was getting through pkg-config and stopping the compilation, so I have removed it. ... HELP! ;-) Regards, Lorenzo |
|
From: Andrew S. <str...@as...> - 2009-04-10 15:39:51
|
Pellegrini Eric wrote: > Hello everybody, > > I would like to create a plot from which I set the x data later. The > method set_xdata works but the corresponding plot displays the initial > x limits. Is it possible to update the plot automatically in order > that the displayed plot has x limits corresponding to the newly set x > data ? > > Here is the script that fails: > > import pylab > fig = pylab.figure() > ax = fig.add_subplot(111, label = 'plot1') > p, = ax.plot([1,2,3,4,5]) > p.set_xdata([10,20,30,40,50]) > # ax.set_xlim([10,50]) > fig.show() > > to update the xlim I have to add the commented line. > > thank you very much > > Eric Pellegrini > > > I think this is more or less the same question asked by "C M" on April 8 on this list. Can you see if the response by Ryan May is sufficient for you? |
|
From: Andrew S. <str...@as...> - 2009-04-10 15:38:09
|
Michael Droettboom wrote:
> Pim Schellart wrote:
>> Dear Matplotlib users/developers,
>>
>> The default behaviour of matplotlib.pyplot is to display large (e.g.
>> 2452298.7554547498 as a small number 0.25545474980026484 +
>> 2.4522985e6) I would like to be able to do one of the following.
>>
>> - Set the number to be subtracted manually (I know I can just subtract
>> a number from the input array but then matplotib still subtracts
>> another number if it thinks it is still to big to display).
> I don't know if there's a straightforward way to do this... Maybe
> someone more familiar with the ticking code can comment.
You can do
"ax.xaxis.set_major_formatter(ticker.FormatStrFormatter("%s"))" and then
the normal Python "%s"%myvar format handler will convert your datum to a
string.
The default formatter is pretty ugly in my opinion, as well. Someone
(me, probably) should endeavor to make rcParams out of this, as the
above code, or a variation of it, permeates my files.
>> - Force matplotlib to display the full number (and display the numbers
>> slanted so they do not overlap). This is my preferred option. I would
>> like to see this as a simple option in pyplot, perhaps as an extra
>> parameter in the xticks/yticks functions (for the y axis the numbers
>> don't need to be slanted).
> You can do "xticks(rotation=45)" Does that do what you want?
>
> Cheers,
> Mike
>> I tried a manual formatter but I think there should be an easy way to
>> set this in pyplot and I could not figure out how to display the tick
>> numbers slanted.
>>
>> Kind regards,
>>
>> Pim Schellart
>>
>> P.S. In the example number 2452298.7554547498 I also need to subtract
>> 2440000 in order for the plot to render correctly. Otherwise all y
>> values end up at the same x position which is a bug in the latest
>> matplotlib release because it did not happen before.
>> ------------------------------------------------------------------------
>>
>> ------------------------------------------------------------------------------
>> This SF.net email is sponsored by:
>> High Quality Requirements in a Collaborative Environment.
>> Download a free trial of Rational Requirements Composer Now!
>> http://p.sf.net/sfu/www-ibm-com
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>
|
|
From: Pau <vim...@go...> - 2009-04-10 15:03:22
|
http://www.mail-archive.com/mat...@li.../msg03134.html I'd like to understand the syntax, though... For the shared x label I found something at the wiki, but it was a bit obscure... 2009/4/10 Pau <vim...@go...>: > Hello, > > is it possible to define the dimensions of a subplot to use 70% of the > plot surface and the other one 30%? > > I'd also like the plots to share the same x label... > > how to do it? > > thanks > -- Let there be peace on earth. And let it begin with misc |
|
From: Michael D. <md...@st...> - 2009-04-10 14:47:58
|
Are you using the same version on matplotlib in both places? What are the versions? It seems unlikely these differences would be caused by the backend -- more likely just a version difference. Mike bollweevil wrote: > Hello All, > > I am having lots of very frustrating little problems with Matplotlib. > > 1. Here is an example of one problem: the x-axis looks awful even though I > coded a tick locator and tick formatter special: > http://www.nabble.com/file/p22989017/inE.png > I think I know what caused this, too. While plotting, Python gave the > error/warning "DeprecationWarning: integer argument expected, got float > tzinfo=rr._ tzinfo". With many very similar data sets, it doesn't give that > error and draws nice tick marks like this: > http://www.nabble.com/file/p22989017/31%2B2009.png > Is the error caused by the fact that the data doesn't fill the whole X-axis? > That would be an unfortunate reason to fail, especially considering the > second problem... > > 2. Here is another problem: GTK on my MacBook always successfully changes > the X-axis limits when I say plt.xlim(number1, number2). Using the Agg > backend on an Ubuntu server (which doesn't have GTK because it is headless), > xlim NEVER works. Ubuntu with Agg draws a graph fine, but it uses whatever > limits it would have used default. Example from Ubuntu with Agg: > http://www.nabble.com/file/p22989017/Matplotlib%2Bgraph%2B-%2BExemplifies%2Bdate%2Bformatting%2Band%2Bxlim%2Bbugs.png > Example from my MacBook with GTK: > http://www.nabble.com/file/p22989017/22%2B2009.png > > 3. The final problem is also demonstrated by the two example images in > problem #2 above: Agg completely ignores my tick formatter, and perhaps also > my tick locator. Why? > > Here is all of the relevant Matplotlib code I am using: > > plt.clf() > ax = plt.subplot(111) > if dateMin: > plt.xlim(xmin=dateMin, xmax=dateMax) > plt.plot(yDates, xIntensity) > xmin, xmax = plt.xlim() > xrange = num2date(xmax)-num2date(xmin) > if xrange < datetime.timedelta(hours=24): > widthInUnits = divideDelta(xrange, datetime.timedelta(hours=1)) > stepRaw = widthInUnits/5. #The denominator here is the maximum number of > ticks on the x axis. So putting 5 in the denominator, as I have done here, > means there will be up to 5 tick marks. > step = floor(stepRaw+1) > majorFormatter = DateFormatter('%I:%M %p') > majorLocator = HourLocator(interval=step) > elif xrange < datetime.timedelta(days=5): > widthInUnits = divideDelta(xrange, datetime.timedelta(hours=12)) > stepRaw = widthInUnits/7. > step = floor(stepRaw+1) > majorFormatter = DateFormatter('%m/%d\n%I%p') > majorLocator = HourLocator(interval=step*12) > elif xrange < datetime.timedelta(days=300): > widthInUnits = divideDelta(xrange, datetime.timedelta(days=1)) > stepRaw = widthInUnits/8. > step = floor(stepRaw+1) > majorFormatter = DateFormatter('%m/%d') > majorLocator = DayLocator(interval=step) > else: > widthInUnits = divideDelta(xrange, datetime.timedelta(days=30)) > stepRaw = widthInUnits/7. > step = floor(stepRaw+1) > majorFormatter = DateFormatter('%b\n%Y') > majorLocator = MonthLocator(interval=int(step)) > ax.xaxis.set_major_locator(majorLocator) > ax.xaxis.set_major_formatter(majorFormatter) > if dateMark: > for mark in dateMark: > l = plt.axvline(x=mark, color='r') > plt.savefig(str(filePath+'/'+fileNameExt)) > > Thank you, I hope somebody can help. > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
|
From: bollweevil <ly...@ro...> - 2009-04-10 14:43:53
|
Hello All, I am having lots of very frustrating little problems with Matplotlib. 1. Here is an example of one problem: the x-axis looks awful even though I coded a tick locator and tick formatter special: http://www.nabble.com/file/p22989017/inE.png I think I know what caused this, too. While plotting, Python gave the error/warning "DeprecationWarning: integer argument expected, got float tzinfo=rr._ tzinfo". With many very similar data sets, it doesn't give that error and draws nice tick marks like this: http://www.nabble.com/file/p22989017/31%2B2009.png Is the error caused by the fact that the data doesn't fill the whole X-axis? That would be an unfortunate reason to fail, especially considering the second problem... 2. Here is another problem: GTK on my MacBook always successfully changes the X-axis limits when I say plt.xlim(number1, number2). Using the Agg backend on an Ubuntu server (which doesn't have GTK because it is headless), xlim NEVER works. Ubuntu with Agg draws a graph fine, but it uses whatever limits it would have used default. Example from Ubuntu with Agg: http://www.nabble.com/file/p22989017/Matplotlib%2Bgraph%2B-%2BExemplifies%2Bdate%2Bformatting%2Band%2Bxlim%2Bbugs.png Example from my MacBook with GTK: http://www.nabble.com/file/p22989017/22%2B2009.png 3. The final problem is also demonstrated by the two example images in problem #2 above: Agg completely ignores my tick formatter, and perhaps also my tick locator. Why? Here is all of the relevant Matplotlib code I am using: plt.clf() ax = plt.subplot(111) if dateMin: plt.xlim(xmin=dateMin, xmax=dateMax) plt.plot(yDates, xIntensity) xmin, xmax = plt.xlim() xrange = num2date(xmax)-num2date(xmin) if xrange < datetime.timedelta(hours=24): widthInUnits = divideDelta(xrange, datetime.timedelta(hours=1)) stepRaw = widthInUnits/5. #The denominator here is the maximum number of ticks on the x axis. So putting 5 in the denominator, as I have done here, means there will be up to 5 tick marks. step = floor(stepRaw+1) majorFormatter = DateFormatter('%I:%M %p') majorLocator = HourLocator(interval=step) elif xrange < datetime.timedelta(days=5): widthInUnits = divideDelta(xrange, datetime.timedelta(hours=12)) stepRaw = widthInUnits/7. step = floor(stepRaw+1) majorFormatter = DateFormatter('%m/%d\n%I%p') majorLocator = HourLocator(interval=step*12) elif xrange < datetime.timedelta(days=300): widthInUnits = divideDelta(xrange, datetime.timedelta(days=1)) stepRaw = widthInUnits/8. step = floor(stepRaw+1) majorFormatter = DateFormatter('%m/%d') majorLocator = DayLocator(interval=step) else: widthInUnits = divideDelta(xrange, datetime.timedelta(days=30)) stepRaw = widthInUnits/7. step = floor(stepRaw+1) majorFormatter = DateFormatter('%b\n%Y') majorLocator = MonthLocator(interval=int(step)) ax.xaxis.set_major_locator(majorLocator) ax.xaxis.set_major_formatter(majorFormatter) if dateMark: for mark in dateMark: l = plt.axvline(x=mark, color='r') plt.savefig(str(filePath+'/'+fileNameExt)) Thank you, I hope somebody can help. -- View this message in context: http://www.nabble.com/Lots-of-little-problems-with-appearance-%28Agg-vs.-GTK%2C-xlim%2C-tick-locators%29-tp22989017p22989017.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Pau <vim...@go...> - 2009-04-10 14:39:23
|
Hello, is it possible to define the dimensions of a subplot to use 70% of the plot surface and the other one 30%? I'd also like the plots to share the same x label... how to do it? thanks |
|
From: Pellegrini E. <eri...@ya...> - 2009-04-10 14:01:53
|
Hello everybody,
I would like to create a plot from which I set the x data later. The method set_xdata works but the corresponding plot displays the initial x limits. Is it possible to update the plot automatically in order that the displayed plot has x limits corresponding to the newly set x data ?
Here is the script that fails:
import pylab
fig = pylab.figure()
ax = fig.add_subplot(111, label = 'plot1')
p, = ax.plot([1,2,3,4,5])
p.set_xdata([10,20,30,40,50])
# ax.set_xlim([10,50])
fig.show()
to update the xlim I have to add the commented line.
thank you very much
Eric Pellegrini
|
|
From: Michael D. <md...@st...> - 2009-04-10 13:23:58
|
Pim Schellart wrote: > Dear Matplotlib users/developers, > > The default behaviour of matplotlib.pyplot is to display large (e.g. > 2452298.7554547498 as a small number 0.25545474980026484 + > 2.4522985e6) I would like to be able to do one of the following. > > - Set the number to be subtracted manually (I know I can just subtract > a number from the input array but then matplotib still subtracts > another number if it thinks it is still to big to display). I don't know if there's a straightforward way to do this... Maybe someone more familiar with the ticking code can comment. > - Force matplotlib to display the full number (and display the numbers > slanted so they do not overlap). This is my preferred option. I would > like to see this as a simple option in pyplot, perhaps as an extra > parameter in the xticks/yticks functions (for the y axis the numbers > don't need to be slanted). You can do "xticks(rotation=45)" Does that do what you want? Cheers, Mike > > I tried a manual formatter but I think there should be an easy way to > set this in pyplot and I could not figure out how to display the tick > numbers slanted. > > Kind regards, > > Pim Schellart > > P.S. In the example number 2452298.7554547498 I also need to subtract > 2440000 in order for the plot to render correctly. Otherwise all y > values end up at the same x position which is a bug in the latest > matplotlib release because it did not happen before. > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
|
From: Pim S. <P.S...@st...> - 2009-04-10 13:15:43
|
Dear Matplotlib users/developers, The default behaviour of matplotlib.pyplot is to display large (e.g. 2452298.7554547498 as a small number 0.25545474980026484 + 2.4522985e6) I would like to be able to do one of the following. - Set the number to be subtracted manually (I know I can just subtract a number from the input array but then matplotib still subtracts another number if it thinks it is still to big to display). - Force matplotlib to display the full number (and display the numbers slanted so they do not overlap). This is my preferred option. I would like to see this as a simple option in pyplot, perhaps as an extra parameter in the xticks/yticks functions (for the y axis the numbers don't need to be slanted). I tried a manual formatter but I think there should be an easy way to set this in pyplot and I could not figure out how to display the tick numbers slanted. Kind regards, Pim Schellart P.S. In the example number 2452298.7554547498 I also need to subtract 2440000 in order for the plot to render correctly. Otherwise all y values end up at the same x position which is a bug in the latest matplotlib release because it did not happen before. |
|
From: Michael D. <md...@st...> - 2009-04-10 12:48:16
|
Lorenzo Di Gregorio wrote: > Well, that's exactly the problem: I just can't load some DLLs! > > >>> import matplotlib._path > > Traceback (most recent call last): > File "<pyshell#0>", line 1, in <module> > import matplotlib._path > ImportError: DLL load failed: Die angegebene Prozedur wurde nicht > gefunden. > >>> import matplotlib._delaunay > >>> import matplotlib._image > > Traceback (most recent call last): > File "<pyshell#2>", line 1, in <module> > import matplotlib._image > ImportError: DLL load failed: Die angegebene Prozedur wurde nicht > gefunden. > > I have run python -vv, it tries also ..._path but does not load it, so > I think it might be a linking problem. > I've noticed that _delaunay.cpp has a "PyMODINIT_FUNC > init_delaunay(void)" while _path.cpp has just a "void init_path(void)". If you make that change, does it work? Mike > > Best Regards, > Lorenzo > > On 4/9/09, *Michael Droettboom* <md...@st... > <mailto:md...@st...>> wrote: > > Can you send us the output of this Python session to help us > debug? I'm curious what symbols *are* in there. > > >>> import matplotlib._path > >>> dir(matplotlib._path) > ['__doc__', '__file__', '__name__', 'affine_transform', > 'clip_path_to_rect', 'convert_path_to_polygons', > 'count_bboxes_overlapping_bbox', 'get_path_collection_extents', > 'get_path_extents', 'path_in_path', 'path_intersects_path', > 'point_in_path', 'point_in_path_collection', 'point_on_path', > 'update_path_extents'] > >>> > > Cheers, > Mike > > Lorenzo Di Gregorio wrote: > > On Thu, Apr 9, 2009 at 7:06 AM, Andrew Straw > <str...@as... <mailto:str...@as...> > <mailto:str...@as... <mailto:str...@as...>>> wrote: > > Lorenzo Di Gregorio wrote: > > Hello, > > > > I've tried to build matplotlib 0.98.5.2 for Python 2.6 > under Windows > > (Win2k) using MinGW and win32_static. After a few fixes, the > > compilation and install appear to be ok, but I've got > stuck at > > importing matplotlib._path (see transcript below). > > Any suggestions on what is going wrong and how to fix it? > > > > File > "C:\Python26\lib\site-packages\matplotlib\artist.py", line 5, > > in <module> > > > > from transforms import Bbox, IdentityTransform, > TransformedBbox, > > Transformed > > Path > > File > "C:\Python26\lib\site-packages\matplotlib\transforms.py", > line > > 34, in <mo > > dule> > > from matplotlib._path import affine_transform > > ImportError: DLL load failed: Die angegebene Prozedur > wurde nicht > > gefunden. > > > Did _path.cpp get compiled to a .pyd OK? (Do you have > C:\PYTHON26\Lib\site-packages\matplotlib\_path.pyd > installed? -- I > guess > that's where it would be... Not running Python on Windows, > though, I > could be off a bit.) > > > Yes, that's compiled and installed at the location you mentioned. > In fact I have no idea what is wrong with that. > How does a .pyd reference a DLL and what is it supposed to load? > > And, as a hint to anyone else attempting to debug this: the > above > traceback means "The given procedure was not found". (And > Lorenzo Di > Gregorio doesn't sound like a very German name to me, so > why your > computer is speaking German I don't know... :) > > > Right, I don't know either why I haven't switched it already > ;-) But mitigating circumstances for lazyness are that German > is my second language, my wife is German, I live and work in > Germany etc. > > I do find something nice about running Python 2.6 under Win2k, > though... > > > ... under Linux it was too easy ;-P (my company runs Win2k!) > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > <mailto:Mat...@li...> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > -- > Michael Droettboom > Science Software Branch > Operations and Engineering Division > Space Telescope Science Institute > Operated by AURA for NASA > > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
|
From: Michael M. F. <mf...@ph...> - 2009-04-10 00:46:22
|
Is there a standard way to associate scalex/scaley information with individual plot elements? I would like to do the following: x = linspace(-1,1,100) y = sin(x) plot(x,y) plot(x,10*y,scaley=False) plot(x,2*y) and have it be equivalent to plotting instead in the order plot(x,y) plot(x,2*y) plot(x,10*y,scaley=False) i.e., the (x, 10*y) data does not affect the auto-scaling whereas the other two collections do. The problem is that scaley seems to just change the autoscaling for the single plot command, but it does not remove the line from the autoscaling for future plotting. Is there any easy work around? (I know I could probably somehow accumulate all my results, and then finally sort them, plotting the non-scaled data last, but this seems very kludgy). Thanks, Michael. |