SourceForge logo
SourceForge logo
Menu

matplotlib-users — Discussion related to using matplotlib

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
(3)
3
(5)
4
(7)
5
(18)
6
(4)
7
(15)
8
(7)
9
(10)
10
(4)
11
(18)
12
(15)
13
(11)
14
(11)
15
(4)
16
(28)
17
(17)
18
(22)
19
(12)
20
(19)
21
(17)
22
(14)
23
(4)
24
(3)
25
(6)
26
(8)
27
(13)
28
(11)
29
(21)
30
(3)
31
(5)






Showing 6 results of 6

From: Allan N. E. <all...@gm...> - 2006年12月25日 18:00:54
Has anyone tried freezing matplotlib embedded in a wx app (using py2ece,
cx_freeze or pyinstaller)? The setup.py in the FAQ seems to be outdated. I
want to freeze the embedding_in_wx.py in the examples. Do you have any
suggestions or cookbook steps that I can follow?
From: <shu...@16...> - 2006年12月25日 06:46:06
> contourf is not drawing in raster mode--it is generating filled=20
> polygons. What you are seeing is the fact that when it follows the edge=
=20
> of a masked region, it does so in a stairstep fashion. This is inherent=
=20
> in the algorithm being used.
it seems that the filled polygon is composed of a set of points in some
a contour and some points in the 'drawn' edge which offsets with the
real edge of a masked region.=20
> I have thought a little bit about ways of=20
> making it at least take a diagonal path when reasonable so as to reduce=
=20
> the jaggy effect. I am not at all sure it would be worth the trouble,=20
> though--I expect it would be a lot of work for only a little gain.
I do think that matplotlib can do a very good job now. the same time i
think it's valuable to take some time to work out this little flaw.
maybe there're some tricky methods.
1) make a contourf plot on the whole rectangle mesh with no mask.
2) make a mask picture of the same size with the contourf plot. black in
mask ploygon and white outside.
3) do AND operation on contourf plot and the mask picture and outside
the mask polygon will be clipped.
x,y is axes array.
z is mesh grid data array.
zz is mesh grid data array with mask.
p is polygon for the edge.
cs=3Dcontourf(x,y,z) ----> contourf plot,identifies A.=20
cs2=3Dcontour(x,y,zz) =20
clabel(cs2,....) --> label at the right position inside the mask polygon.
draw_polygon(p,fillcolor=3Dblack) --> make a mask picture of the same
 size with A,identifies B.
A and B drawing. ---> it seems that cairo and agg can do this.
 i don't know how to do in matplotlib.but i'm
 sure some functions work for it.
there's no need to change the mask array when we zoom the picture now
because the mask picture is redrawn dynamicaly and 'vectorly'
=2E
>=20
> To get around this you may want to use some interpolation/extrapolation=
=20
> to extend your data one grid point into the masked region, then contour=
=20
> with the reduced masked region, then plot your own filled polygon on top=
=20
> of the contour plot to define the masked region more precisely to your=20
> taste.
yes,filled contour map with smooth edge can be drawn with a more high
resolution mask array given.it's not a hard job.However,there's some
disadvantages in this way.firstly,mask array will have much larger size
than before and x,y arrays will be enlarged.these steps should be
repeated every time we wanna zoom the picture.
> Yes, I agree that this is a pain, and that the present contour/contourf=
=20
> routine is not ideal (although it is very clever and I suspect very=20
> fast). If you can find a better filled contour routine with a BSD-style=
=20
> license, or even a clear and complete description of a superior=20
> algorithm that could be implemented without running into copyright or=20
> patent problems, please point it out to us.
>=20
> There is one interesting difference between the algorithm we use (taken=
=20
> from the gist package) and the one used by Matlab: ours generates=20
> polygons that enclose only a given level--polygons do not=20
> overlap--whereas Matlab's generates polygons that stack. As a result,=20
> ours is suitable for use with alpha blending, whereas Matlab's is not=20
> (last time I looked, anyway).
> Eric
would you like to add some more interpolation algorithm such as kriging
ect.to matplotlib? there are many interpolation source codes in public.
shu
--=20
 <>
From: Pierre GM <pgm...@gm...> - 2006年12月25日 06:43:12
On Monday 25 December 2006 01:30, Eric Firing wrote:
> I don't think so--at least, I have not figured it out after a few
> minutes of looking around and trying to understand how things work. I
> think polar plotting needs quite a bit of work. 
Sorry for hijacking the thread, but a few months ago I suggested the 
possibility to subclass Subplot. I have a small 
function, 'add_generic_subplot', which just implements this possibility. 
Would anybody be interested ? In that case, a Polarplot would just be a 
particular subclass of Subplot. If there's some heavy cleaning to be done on 
Polar, it might be worth to consider subclassing.
[I realize this was quite a useless post... Sorry again]
From: Eric F. <ef...@ha...> - 2006年12月25日 06:30:40
Miles Lubin wrote:
> Solved the problems, thanks.
> 
> 
> Another issue has come up. After looking through 
> http://matplotlib.sourceforge.net/matplotlib.axes.html#PolarAxes, I see 
> a get_rmax() function, but there is no corresponding set_rmax(). Using 
> set_ylim() causes hanging when it attempts to graph, and set_xlim is 
> currently unimplemented. Is there a simple way to set rmax?
I don't think so--at least, I have not figured it out after a few 
minutes of looking around and trying to understand how things work. I 
think polar plotting needs quite a bit of work. In particular, I 
suspect the lack of a "set_rmax" method is not an oversight but a 
consequence of limitations in the present implementation. I will look at 
it some more and see if I can improve it. This might be long-term, not 
quick.
Eric
> 
> Thanks,
> 
> Miles
> 
> **
> 
> 
> Eric Firing wrote:
> 
>>
>> polar(theta, r)
>> gca().set_thetagrids([])
>>
>>
>> If they are all the same kind of points--all markers, for 
>> example--then I would expect the rendering order to be the plot 
>> command order, because each plot command adds a line to a list of 
>> lines to be rendered. You can control the level using the zorder 
>> attribute.
>>
>> lines = polar(theta, r, zorder=2.5)
>>
>> or
>>
>> lines = polar(theta, r, theta2, r2)
>> zo = lines[0].get_zorder()
>> lines[0].set_zorder(zo+0.1)
>>
>>
>> Eric
>>
>>
>>
> 
From: Miles L. <mi...@lu...> - 2006年12月25日 05:21:19
Solved the problems, thanks.
Another issue has come up. After looking through 
http://matplotlib.sourceforge.net/matplotlib.axes.html#PolarAxes, I see 
a get_rmax() function, but there is no corresponding set_rmax(). Using 
set_ylim() causes hanging when it attempts to graph, and set_xlim is 
currently unimplemented. Is there a simple way to set rmax?
Thanks,
Miles
**
Eric Firing wrote:
>
> polar(theta, r)
> gca().set_thetagrids([])
>
>
> If they are all the same kind of points--all markers, for 
> example--then I would expect the rendering order to be the plot 
> command order, because each plot command adds a line to a list of 
> lines to be rendered. You can control the level using the zorder 
> attribute.
>
> lines = polar(theta, r, zorder=2.5)
>
> or
>
> lines = polar(theta, r, theta2, r2)
> zo = lines[0].get_zorder()
> lines[0].set_zorder(zo+0.1)
>
>
> Eric
>
>
>
From: Eric F. <ef...@ha...> - 2006年12月25日 00:08:18
Miles Lubin wrote:
> Hi,
> 
> 
> I would like to be able to remove the dotted straight lines on the polar 
> axes, but keep the dotted circular lines (not sure of the technical 
> names, sorry). I also want to remove the degree measurement labels since 
> they are not meaningful for the data that I am displaying.
> 
> How would I go about doing this?
polar(theta, r)
gca().set_thetagrids([])
> 
> 
> Also, is there any reason why certain points would be behind (i.e. 
> covered by) points that were plotted before them?
> 
If they are all the same kind of points--all markers, for example--then 
I would expect the rendering order to be the plot command order, because 
each plot command adds a line to a list of lines to be rendered. You 
can control the level using the zorder attribute.
lines = polar(theta, r, zorder=2.5)
or
lines = polar(theta, r, theta2, r2)
zo = lines[0].get_zorder()
lines[0].set_zorder(zo+0.1)
Eric
> 
> Thanks,
> 
> Miles
> 
> 
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Showing 6 results of 6

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /