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
(20) |
2
(21) |
3
(21) |
4
(14) |
5
(8) |
|
6
(12) |
7
(16) |
8
(27) |
9
(39) |
10
(19) |
11
(12) |
12
(3) |
|
13
(3) |
14
(18) |
15
(14) |
16
(6) |
17
(7) |
18
(19) |
19
(5) |
|
20
(8) |
21
(24) |
22
(42) |
23
(12) |
24
(11) |
25
(16) |
26
(2) |
|
27
(4) |
28
(10) |
|
|
|
|
|
|
From: Thore O. <tho...@is...> - 2011-02-09 11:27:28
|
Dear Developers of Matplotlib, at first thanks for this mightiest tool for graphical output from python data. I have encountered problems on trying the watermark feature as described at http://matplotlib.sourceforge.net/examples/api/watermark_image.html. When I invoke the script from a Enthought Python Compiler in the Windows COM then I got this message: Traceback (most recent call last): File "Fluide\script1.py", line 13, in <module> datafile = cbook.get_sample_data('logo.png', asfileobj=False) File "D:\Programme\Enthought\lib\site-packages\matplotlib-1.0.1_r0-py2.6-win32.egg\matplotlib\cbook.py", line 676, in get_sample_data return myserver.get_sample_data(fname, asfileobj=asfileobj) File "D:\Programme\Enthought\lib\site-packages\matplotlib-1.0.1_r0-py2.6-win32.egg\matplotlib\cbook.py", line 623, in get_sample_data raise KeyError(msg) KeyError: 'file iselogo.png not in cache; received <urlopen error [Errno 10061] No connection could be made because the target machine actively refused it> when trying to retrieve' Does anyone no a solution for this problem? Image is in the same directory as the script. Or if now I switched to it by os.chdir to the specific path. Thanks in advance for your help. Kindly regards, Thore Oltersdorf |
|
From: Thore O. <tho...@is...> - 2011-02-09 11:21:34
|
Dear Developers of Matplotlib, at first thanks for this mightiest tool for graphical output from python data. I have encountered problems on trying the watermark feature as described at http://matplotlib.sourceforge.net/examples/api/watermark_image.html. When I invoke the script from a Enthought Python Compiler in the Windows COM then I got this message: Traceback (most recent call last): File "Fluide\script1.py", line 13, in <module> datafile = cbook.get_sample_data('logo.png', asfileobj=False) File "D:\Programme\Enthought\lib\site-packages\matplotlib-1.0.1_r0-py2.6-win32.egg\matplotlib\cbook.py", line 676, in get_sample_data return myserver.get_sample_data(fname, asfileobj=asfileobj) File "D:\Programme\Enthought\lib\site-packages\matplotlib-1.0.1_r0-py2.6-win32.egg\matplotlib\cbook.py", line 623, in get_sample_data raise KeyError(msg) KeyError: 'file iselogo.png not in cache; received <urlopen error [Errno 10061] No connection could be made because the target machine actively refused it> when trying to retrieve' Does anyone no a solution for this problem? Thanks in advance for your help. Kindly regards, Thore Oltersdorf |
|
From: Thore O. <tho...@is...> - 2011-02-09 11:18:17
|
Dear Matplotlib-Users. I try to generate some 2d plot with dimension log10(p)-h from refprop. For the isolines (isentropes, isotherms, isochores etc.) I was successful but adding labels to these isolines were quite discouraging until now. Please have a view on the screenshot to have an idea of the feature I try to realize. I tried to find a similar feature as given in the contour API for the clabel. There it is possible to define something like an inline label. (Of course I could have done this job with contour plots from the beginnings. But please no hints like this. It would mean to begin from scratch again...) Then I had the idea to generate points directly at the limits of the x- and y-axis on each isoline to use it for an annotate instance. But it would mean to annotate in the ticker region which is in a layer on top of the graph/image. Later I wanted to set markeredgewidth and markersize to zero just to have annotation as the feature of choice. Now I am not sure how to procede and hope that someone of you has an idea. Thanks in advance for your help. Kindly regards, Thore Oltersdorf |
|
From: Thore O. <tho...@is...> - 2011-02-09 11:11:56
|
Dear Matplotlib-Users. After changing the scaling from the y-axis from default to semilogy the tickers were not updated anymore automatically when a zoom is applied. Even after deep searches within the ticker API as well as the mail archive list I could not find an appropriate solution for this. In the original artist/image (sorry for confused usage of this termini, I am pretty new to matplotlib): the scale has a default log10-base with major tickers including labels and minor tickers without (guess this is the default ticker formatting). I was messing around a lot with autoscale(enable=True,axis='both') and set_autoscale_on(True) and relim(). But actually the sovereign handling ot this API is still missing for me and I was not able to solve the problem. Thanks in advance for your help. Kindly regards, Thore Oltersdorf |
|
From: neurino <ne...@gm...> - 2011-02-09 10:53:24
|
Hi, I'm a matplotlib newbie. An example is worth a thousand words: In [1]: matplotlib.__version__ Out[1]: '0.99.3' In [2]: a, b, x = np.zeros(10), np.ones(10), np.arange(10) In [3]: plot(x, a); plot(x, b) Well all I see is an empty plot with the two horizontal lines at y=0 and y=1 covered by the upper and lower frame lines. Why aren't bounds set a little more larger so the two lines can show properly??? I guess this is a common situation, for example 2 or more stable temperatures: the higher and the lower never show... How can I fix it? Thanks for your support. |
|
From: Eric L. <eri...@gm...> - 2011-02-09 09:58:48
|
On 01/27/2011 09:24 PM, Thomas Lecocq wrote: > Hi, > > Adding some extra work in the readshapefile method in your code allows > you to play with the region names etc,... > > I've just made a new tutorial script to show this : > > http://www.geophysique.be/2011/01/27/matplotlib-basemap-tutorial-07-shapefiles-unleached/ > Thanks for your great job, it's brilliant! And sorry for the long time delay to reply your mail, as I've just been back from the Chinese new year's vacation. Wishing you peace, joy and happiness throughout the coming year! Eric > > Thom > > > ********************** > Thomas Lecocq > Geologist > Ph.D.Student (Seismology) > Royal Observatory of Belgium > ********************** > > > > ------------------------------------------------------------------------ > Date: Thu, 27 Jan 2011 17:59:03 +0800 > From: eri...@gm... > To: thl...@ms... > CC: eri...@gm...; mat...@li... > Subject: Re: [Matplotlib-users] How to draw a specific country by basemap? > > On 01/27/2011 01:38 AM, Thomas Lecocq wrote: > > Hi, > > An easy way is to use the data from http://www.gadm.org/ and to > plot it with m.readshapefile() > > Thank you very much. The GDAM database is great. > > BTW, would you like to give some suggestions about how to color the > map, i.e., highlight a specific region? > > Thanks, > Eric > > > HTH, > > Thom > > ********************** > Thomas Lecocq > Geologist > Ph.D.Student (Seismology) > Royal Observatory of Belgium > ********************** > > > > ------------------------------------------------------------------------ > Date: Wed, 26 Jan 2011 16:03:27 +0800 > From: eri...@gm... <mailto:eri...@gm...> > To: mat...@li... > <mailto:mat...@li...> > Subject: [Matplotlib-users] How to draw a specific country by basemap? > > Hi all, > > I'm using the Basemap module in matplotlib, it's great to draw a > world map but for a specific country. Empirically, one can draw > its own country by specifying the lats and longs like this example: > > http://matplotlib.sourceforge.net/basemap/doc/html/users/geography.html > > And you can use the method: drawcontries() to draw the country > boundries, but all the countries are in the same colour. Does > anyone know how to highlight a specific country? Thanks in advance. > > Eric > > -- > -----BEGIN GEEK CODE BLOCK----- > Version: 3.1 > GCM/CS/E/MU/P d+(-) s: a- C++ UL$ P+>++ L++ E++ W++ N+ o+>++ K+++ w !O > M-(+) V-- PS+ PE+ Y+ PGP++ t? 5? X? R+>* tv@ b++++ DI-- D G++ e++>+++@ h* > r !y+ > ------END GEEK CODE BLOCK------ > > > ------------------------------------------------------------------------------ > Special Offer-- Download ArcSight Logger for FREE (a $49 USD > value)! Finally, a world-class log management solution at an even > better price-free! Download using promo code > Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your > free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d > _______________________________________________ Matplotlib-users > mailing list Mat...@li... > <mailto:Mat...@li...> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > -- > -----BEGIN GEEK CODE BLOCK----- > Version: 3.1 > GCM/CS/E/MU/P d+(-) s: a- C++ UL$ P+>++ L++ E++ W++ N+ o+>++ K+++ w !O > M-(+) V-- PS+ PE+ Y+ PGP++ t? 5? X? R+>* tv@ b++++ DI-- D G++ e++>+++@ h* > r !y+ > ------END GEEK CODE BLOCK------ > > ------------------------------------------------------------------------------ > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > Finally, a world-class log management solution at an even better > price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer > expires February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d > _______________________________________________ Matplotlib-users > mailing list Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCM/CS/E/MU/P d+(-) s: a- C++ UL$ P+>++ L++ E++ W++ N+ o+>++ K+++ w !O M-(+) V-- PS+ PE+ Y+ PGP++ t? 5? X? R+>* tv@ b++++ DI-- D G++ e++>+++@ h* r !y+ ------END GEEK CODE BLOCK------ |
|
From: Eric F. <ef...@ha...> - 2011-02-09 07:50:48
|
On 02/08/2011 02:39 PM, Christoph Gohlke wrote: > > > Please consider the attached patch for the _image.frombyte function. It > avoids temporary copies in case of non-contiguous input arrays. Copying > a 1024x1024 slice out of a contiguous 4096x4096 RGBA or RGB array is > about 7x faster (a common case for zooming/panning). Copying contiguous > RGB input arrays is ~2x faster. Tested on win32-py2.7. > > Christoph > Thank you! Looks good, speeds up zooming and panning on large images as advertised. An 8000x8000 image is actually manageable now. interpolation='nearest' is still very slow until the image is substantially zoomed, but everything is quite quick with other interpolation styles. The slowness of 'nearest' looks like a basic characteristic of the implementation. I committed the patch in 8966. Before that I found and committed a big speed-up in Normalize. Eric |
|
From: Benjamin R. <ben...@ou...> - 2011-02-09 02:44:15
|
On Tue, Feb 8, 2011 at 5:53 PM, Paul Leopardi <pau...@ii...>wrote: > Hi Ben, > On Wed, 9 Feb 2011 03:15:19 AM you wrote: > > As formatted, the code would not run. I presume that everything after > "for > > j in range(0,M):" should be indented? When I did that and ran it in > > ipython, I could not reproduce your problem. What version of matplotlib > > are you running? > > Thanks for your continued close attention to this undoubted problem. > > Your email system mangled the indentation. The correct indentation is > displayed at > http://sourceforge.net/mailarchive/message.php?msg_id=27020771 > > I have also included a copy of the script matplotlib_bug_example.py with > this > message. [*Not* posted to the list.] Here is how I run it: > > ipython -pylab > Python 2.6.2 (r262:71600, Oct 28 2010, 20:54:41) > Type "copyright", "credits" or "license" for more information. > > IPython 0.10 -- An enhanced Interactive Python. > ? -> Introduction and overview of IPython's features. > %quickref -> Quick reference. > help -> Python's own help system. > object? -> Details about 'object'. ?object also works, ?? prints more. > > Welcome to pylab, a matplotlib-based Python environment. > For more information, type 'help(pylab)'. > > In [1]: run matplotlib_bug_example.py > > My original post > http://sourceforge.net/mailarchive/message.php?msg_id=27016368 > listed what I thought were the relevant versions: > > Quote > I am using openSUSE 11.2 with > python-base-2.6.2-6.7.1.x86_64 > python-matplotlib-1.0.1-20.1.x86_64 > python-matplotlib-tk-1.0.1-20.1.x86_64 > python-matplotlib-wx-1.0.1-20.1.x86_64 > Unquote > > I have since run the script on a second machine which uses Ubuntu Karmic, > with > identical results. > > Versions in brief: > Linux linfinit 2.6.31.12-0.1-default #1 SMP PREEMPT 2010-12-10 11:18:32 > +0100 > x86_64 x86_64 x86_64 GNU/Linux > > IPython-0.10-3.2.noarch > python-2.6.2-6.7.1.x86_64 > python-matplotlib-1.0.1-20.1.x86_64 > python-matplotlib-tk-1.0.1-20.1.x86_64 > python-matplotlib-wx-1.0.1-20.1.x86_64 > python-numpy-1.5.0-17.2.x86_64 > python-tk-2.6.2-6.7.1.x86_64 > > Linux cheeze 2.6.31-22-generic #70-Ubuntu SMP Wed Dec 1 23:51:13 UTC 2010 > i686 GNU/Linux > > ipython 0.10-1 > python 2.6.4-0ubuntu1 > python-matplotlib 0.99.0-1ubuntu1 > python-numpy 1:1.3.0-3 > python-tk 2.6.3-0ubuntu1 > > > I have included a listing showing all versions of all packages with names > containing the string "python", on both machines. [*Not* posted to the > list.] > Best, Paul > > Trying out the script on another machine of mine, I was able to reproduce the problem. I will have to see what is the difference between my two computers that would cause the other one to work perfectly fine. Ben Root |
|
From: Curiouslearn <cur...@gm...> - 2011-02-09 00:43:41
|
Thanks again, Paul! Now I understand. I tried your example and I can
see the effect of those commands.
On Tue, Feb 8, 2011 at 7:29 PM, Paul Ivanov <piv...@gm...> wrote:
> Curiouslearn, on 2011-02-08 19:04, wrote:
>> I wonder then what edgecolor, linewidth etc. change in case of axes.patch.
>
> They do what one would expect, but the spines were likely
> preventing you from seeing this:
>
> ax = plt.subplot(1,1,1)
> [s.set_visible(False) for s in ax.spines.values()]
> ax.patch.set_linewidth(2)
> ax.patch.set_edgecolor('red')
> plt.draw()
>
> best,
> --
> Paul Ivanov
> 314 address only used for lists, off-list direct email at:
> http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iEYEARECAAYFAk1R39oACgkQe+cmRQ8+KPd9xgCfQcoPu5wU9O/k5IqlsTlUpTKD
> P6sAnjPfi4Dv1xxEDDB8WxVtiy7s1Oj9
> =/N2z
> -----END PGP SIGNATURE-----
>
> ------------------------------------------------------------------------------
> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
> Pinpoint memory and threading errors before they happen.
> Find and fix more than 250 security defects in the development cycle.
> Locate bottlenecks in serial and parallel code that limit performance.
> http://p.sf.net/sfu/intel-dev2devfeb
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
|
|
From: Christoph G. <cg...@uc...> - 2011-02-09 00:39:58
|
On 2/5/2011 1:02 PM, Eric Firing wrote: > On 02/04/2011 02:03 PM, Christoph Gohlke wrote: > [...] >> >> How about these changes to color.py (attached). This avoids copies, uses >> in-place operations, and calculates single precision when normalizing >> small integer and float32 arrays. Similar could be done for LogNorm. Do >> masked arrays support in-place operations? >> >> Christoph > > Christoph, > > Thank you. > > Done (with slight modifications) in 8946 (trunk). > > I was surprised by the speedup in normalizing large arrays when using > float32 versus float64. A factor of 10 on my machine with (1000,1000), > timed with ipython %timeit. Because of the way %timeit does multiple > tests, I suspect it may exaggerate cache effects. > > Eric Please consider the attached patch for the _image.frombyte function. It avoids temporary copies in case of non-contiguous input arrays. Copying a 1024x1024 slice out of a contiguous 4096x4096 RGBA or RGB array is about 7x faster (a common case for zooming/panning). Copying contiguous RGB input arrays is ~2x faster. Tested on win32-py2.7. Christoph |
|
From: Paul I. <piv...@gm...> - 2011-02-09 00:29:37
|
Curiouslearn, on 2011-02-08 19:04, wrote:
> I wonder then what edgecolor, linewidth etc. change in case of axes.patch.
They do what one would expect, but the spines were likely
preventing you from seeing this:
ax = plt.subplot(1,1,1)
[s.set_visible(False) for s in ax.spines.values()]
ax.patch.set_linewidth(2)
ax.patch.set_edgecolor('red')
plt.draw()
best,
--
Paul Ivanov
314 address only used for lists, off-list direct email at:
http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7
|
|
From: Curiouslearn <cur...@gm...> - 2011-02-09 00:04:21
|
Thanks very much Paul. This worked great.
I wonder then what edgecolor, linewidth etc. change in case of axes.patch.
Thanks again.
On Tue, Feb 8, 2011 at 6:22 PM, Paul Ivanov <piv...@gm...> wrote:
> Curiouslearn, on 2011-02-08 15:32, wrote:
>> Sorry if the subject line does not use correct terminology. But the
>> following explains the question I have:
>> Suppose I have the following code:
>>
>> import matplotlib.pyplot as plt
>>
>> fig1 = plt.figure()
>> ax1 = fig1.add_subplot(1,1,1)
>>
>> ax1.scatter(xvalues, yvalues)
>> ax1.axvline(1.3, color='DarkGreen')
>> rect = ax1.patch
>> rect.set_facecolor('SteelBlue') #This works
>> rect.set_edgecolor('red') # Is it supposed to set the color of the
>> border. If so, this DOES NOT work.
>> rect.set_linestyle('dashed') # This DOES NOT work.
>> rect.set_linewidth(4) # This DOES NOT work.
>>
>> For the things that do not work, I tried both
>>
>> plt.show()
>>
>> and,
>>
>> plt.savefig('this_figure.pdf')
>>
>> Why do the things that I have indicated do not work?
>>
>> My second question is, if I want to have only the x-axis and y-axis
>> line (i.e., get rid of the right edge and top edge of the axes frame)
>> how do I do it?
>
> The names of the things you want to change are called spines.
>
> You want:
>
> ax1.spines['right'].set_visible(False)
> ax1.spines['top'].set_visible(False)
> ax1.spines['left'].set_color('red')
> ax1.spines['bottom'].set_color('red')
> #and so on for .set_linestyle, .set_linewidth
>
> To hide the tickmarks that are right next to the spines, you can
> do:
>
> ax1.xaxis.tick_bottom()
> ax1.yaxis.tick_left()
>
> and finally, to color the ticks in red as well, do:
>
> ax1.tick_params(color='red')
>
> best,
> --
> Paul Ivanov
> 314 address only used for lists, off-list direct email at:
> http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iEYEARECAAYFAk1R0CoACgkQe+cmRQ8+KPcmJwCgk8DmrReu7A+v8qSqK0OmXxFe
> HWQAnjRAogcretSNthEJN82koTuPmFhx
> =zzWa
> -----END PGP SIGNATURE-----
>
> ------------------------------------------------------------------------------
> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
> Pinpoint memory and threading errors before they happen.
> Find and fix more than 250 security defects in the development cycle.
> Locate bottlenecks in serial and parallel code that limit performance.
> http://p.sf.net/sfu/intel-dev2devfeb
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
|
|
From: Paul L. <pau...@ii...> - 2011-02-08 23:53:58
|
Hi Ben, On Wed, 9 Feb 2011 03:15:19 AM you wrote: > As formatted, the code would not run. I presume that everything after "for > j in range(0,M):" should be indented? When I did that and ran it in > ipython, I could not reproduce your problem. What version of matplotlib > are you running? Thanks for your continued close attention to this undoubted problem. Your email system mangled the indentation. The correct indentation is displayed at http://sourceforge.net/mailarchive/message.php?msg_id=27020771 I have also included a copy of the script matplotlib_bug_example.py with this message. [*Not* posted to the list.] Here is how I run it: ipython -pylab Python 2.6.2 (r262:71600, Oct 28 2010, 20:54:41) Type "copyright", "credits" or "license" for more information. IPython 0.10 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object'. ?object also works, ?? prints more. Welcome to pylab, a matplotlib-based Python environment. For more information, type 'help(pylab)'. In [1]: run matplotlib_bug_example.py My original post http://sourceforge.net/mailarchive/message.php?msg_id=27016368 listed what I thought were the relevant versions: Quote I am using openSUSE 11.2 with python-base-2.6.2-6.7.1.x86_64 python-matplotlib-1.0.1-20.1.x86_64 python-matplotlib-tk-1.0.1-20.1.x86_64 python-matplotlib-wx-1.0.1-20.1.x86_64 Unquote I have since run the script on a second machine which uses Ubuntu Karmic, with identical results. Versions in brief: Linux linfinit 2.6.31.12-0.1-default #1 SMP PREEMPT 2010-12-10 11:18:32 +0100 x86_64 x86_64 x86_64 GNU/Linux IPython-0.10-3.2.noarch python-2.6.2-6.7.1.x86_64 python-matplotlib-1.0.1-20.1.x86_64 python-matplotlib-tk-1.0.1-20.1.x86_64 python-matplotlib-wx-1.0.1-20.1.x86_64 python-numpy-1.5.0-17.2.x86_64 python-tk-2.6.2-6.7.1.x86_64 Linux cheeze 2.6.31-22-generic #70-Ubuntu SMP Wed Dec 1 23:51:13 UTC 2010 i686 GNU/Linux ipython 0.10-1 python 2.6.4-0ubuntu1 python-matplotlib 0.99.0-1ubuntu1 python-numpy 1:1.3.0-3 python-tk 2.6.3-0ubuntu1 I have included a listing showing all versions of all packages with names containing the string "python", on both machines. [*Not* posted to the list.] Best, Paul |
|
From: Paul I. <piv...@gm...> - 2011-02-08 23:22:37
|
Curiouslearn, on 2011-02-08 15:32, wrote:
> Sorry if the subject line does not use correct terminology. But the
> following explains the question I have:
> Suppose I have the following code:
>
> import matplotlib.pyplot as plt
>
> fig1 = plt.figure()
> ax1 = fig1.add_subplot(1,1,1)
>
> ax1.scatter(xvalues, yvalues)
> ax1.axvline(1.3, color='DarkGreen')
> rect = ax1.patch
> rect.set_facecolor('SteelBlue') #This works
> rect.set_edgecolor('red') # Is it supposed to set the color of the
> border. If so, this DOES NOT work.
> rect.set_linestyle('dashed') # This DOES NOT work.
> rect.set_linewidth(4) # This DOES NOT work.
>
> For the things that do not work, I tried both
>
> plt.show()
>
> and,
>
> plt.savefig('this_figure.pdf')
>
> Why do the things that I have indicated do not work?
>
> My second question is, if I want to have only the x-axis and y-axis
> line (i.e., get rid of the right edge and top edge of the axes frame)
> how do I do it?
The names of the things you want to change are called spines.
You want:
ax1.spines['right'].set_visible(False)
ax1.spines['top'].set_visible(False)
ax1.spines['left'].set_color('red')
ax1.spines['bottom'].set_color('red')
#and so on for .set_linestyle, .set_linewidth
To hide the tickmarks that are right next to the spines, you can
do:
ax1.xaxis.tick_bottom()
ax1.yaxis.tick_left()
and finally, to color the ticks in red as well, do:
ax1.tick_params(color='red')
best,
--
Paul Ivanov
314 address only used for lists, off-list direct email at:
http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7
|
|
From: Curiouslearn <cur...@gm...> - 2011-02-08 20:32:54
|
Sorry if the subject line does not use correct terminology. But the
following explains the question I have:
Suppose I have the following code:
import matplotlib.pyplot as plt
fig1 = plt.figure()
ax1 = fig1.add_subplot(1,1,1)
ax1.scatter(xvalues, yvalues)
ax1.axvline(1.3, color='DarkGreen')
rect = ax1.patch
rect.set_facecolor('SteelBlue') #This works
rect.set_edgecolor('red') # Is it supposed to set the color of the
border. If so, this DOES NOT work.
rect.set_linestyle('dashed') # This DOES NOT work.
rect.set_linewidth(4) # This DOES NOT work.
For the things that do not work, I tried both
plt.show()
and,
plt.savefig('this_figure.pdf')
Why do the things that I have indicated do not work?
My second question is, if I want to have only the x-axis and y-axis
line (i.e., get rid of the right edge and top edge of the axes frame)
how do I do it?
I am using the Matplotlib version that comes with Enthought Python
Distribution 6.3.
Thanks for your help.
|
|
From: Massimo Di S. <mas...@gm...> - 2011-02-08 20:01:54
|
ok :-) i find a solution .. maybe correct : in the __init__ i added : self.a = None then in "on_draw" : if self.a is not None: self.axes.collections.remove(self.a) self.a = self.axes.plot_surface(x, y, z, rstride=res, cstride=res, facecolors=colors) now the plot is refreshed ok :-) Il giorno 08/feb/2011, alle ore 10.35, Massimo Di Stefano ha scritto: > hello All > > have you never tried to embed a matplotlib 3d graph inside pyqt ? > > i'm tring to do it .. but i've problenms to refresh my plot. > > The 3d data are displayed ok inside a pyqt simple widget, > but if i try to redraw the image (re-call the on_draw function) ... > i have it overlay the previouse one. > > If i add "clear()" at begin of my "on_draw" action, > the plot is update correctly ... and each "on_draw" action give me the correct results ... > but then i'm no more able to move the 3d plot view (but i can only zoom in/out the scene) > the code i'm using is : http://paste.debian.net/106890 > at line 22 there is a "def erase(self):" function > if i connect it to the plot i have the image is correctly redraw .. but then i lost the 3d actions > can you give it a try ? > > seems thast the "clear()" action broke something ... thanks a lot for any help > to try it .. i've upload the .mat file (just few kbytes) > it is available at : > > http://www.geofemengineering.it/data/complexity_depth_grid1.mat > > > Thank you! > > Massimo. > > _______________________________________________ > PyQt mailing list Py...@ri... > http://www.riverbankcomputing.com/mailman/listinfo/pyqt |
|
From: Eric F. <ef...@ha...> - 2011-02-08 17:58:29
|
On 02/08/2011 06:42 AM, Benjamin Root wrote: > > > On Thu, Feb 3, 2011 at 9:19 AM, Gf B <gbs...@gm... > <mailto:gbs...@gm...>> wrote: > > In many places in the mpl docs there are tables of supported "kwarg > properties" containing at least one (usually many) entries where the > description given for the property is simply "unknown". What's up > with that??? How can the description of a property be unknown??? > > Any clarification for what this "unknown" notation means would be > appreciated. > > Thanks, > > G > > > > Most likely, it means that the person who wrote that portion of the > documentation was not familiar enough with the code to know for sure > exactly what that particular property does. We should aim to find and > fix all of these for the next release. > > Ben Root Ben, I think that it is coming from the document autogeneration mechanism related to the automatic handling of "set_*()" methods. If they lack an "ACCEPTS:" block, then "unknown" is substituted. An example is the obscure "agg_filter" property that everything inherits from artist. Possibly the solution is to change the autogeneration to ignore such methods when gathering "properties". Eric |
|
From: Benjamin R. <ben...@ou...> - 2011-02-08 16:43:13
|
On Thu, Feb 3, 2011 at 9:19 AM, Gf B <gbs...@gm...> wrote: > In many places in the mpl docs there are tables of supported "kwarg > properties" containing at least one (usually many) entries where the > description given for the property is simply "unknown". What's up with > that??? How can the description of a property be unknown??? > > Any clarification for what this "unknown" notation means would be > appreciated. > > Thanks, > > G > > > Most likely, it means that the person who wrote that portion of the documentation was not familiar enough with the code to know for sure exactly what that particular property does. We should aim to find and fix all of these for the next release. Ben Root |
|
From: Benjamin R. <ben...@ou...> - 2011-02-08 16:15:47
|
On Mon, Feb 7, 2011 at 5:02 AM, Paul Leopardi <pau...@ii...>wrote:
> Hi all,
> On Sun, 6 Feb 2011 03:54:48 PM Paul Leopardi wrote:
> > I'm having trouble using multiple figures with mplot3d.
>
> I have appended an entire example script, below.
>
> The script incrementally plots 3 curves, one in each of 3 figure windows.
> The
> trouble is, once Figure 2 has finished plotting, the curve for Figure 1
> disappears and is replaced by the curve for Figure 2, with the axes for
> Figure
> 1; once Figure 3 has finished plotting, the curves for Figures 1 and 2
> disappear and are replaced by the curve for Figure 3, with the axes for
> Figure
> 1 and Figure 2, respectively.
>
> The original code was written with incremental plotting because the points
> took a long time to calculate. Without incremental plotting, the figures
> stayed blank for a long time. The script below is very similar to my
> original
> script, but does not depend on my GluCat library.
>
> Best, Paul
> ---
>
> # -*- coding: utf-8 -*-
>
> # Imports needed for array calculation and plotting.
> from numpy import array, floor, random, empty, cos, pi
> from mpl_toolkits.mplot3d import Axes3D
> import matplotlib.pyplot as plt
>
> # Constants to control the plotting.
> C=3 # Number of curves to plot.
> P=1000 # Number of points overall.
> R=2 # Scaling constant to use.
> N=25 # Number of points in a curve segment.
> M=P/N
>
> # Array of points.
> x=empty((3,P))
> rgb=empty((3))
>
> # Plot C curves.
> for i in xrange(0,C):
> # Initial point.
> x0=random.randn(3)
>
> # Plot a curve using a random bivector in R_{5,0}
> # with appropriate scaling.
> w=random.randn(3) * 2*pi*R/P
>
> # Use a new figure for each curve.
> fig=plt.figure(figsize=(15,12))
> # ax=Axes3D(fig)
> ax = fig.gca(projection='3d')
> plt.show()
>
> # Coordinate limits to determine the colour of the first curve segment.
> minx=array([-x0[0],x0[1],-x0[2]])
> maxx=minx.copy()
>
> # Split the curve into M segments, each with an appropriate colour.
> for j in range(0,M):
>
> # Find N points forming a curve segment by
> # exponentiating w*k for k from j*N to (j+1)*N-1.
> abot=j*N
> atop=abot+N
> for k in xrange(abot,atop):
> for h in range(0,3):
> x[h,k]=x0[h]+cos(w[h]*k)
>
> # Determine the colour of the curve segment.
> amid=floor((abot+atop)/2)
> for h in range(0,3):
> sign=(-1)**(h+1)
> minx[h]=min(minx[h],min(sign*x[h,abot:atop]))
> maxx[h]=max(maxx[h],max(sign*x[h,abot:atop]))
> rgb[h]=max(0.0,min((sign*x[h,amid]-minx[h])/(maxx[h]-minx[h]),1.0))
>
> # Plot the curve segment using the chosen colour.
> alow=(abot-1 if j>0 else abot)
> ax.plot(x[0,alow:atop],x[1,alow:atop],x[2,alow:atop],c=rgb.tolist())
> plt.draw()
> plt.show()
>
>
Paul,
As formatted, the code would not run. I presume that everything after "for
j in range(0,M):" should be indented? When I did that and ran it in
ipython, I could not reproduce your problem. What version of matplotlib are
you running?
Ben Root
|
|
From: Benjamin R. <ben...@ou...> - 2011-02-08 15:47:51
|
On Tue, Feb 8, 2011 at 8:27 AM, Massimo Di Stefano <mas...@gm... > wrote: > Hi Benjamin, > > have you reied the mat file ? > > i treid using a simple python array in a 2d plot and i'm having the same > behavioure > the x,y coordinates are displayed ok when the mouse roll over the graph > but they are wrong in the axis labels. > > > Massimo, Perhaps you missed my previous email, so I will explain what I have found so far. First, in the 3d plots, the axes labels appear "wrong" because the offset label is missing. Offset labeling for 3d plots is a new feature that hasn't been released yet. However, if you do a pcolor() of the data on a 2D plot, you will see similar axes labels, but with the addition of the offset labels (the -7.025e1 and +4.259e1 in the attached plot). This means that all the labels should have that offset added to it to get the actual axis value. This is a way to save space. The reason for the offset labels to occur in the first place is that the range of axis values is so small, that it would take too much space to label each tick to the appropriate precision. Therefore, in order to display your plot sufficiently, you will need to take control of the tickers and the tick formatters. The API documentation can be found here: http://matplotlib.sourceforge.net/api/ticker_api.html There are a couple of examples of how to use tickers here: http://matplotlib.sourceforge.net/examples/pylab_examples/custom_ticker1.html http://matplotlib.sourceforge.net/examples/pylab_examples/centered_ticklabels.html There are others, but that's what I noticed from a quick look at http://matplotlib.sourceforge.net/examples/index.html I hope this helps! Ben Root |
|
From: Philippe B. <pba...@gm...> - 2011-02-08 15:44:11
|
Le Tue, 08 Feb 2011 09:14:22 -0500, Michael Droettboom <md...@st...> a écrit : > I have seen this problem when matplotlib wasn't fully rebuilt after > upgrading Numpy. I would assume, since you're installing from Gentoo > packages, that the package manager is smart enough to blitz the > matplotlib build products before rebuilding, but maybe not. (Python > distutils doesn't do proper dependency resolution.) Have you tried > removing the "build" directory from the matplotlib tree before > rebuilding? > > Mike > > On 02/08/2011 07:56 AM, Philippe Baucour wrote: > > hello, > > I get a segmentation fault with the pylab mode and I made several > > test to track down a bug but it's beyond my level and I still don't > > now if it's an ipython bug or matplotlib bug ... > > > > let's reproduce the bug !!!! > > ________________ > > ____/ try 1 Qt4Agg \_____ > > > > phil@Numokh ~ % ipython -pylab > > In [1]: plt.plot([4]) > > segmentation fault ipython -pylab > > > > By default I have Qt4Agg as backend but it doesn't work with all > > backends > > > > _______________ > > ____/ try 2 TkAgg \_____ > > > > phil@Numokh ~ % ipython -pylab > > > > In [1]: plt.rcParams['backend']='TkAgg' > > > > In [2]: plt.get_backend() > > Out[2]: 'TkAgg' > > > > In [3]: plt.plot([4]) > > segmentation fault ipython -pylab > > > > > > ____________________________ > > ____/ try 3 Qt4Agg + backtrace \_____ > > > > > > I made a backtrace with gdb > > phil@Numokh ~ % gdb python > > GNU gdb (Gentoo 7.2 p1) 7.2 > > Copyright (C) 2010 Free Software Foundation, Inc. > > License GPLv3+: GNU GPL version 3 or later > > <http://gnu.org/licenses/gpl.html> This is free software: you are > > free to change and redistribute it. There is NO WARRANTY, to the > > extent permitted by law. Type "show copying" and "show warranty" > > for details. This GDB was configured as "x86_64-pc-linux-gnu". > > For bug reporting instructions, please see: > > <http://bugs.gentoo.org/>... > > Reading symbols from /usr/bin/python...(no debugging symbols > > found)...done. (gdb) r /usr/bin/ipython -pylab > > Starting program: /usr/bin/python /usr/bin/ipython -pylab > > process 4149 is executing new program: /usr/bin/python2.7 > > [Thread debugging using libthread_db enabled] > > process 4149 is executing new program: /usr/bin/python2.7 > > [Thread debugging using libthread_db enabled] > > > > In [1]: plt.plot([4]) > > > > Program received signal SIGSEGV, Segmentation fault. > > 0x00007fffe82d5ce7 in __cxa_allocate_exception () > > from /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.4/libstdc++.so.6 > > (gdb) bt > > #0 0x00007fffe82d5ce7 in __cxa_allocate_exception () > > from /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.4/libstdc++.so.6 > > #1 0x00007fffe4d1f8a4 in py_to_agg_transformation_matrix(_object*, > > bool) () from /usr/lib64/python2.7/site-packages/matplotlib/_path.so > > #2 0x00007fffe4d2a42b in > > _path_module::update_path_extents(Py::Tuple const&) () > > from /usr/lib64/python2.7/site-packages/matplotlib/_path.so #3 > > 0x00007fffe4d31108 in > > Py::ExtensionModule<_path_module>::invoke_method_varargs(void*, > > Py::Tuple const&) () > > from /usr/lib64/python2.7/site-packages/matplotlib/_path.so #4 > > 0x00007fffe4d1acbd in method_varargs_call_handler () > > from /usr/lib64/python2.7/site-packages/matplotlib/_path.so #5 > > 0x00007ffff7b09263 in PyEval_EvalFrameEx () > > from /usr/lib/libpython2.7.so.1.0 #6 0x00007ffff7b0ab50 in > > PyEval_EvalCodeEx () from /usr/lib/libpython2.7.so.1.0 #7 > > 0x00007ffff7b09337 in PyEval_EvalFrameEx () > > from /usr/lib/libpython2.7.so.1.0 #8 0x00007ffff7b0ab50 in > > PyEval_EvalCodeEx () from /usr/lib/libpython2.7.so.1.0 #9 > > 0x00007ffff7b09337 in PyEval_EvalFrameEx () > > from /usr/lib/libpython2.7.so.1.0 #10 0x00007ffff7b0ab50 in > > PyEval_EvalCodeEx () from /usr/lib/libpython2.7.so.1.0 > > ---Type<return> to continue, or q<return> to quit--- > > #11 0x00007ffff7b09337 in PyEval_EvalFrameEx () > > from /usr/lib/libpython2.7.so.1.0 > > #12 0x00007ffff7b0ab50 in PyEval_EvalCodeEx () > > from /usr/lib/libpython2.7.so.1.0 > > #13 0x00007ffff7a95f26 in ?? () from /usr/lib/libpython2.7.so.1.0 > > #14 0x00007ffff7a6d542 in PyObject_Call () > > from /usr/lib/libpython2.7.so.1.0 #15 0x00007ffff7b07a27 in > > PyEval_EvalFrameEx () from /usr/lib/libpython2.7.so.1.0 > > #16 0x00007ffff7b0ab50 in PyEval_EvalCodeEx () > > from /usr/lib/libpython2.7.so.1.0 > > #17 0x00007ffff7b09337 in PyEval_EvalFrameEx () > > from /usr/lib/libpython2.7.so.1.0 > > #18 0x00007ffff7b0ab50 in PyEval_EvalCodeEx () > > from /usr/lib/libpython2.7.so.1.0 > > #19 0x00007ffff7b0ac62 in PyEval_EvalCode () > > from /usr/lib/libpython2.7.so.1.0 #20 0x00007ffff7b0a155 in > > PyEval_EvalFrameEx () from /usr/lib/libpython2.7.so.1.0 > > #21 0x00007ffff7b0ab50 in PyEval_EvalCodeEx () > > from /usr/lib/libpython2.7.so.1.0 > > #22 0x00007ffff7b09337 in PyEval_EvalFrameEx () > > from /usr/lib/libpython2.7.so.1.0 > > #23 0x00007ffff7b0ab50 in PyEval_EvalCodeEx () > > from /usr/lib/libpython2.7.so.1.0 > > ---Type<return> to continue, or q<return> to quit--- > > #24 0x00007ffff7b09337 in PyEval_EvalFrameEx () > > from /usr/lib/libpython2.7.so.1.0 > > #25 0x00007ffff7b09464 in PyEval_EvalFrameEx () > > from /usr/lib/libpython2.7.so.1.0 > > #26 0x00007ffff7b0ab50 in PyEval_EvalCodeEx () > > from /usr/lib/libpython2.7.so.1.0 > > #27 0x00007ffff7b09337 in PyEval_EvalFrameEx () > > from /usr/lib/libpython2.7.so.1.0 > > #28 0x00007ffff7b0ab50 in PyEval_EvalCodeEx () > > from /usr/lib/libpython2.7.so.1.0 > > #29 0x00007ffff7b09337 in PyEval_EvalFrameEx () > > from /usr/lib/libpython2.7.so.1.0 > > #30 0x00007ffff7b0ab50 in PyEval_EvalCodeEx () > > from /usr/lib/libpython2.7.so.1.0 > > #31 0x00007ffff7b09337 in PyEval_EvalFrameEx () > > from /usr/lib/libpython2.7.so.1.0 > > #32 0x00007ffff7b0ab50 in PyEval_EvalCodeEx () > > from /usr/lib/libpython2.7.so.1.0 > > #33 0x00007ffff7b0ac62 in PyEval_EvalCode () > > from /usr/lib/libpython2.7.so.1.0 #34 0x00007ffff7b24e8c in ?? () > > from /usr/lib/libpython2.7.so.1.0 #35 0x00007ffff7b24f62 in > > PyRun_FileExFlags () from /usr/lib/libpython2.7.so.1.0 > > #36 0x00007ffff7b2649c in PyRun_SimpleFileExFlags () > > ---Type<return> to continue, or q<return> to quit--- > > from /usr/lib/libpython2.7.so.1.0 > > #37 0x00007ffff7b37619 in Py_Main () > > from /usr/lib/libpython2.7.so.1.0 #38 0x00007ffff74cebbd in > > __libc_start_main () from /lib/libc.so.6 #39 0x00000000004008c9 in > > _start () > > > > ___________________________ > > ____/ try 4 Qt4Agg + q4thread \_____ > > > > With a ipython -pylab -q4thread > > everything seems to work except the autoindent feature > > > > > > ___________________ > > ____/ try 5 python -i \_____ > > > > with python -i no pb at all > > > > phil@Numokh ~ % python -i > > Python 2.7.1 (r271:86832, Feb 8 2011, 00:36:24) > > [GCC 4.4.4] on linux2 > > Type "help", "copyright", "credits" or "license" for more > > information. > >>>> from pylab import * > >>>> plot([4]) > >>>> > > [<matplotlib.lines.Line2D object at 0x17c0ed0>] > > > >>>> show() > >>>> > >>>> > > _____________________ > > ____/ try 6 ipython git \_____ > > > > I tried with ipython from git > > phil@Numokh ipython % python ipython.py --pylab > > Python 2.7.1 (r271:86832, Feb 8 2011, 00:36:24) > > Type "copyright", "credits" or "license" for more information. > > > > IPython 0.11.dev -- An enhanced Interactive Python. > > ? -> Introduction and overview of IPython's features. > > %quickref -> Quick reference. > > help -> Python's own help system. > > object? -> Details about 'object', use 'object??' for extra > > details. > > > > Welcome to pylab, a matplotlib-based Python environment [backend: > > Qt4Agg]. For more information, type 'help(pylab)'. > > > > In [1]: plot([4]) > > Out[1]: [<matplotlib.lines.Line2D object at 0x1f8e5d0>] > > > > but in this case I have issues with unicode pb ... > > In [2]: xlabel('température') > > UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in > > position 12: ordinal not in range(128) > > > > > > _________ > > ____/ specs \_____ > > > > here is my python package : > > - dev-lang/python-2.7.1 > > - dev-python/numpy-1.5.1 > > - sci-libs/scipy-0.8.1 > > - dev-python/matplotlib-1.0.1 (with the USEFLAGS cairo examples > > excel gtk latex qt4 tk traits wxwidgets -doc -fltk) > > - dev-python/ipython-0.10.1 (with the USEFLAGS doc examples readline > > smp wxwidgets -emacs -gnuplot -test) > > > > > > At this point I'm lost !!! any idea > > > > Philippe Baucour > > > > > > ------------------------------------------------------------------------------ > > The ultimate all-in-one performance toolkit: Intel(R) Parallel > > Studio XE: Pinpoint memory and threading errors before they happen. > > Find and fix more than 250 security defects in the development > > cycle. Locate bottlenecks in serial and parallel code that limit > > performance. http://p.sf.net/sfu/intel-dev2devfeb > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > I removed the package emerge -C matplotlib and purge rm -rf /usr/lib64/python2.7/site-packages/matpl* rm -rf /etc/matplotlib/ rm -rf /usr/lib64/python2.7/site-packages/pylab* rm -rf /var/cache/tmp/portage reinstall matplotlib emerge -av matplotlib and still the same result !!!! -- Philippe Baucour |
|
From: Massimo Di S. <mas...@gm...> - 2011-02-08 15:36:09
|
hello All have you never tried to embed a matplotlib 3d graph inside pyqt ? i'm tring to do it .. but i've problenms to refresh my plot. The 3d data are displayed ok inside a pyqt simple widget, but if i try to redraw the image (re-call the on_draw function) ... i have it overlay the previouse one. If i add "clear()" at begin of my "on_draw" action, the plot is update correctly ... and each "on_draw" action give me the correct results ... but then i'm no more able to move the 3d plot view (but i can only zoom in/out the scene) the code i'm using is : http://paste.debian.net/106890 at line 22 there is a "def erase(self):" function if i connect it to the plot i have the image is correctly redraw .. but then i lost the 3d actions can you give it a try ? seems thast the "clear()" action broke something ... thanks a lot for any help to try it .. i've upload the .mat file (just few kbytes) it is available at : http://www.geofemengineering.it/data/complexity_depth_grid1.mat Thank you! Massimo. |
|
From: Benjamin R. <ben...@ou...> - 2011-02-08 15:22:47
|
On Tue, Feb 8, 2011 at 7:50 AM, sanders <sa...@kn...> wrote: > I realize that I have not been clear enough. > > I have already created a legend instance in my_own_plot_function, for > example, a legend with one column by default: > > fig = plt.figure() > ax = fig.add_subplot(111) > my_own_plot_function(ax, data) # gives, for example, one column legend > by default > > So ax is an axes instance containing the legend. > > Incidentally, after inspecting the automatically created plots, I want a > particular figure to have a two column legend. I would like to do this > without adding an extra kwarg for the number of columns to > my_own_plot_function. It should be possible to do something like this: > > > legend = ax.get_legend() > *legend.set_ncol(2)* # something like this > > Once again, thanks for any help! > > Bram > > > > On 02/08/2011 12:35 PM, Thomas Lecocq wrote: > > Bram, > > > fig = plt.figure() > ax = fig.add_subplot(111) > plot1 = plot.plot(X,Y,label='1') > plot2 = plot.plot(X,Y,label='2') > ... > plotN = plot.plot(X,Y,label='N') > > legend = plt.legend(ncol=2) > > should work... > > so, for your "own_plot_function", you have to return the legend and set it > accordingly... > > Thomas > > > > ********************** > Thomas Lecocq > Geologist > Ph.D.Student (Seismology) > Royal Observatory of Belgium > ********************** > > > > ------------------------------ > Date: Tue, 8 Feb 2011 11:25:58 +0100 > From: sa...@kn... > To: mat...@li... > Subject: [Matplotlib-users] set ncol for legend > > Hi, > > I want to update the number of columns in my legend. How should I do that? > > I'm looking for something like: > > fig = plt.figure() > ax = fig.add_subplot(111) > my_own_plot_function(ax, data) # gives, for example, one column legend > by default > legend = ax.get_legend() > *legend.set_ncol(2)* # something like this > > > However, *ncol* is not in the legend.properties() list for properties to > be set through legend.set. > > > Thanks for any help, > Bram > > > Bram, As a point of style (and something I got myself caught in when I first started using matplotlib), it is not a good idea to create a single plotting function that does everything. In some of my original programs using matplotlib, I would create large functions that would plot not only a radar image, the county map, rivers and roads, but would also produce the colorbar and label the axes and put out a title for the plot. While this seemed like a good idea at the time because I was able to produce the one kind of image I wanted, this then became a problem when I needed plots that did not have a colorbar, or a title, or something else. So, while it is often nice to have a convenience function that can produce a particular style plot for you in a single call, it is still a good idea to break up that call into smaller methods that handle parts of the plot. So, when you need a plot that has a 2-column legend as opposed to one, you can still do the regular plot, but then call plt.legend(ncols=2), or anything else for that matter. I hope this helps! Ben Root |
|
From: Benjamin R. <ben...@ou...> - 2011-02-08 15:13:56
|
On Tue, Feb 8, 2011 at 6:53 AM, Curiouslearn <cur...@gm...> wrote:
> Hello,
>
> Matplotlib is so cool. I wish I had spent time learning it earlier.
> Better late than never. Thanks so much to all who have worked on
> developing it.
>
> I had a question on histograms. Instead of the bars in case of
> histograms, is there a way to get circle markers, where each marker
> represents one observation in that bin. For example, if there are 5
> observations in a bin, then instead of a bar of height 5, I want 5
> circles stacked on top of each other. The same for other bins. Is
> there a built-in command or property to do this?
>
> Thanks for your help.
>
>
Not exactly, but you could use numpy's histogram() function to get the
appropriate data and then plot the circles yourself using scatter():
hist, bins = np.histogram(data, bins=20)
fig = plt.figure()
ax = fig.gca()
for left, right, cnt in zip(bins[:-1], bins[1:], hist) :
x = [(left + right) / 2.0] * cnt
y = np.arange(cnt) + 0.5
ax.scatter(x, y, s=np.pi)
plt.show()
You will have to adjust the value of s in the call to scatter to get the
desired result. The units of s is points^2. Note that this wouldn't
necessarially "stack" the circles, and zooming in/out of the figure will not
change the size of the scatter points. To get more precise control of the
circles, you could look into creating the circle patches yourself:
http://matplotlib.sourceforge.net/api/artist_api.html?highlight=circle#matplotlib.patches.Circle
I hope this gets you started!
Ben Root
|
|
From: Massimo Di S. <mas...@gm...> - 2011-02-08 14:28:06
|
Hi Benjamin, have you reied the mat file ? i treid using a simple python array in a 2d plot and i'm having the same behavioure the x,y coordinates are displayed ok when the mouse roll over the graph but they are wrong in the axis labels. Il giorno 05/feb/2011, alle ore 09.23, Massimo Di Stefano ha scritto: > Hi Benjamin, > > The mat file is : > > <complexity_depth_grid1.mat> > > few kbyte :-) > > > thnaks! > > Massimo > > > > Il giorno 04/feb/2011, alle ore 19.41, Benjamin Root ha scritto: > >> On Friday, February 4, 2011, Massimo Di Stefano >> <mas...@gm...> wrote: >>> Hello All, >>> >>> >>> i'm plotting a 3d colored surface using a 4D array that comes from a .mat file >>> using this code : >>> >>> >>> import scipy.io as sio >>> import pylab as p >>> import mpl_toolkits.mplot3d.axes3d as p3 >>> >>> def loadmatfile(matfile): >>> matdata = sio.loadmat(matfile) >>> return matdata >>> >>> >>> def plot3dcolor(matfile): >>> data = loadmatfile(matfile) >>> x = data['X_depth'] >>> y = data['Y_depth'] >>> z = -data['Z_depth'] >>> c = data['Z_compl'] >>> fig=p.figure() >>> ax = p3.Axes3D(fig) >>> cmap = p.get_cmap('jet') >>> norm = p.Normalize(c.min(), c.max()) >>> colors = cmap(norm(c)) >>> ax.plot_surface(x, y, z, rstride=10, cstride=10, facecolors=colors) >>> ax.set_xlabel('X') >>> ax.set_ylabel('Y') >>> ax.set_zlabel('Z') >>> print x,y >>> p.show() >>> >>> >>> matfile = '/Users/epy/Desktop/complexity_depth_grid1.mat' >>> plot3dcolor(matfile) >>> >>> >>> >>> the results is nice : >>> >>> http://img831.imageshack.us/f/schermata20110204a14542.png/ >>> >>> >>> but as you can see, the mouse cursor shows me the x,y values (they are longitude and latitude) >>> but on the axis i have them starting from 0 ... >>> >>> how can i change the axis to display the lon-lat coordinates ? >>> >>> >>> thanks a lot for any help! >>> >>> Massimo. >>> >>> >> >> I suspect what is happening is that the axes label numbers are right, >> but is not showing the offset information. The display of offset data >> in a 3d plot is a new feature that exists only in the development >> branch. >> >> To confirm this, could you send me your may file (if it is small) so >> that I can try out your script? >> >> Ben Root > |