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





Showing 25 results of 25

From: Tony S Yu <to...@MI...> - 2008年06月17日 23:19:13
On Jun 15, 2008, at 11:54 AM, Curtis Jensen wrote:
> There was recently a post on Radar/Spider plotting
> (http://sourceforge.net/mailarchive/message.php?msg_id=4845303A.9050204%40epcc.ed.ac.uk 
> ).
> I too am interested in creating Radar plots with matplot. Is there a
> simple way to do this?
Here's a hack to get part of what you want:
=====
from matplotlib.projections.polar import PolarAxes
from pylab import *
# Create 6 points (plus 7th point that matches the first) with 
coordinates r, theta
N = 6
theta = 2 * pi * linspace(0, 1, N+1)
r = rand(N+1)
r[N] = r[0]
# HACK: force PolarAxes to use 1 line segment to connect specified 
points
PolarAxes.RESOLUTION = 1
ax = subplot(111, polar=True)
c = ax.plot(theta, r, 'r-o')
show()
=====
I think this only works on matplotlib 0.98. I tried using rgrids and 
thetagrids to change the labels, but for some reason I was getting a 
TypeError when I called either of those functions.
-Tony
From: Peter W. <pw...@en...> - 2008年06月17日 22:36:24
On Jun 17, 2008, at 9:42 AM, Bryan Fodness wrote:
> Has anyone had a problem posting to either of these mailing lists. 
> I am a member and have sent a few posts to each of them over the 
> last couple months, but none of them show up in the list. I always 
> receive a 'awaiting moderator approval' email. I have sent an email 
> to the owner about this, but have not received a response.
> Bryan
Hi Bryan,
Are you subscribed to those lists? I just searched the membership 
list and did not see your email address.
Non-subscribers get the "awaiting moderator approval" message, but 
since we get so inundated with spam, none of the admins really go 
through the "pending approval" queue...
-Peter
From: Jörgen S. <jor...@bo...> - 2008年06月17日 20:26:23
John Hunter skrev:
> On Tue, Jun 17, 2008 at 3:00 PM, Jörgen Stenarson
> <jor...@bo...> wrote:
> 
>> I did a svn up and a clean rebuild but still the same error. The error
>> reminded me of the problems a while back when references to the
>> fontfiles were not released. So I have tried to look at the filehandles
>> using procexp but I cannot say if this is the problem, but I don't see
>> any explosion in open file handles. But the crash is so sudden I may not
>> be able to see this.
>>
>> Any thing else I can check at my end?
> 
> I wonder if the reference counting in py_as_array is wrong. The most
> likely culprit is the new function in src/ft2font.cpp. Do we need an
> incref here? Joergen, does it help to comment out
> the PyArray_SimpleNewFromData line and replace it with the commented
> out block below it? I need to dig into the ownership and reference
> policy of these two funcs but I don't have time to do it now.
> 
I tried this but it still crashes. Below is the change I did.
/Jörgen
Py::Object
FT2Image::py_as_array(const Py::Tuple & args) {
 _VERBOSE("FT2Image::as_array");
 args.verify_length(0);
 npy_intp dimensions[2];
 dimensions[0] = get_height(); //numrows
 dimensions[1] = get_width(); //numcols
 /*
 PyArrayObject *A = (PyArrayObject *) PyArray_SimpleNewFromData(2, 
dimensions, PyArray_UBYTE, _buffer);
 */
 PyArrayObject *A = (PyArrayObject *) PyArray_FromDims(2, dimensions, 
PyArray_UBYTE);
 unsigned char *src		= _buffer;
 unsigned char *src_end	= src + (dimensions[0] * dimensions[1]);
 unsigned char *dst		= (unsigned char *)A->data;
 while (src != src_end) {
 *dst++ = *src++;
 }
 return Py::asObject((PyObject*)A);
}
From: John H. <jd...@gm...> - 2008年06月17日 20:07:48
On Tue, Jun 17, 2008 at 3:00 PM, Jörgen Stenarson
<jor...@bo...> wrote:
> I did a svn up and a clean rebuild but still the same error. The error
> reminded me of the problems a while back when references to the
> fontfiles were not released. So I have tried to look at the filehandles
> using procexp but I cannot say if this is the problem, but I don't see
> any explosion in open file handles. But the crash is so sudden I may not
> be able to see this.
>
> Any thing else I can check at my end?
I wonder if the reference counting in py_as_array is wrong. The most
likely culprit is the new function in src/ft2font.cpp. Do we need an
incref here? Joergen, does it help to comment out
the PyArray_SimpleNewFromData line and replace it with the commented
out block below it? I need to dig into the ownership and reference
policy of these two funcs but I don't have time to do it now.
Py::Object
FT2Image::py_as_array(const Py::Tuple & args) {
 _VERBOSE("FT2Image::as_array");
 args.verify_length(0);
 npy_intp dimensions[2];
 dimensions[0] = get_height(); //numrows
 dimensions[1] = get_width(); //numcols
 PyArrayObject *A = (PyArrayObject *) PyArray_SimpleNewFromData(2,
dimensions, PyArray_UBYTE, _buffer);
 /*
 PyArrayObject *A = (PyArrayObject *) PyArray_FromDims(2, dimensions,
PyArray_UBYTE);
 unsigned char *src		= _buffer;
 unsigned char *src_end	= src + (dimensions[0] * dimensions[1]);
 unsigned char *dst		= (unsigned char *)A->data;
 while (src != src_end) {
 *dst++ = *src++;
 }
 */
 return Py::asObject((PyObject*)A);
}
From: Jörgen S. <jor...@bo...> - 2008年06月17日 20:00:46
Michael Droettboom skrev:
> I'm not sure these two issues are related.
> 
I don't think so either but I thought I should mention it anyway.
> Before I look deeper, have you updated from SVN today? I fixed a bug 
> earlier today related to using the STIX fonts (which appears to be where 
> this is crashing) on narrow Unicode Python interpreters (which I believe 
> Win32 Python is).
> 
> Occasionally I get these ob_refcnt assertions when distutils didn't 
> decide to rebuild enough things. Try doing a clean rebuild (if you 
> haven't already).
> 
> Cheers,
> Mike
> 
I did a svn up and a clean rebuild but still the same error. The error 
reminded me of the problems a while back when references to the 
fontfiles were not released. So I have tried to look at the filehandles 
using procexp but I cannot say if this is the problem, but I don't see 
any explosion in open file handles. But the crash is so sudden I may not 
be able to see this.
Any thing else I can check at my end?
/Jörgen
From: Michael D. <md...@st...> - 2008年06月17日 18:57:28
I'm not sure these two issues are related.
Before I look deeper, have you updated from SVN today? I fixed a bug 
earlier today related to using the STIX fonts (which appears to be where 
this is crashing) on narrow Unicode Python interpreters (which I believe 
Win32 Python is).
Occasionally I get these ob_refcnt assertions when distutils didn't 
decide to rebuild enough things. Try doing a clean rebuild (if you 
haven't already).
Cheers,
Mike
Jörgen Stenarson wrote:
> Hi,
>
> I have tried to build the docs of current trunk on windows using 
> python2.5. But I get a crash with an Assertion failed: ob_refcnt == 0, 
> file CXX\cxx_extensions.cxx, line 1128
>
> There are also some warnings caused by the use of the link mpl_data. Is 
> it possible to get this link to work on win32?
>
> versions:
> sphinx: 0.3 $Revision: 64324 $
> docutils: 0.5
> matplotlib: 0.98.0 r5583
> numpy: '1.1.0.dev5176'
>
> /Jörgen
>
>
>
> C:\python\external\matplotlib-trunk\doc>make.py
> Sphinx v0.3, building html
> trying to load pickled env... not found
> building [html]: targets for 42 source files that are out of date
> updating environment: 42 added, 0 changed, 0 removed
> reading... api/artist_api api/axes_api api/axis_api 
> api/backend_bases_api api/ba
> ckend_gtkagg_api api/backend_qt4agg_api api/backend_wxagg_api 
> api/cbook_api api/
> cm_api api/collections_api api/colorbar_api api/index 
> api/index_backend_api api/
> matplotlib_configuration_api api/pyplot_api devel/add_new_projection 
> devel/codin
> g_guide devel/documenting_mpl devel/index devel/outline 
> devel/transformations fa
> q/environment_variables_faq faq/howto_faq faq/index faq/installing_faq 
> faq/troub
> leshooting_faq glossary/index index users/annotations already have 
> pyplots\a
> nnotation_basic.py
> already have pyplots\annotation_polar.py
> users/arraydata users/artists already have 
> pyplots\fig_axes_labels_simple.py
>
> already have pyplots\fig_x.py
> already have pyplots\fig_axes_customize_simple.py
> already have pyplots\dollar_ticks.py
> users/customizing users/event_handling users/index users/index_text 
> users/intro
> users/mathtext already have pyplots\pyplot_mathtext.py
> users/navigation_toolbar users/pyplot_tutorial already have 
> pyplots\pyplot_s
> imple.py
> already have pyplots\pyplot_formatstr.py
> already have pyplots\pyplot_three.py
> already have pyplots\pyplot_two_subplots.py
> already have pyplots\pyplot_text.py
> already have pyplots\pyplot_annotate.py
> users/text_intro already have pyplots\text_commands.py
> users/text_props already have pyplots\text_layout.py
> users/usetex already have pyplots\tex_demo.py
> already have pyplots\tex_unicode_demo.py
>
> WARNING: 
> C:\python\external\matplotlib-trunk\doc\api\backend_qt4agg_api.rst:5: (
> WARNING/2) autodoc can't import/find module 
> 'matplotlib.backends.backend_qt4agg'
> , check your spelling and sys.path
> WARNING: 
> C:\python\external\matplotlib-trunk\doc\api\backend_wxagg_api.rst:5: (W
> ARNING/2) autodoc can't import/find module 
> 'matplotlib.backends.backend_wxagg',
> check your spelling and sys.path
> WARNING: C:\python\external\matplotlib-trunk\doc\api\cbook_api.rst:9: 
> (WARNING/2
> ) error while formatting signature for matplotlib.cbook.Xlator: arg is 
> not a Pyt
> hon function
> WARNING: 
> C:\python\external\matplotlib-trunk\doc\users\customizing.rst:66: (WARN
> ING/2) Include file u'../mpl_data/matplotlibrc' not found or reading it 
> failed
> WARNING: 
> C:\python\external\matplotlib-trunk\doc\users\navigation_toolbar.rst:13
> : Image file not readable: mpl_data\images\home.png
> WARNING: 
> C:\python\external\matplotlib-trunk\doc\users\navigation_toolbar.rst:15
> : Image file not readable: mpl_data\images\back.png
> WARNING: 
> C:\python\external\matplotlib-trunk\doc\users\navigation_toolbar.rst:17
> : Image file not readable: mpl_data\images\forward.png
> WARNING: 
> C:\python\external\matplotlib-trunk\doc\users\navigation_toolbar.rst:30
> : Image file not readable: mpl_data\images\move.png
> WARNING: 
> C:\python\external\matplotlib-trunk\doc\users\navigation_toolbar.rst:54
> : Image file not readable: mpl_data\images\zoom_to_rect.png
> WARNING: 
> C:\python\external\matplotlib-trunk\doc\users\navigation_toolbar.rst:65
> : Image file not readable: mpl_data\images\subplots.png
> WARNING: 
> C:\python\external\matplotlib-trunk\doc\users\navigation_toolbar.rst:72
> : Image file not readable: mpl_data\images\filesave.png
> pickling the env... done
> checking consistency...
> WARNING: C:\python\external\matplotlib-trunk\doc\users\arraydata.rst:: 
> document
> isn't included in any toctree
> writing output... api/artist_api api/axes_api api/axis_api 
> api/backend_bases_api
> api/backend_gtkagg_api api/backend_qt4agg_api api/backend_wxagg_api 
> api/cbook_a
> pi api/cm_api api/collections_api api/colorbar_api api/index 
> api/index_backend_a
> pi api/matplotlib_configuration_api api/pyplot_api 
> devel/add_new_projection deve
> l/coding_guide devel/documenting_mpl devel/index devel/outline 
> devel/transformat
> ions faq/environment_variables_faq faq/howto_faq faq/index 
> faq/installing_faq fa
> q/troubleshooting_faq glossary/index index users/annotations 
> users/arraydata use
> rs/artists users/customizing users/event_handling users/index 
> users/index_text u
> sers/intro users/mathtext $\circledR$
> Assertion failed: ob_refcnt == 0, file CXX\cxx_extensions.cxx, line 1128
>
> This application has requested the Runtime to terminate it in an unusual 
> way.
> Please contact the application's support team for more information.
> Building HTML failed.
>
> C:\python\external\matplotlib-trunk\doc>
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> 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: Jörgen S. <jor...@bo...> - 2008年06月17日 18:44:49
Hi,
I have tried to build the docs of current trunk on windows using 
python2.5. But I get a crash with an Assertion failed: ob_refcnt == 0, 
file CXX\cxx_extensions.cxx, line 1128
There are also some warnings caused by the use of the link mpl_data. Is 
it possible to get this link to work on win32?
versions:
sphinx: 0.3 $Revision: 64324 $
docutils: 0.5
matplotlib: 0.98.0 r5583
numpy: '1.1.0.dev5176'
/Jörgen
C:\python\external\matplotlib-trunk\doc>make.py
Sphinx v0.3, building html
trying to load pickled env... not found
building [html]: targets for 42 source files that are out of date
updating environment: 42 added, 0 changed, 0 removed
reading... api/artist_api api/axes_api api/axis_api 
api/backend_bases_api api/ba
ckend_gtkagg_api api/backend_qt4agg_api api/backend_wxagg_api 
api/cbook_api api/
cm_api api/collections_api api/colorbar_api api/index 
api/index_backend_api api/
matplotlib_configuration_api api/pyplot_api devel/add_new_projection 
devel/codin
g_guide devel/documenting_mpl devel/index devel/outline 
devel/transformations fa
q/environment_variables_faq faq/howto_faq faq/index faq/installing_faq 
faq/troub
leshooting_faq glossary/index index users/annotations already have 
pyplots\a
nnotation_basic.py
 already have pyplots\annotation_polar.py
users/arraydata users/artists already have 
pyplots\fig_axes_labels_simple.py
 already have pyplots\fig_x.py
 already have pyplots\fig_axes_customize_simple.py
 already have pyplots\dollar_ticks.py
users/customizing users/event_handling users/index users/index_text 
users/intro
users/mathtext already have pyplots\pyplot_mathtext.py
users/navigation_toolbar users/pyplot_tutorial already have 
pyplots\pyplot_s
imple.py
 already have pyplots\pyplot_formatstr.py
 already have pyplots\pyplot_three.py
 already have pyplots\pyplot_two_subplots.py
 already have pyplots\pyplot_text.py
 already have pyplots\pyplot_annotate.py
users/text_intro already have pyplots\text_commands.py
users/text_props already have pyplots\text_layout.py
users/usetex already have pyplots\tex_demo.py
 already have pyplots\tex_unicode_demo.py
WARNING: 
C:\python\external\matplotlib-trunk\doc\api\backend_qt4agg_api.rst:5: (
WARNING/2) autodoc can't import/find module 
'matplotlib.backends.backend_qt4agg'
, check your spelling and sys.path
WARNING: 
C:\python\external\matplotlib-trunk\doc\api\backend_wxagg_api.rst:5: (W
ARNING/2) autodoc can't import/find module 
'matplotlib.backends.backend_wxagg',
check your spelling and sys.path
WARNING: C:\python\external\matplotlib-trunk\doc\api\cbook_api.rst:9: 
(WARNING/2
) error while formatting signature for matplotlib.cbook.Xlator: arg is 
not a Pyt
hon function
WARNING: 
C:\python\external\matplotlib-trunk\doc\users\customizing.rst:66: (WARN
ING/2) Include file u'../mpl_data/matplotlibrc' not found or reading it 
failed
WARNING: 
C:\python\external\matplotlib-trunk\doc\users\navigation_toolbar.rst:13
: Image file not readable: mpl_data\images\home.png
WARNING: 
C:\python\external\matplotlib-trunk\doc\users\navigation_toolbar.rst:15
: Image file not readable: mpl_data\images\back.png
WARNING: 
C:\python\external\matplotlib-trunk\doc\users\navigation_toolbar.rst:17
: Image file not readable: mpl_data\images\forward.png
WARNING: 
C:\python\external\matplotlib-trunk\doc\users\navigation_toolbar.rst:30
: Image file not readable: mpl_data\images\move.png
WARNING: 
C:\python\external\matplotlib-trunk\doc\users\navigation_toolbar.rst:54
: Image file not readable: mpl_data\images\zoom_to_rect.png
WARNING: 
C:\python\external\matplotlib-trunk\doc\users\navigation_toolbar.rst:65
: Image file not readable: mpl_data\images\subplots.png
WARNING: 
C:\python\external\matplotlib-trunk\doc\users\navigation_toolbar.rst:72
: Image file not readable: mpl_data\images\filesave.png
pickling the env... done
checking consistency...
WARNING: C:\python\external\matplotlib-trunk\doc\users\arraydata.rst:: 
document
isn't included in any toctree
writing output... api/artist_api api/axes_api api/axis_api 
api/backend_bases_api
 api/backend_gtkagg_api api/backend_qt4agg_api api/backend_wxagg_api 
api/cbook_a
pi api/cm_api api/collections_api api/colorbar_api api/index 
api/index_backend_a
pi api/matplotlib_configuration_api api/pyplot_api 
devel/add_new_projection deve
l/coding_guide devel/documenting_mpl devel/index devel/outline 
devel/transformat
ions faq/environment_variables_faq faq/howto_faq faq/index 
faq/installing_faq fa
q/troubleshooting_faq glossary/index index users/annotations 
users/arraydata use
rs/artists users/customizing users/event_handling users/index 
users/index_text u
sers/intro users/mathtext $\circledR$
Assertion failed: ob_refcnt == 0, file CXX\cxx_extensions.cxx, line 1128
This application has requested the Runtime to terminate it in an unusual 
way.
Please contact the application's support team for more information.
Building HTML failed.
C:\python\external\matplotlib-trunk\doc>
From: KURT P. <pet...@ms...> - 2008年06月17日 15:28:28
Where can I find documentation on the new circle collection? And, going 
back to his comment about "real radius", if I add a circle to a matplotlib 
plot (not sure how to do this), how can I ensure the radius is, indeed, in 
meters?
 I have read the scatter documentation, and it says the radius of the 
annotations should be in meters, but that doesn't seem like it's the case.
Regards,
Kurt
------------------------------
Message: 5
Date: 2008年6月16日 23:35:37 -0700 (PDT)
From: sidimok <si...@gm...>
Subject: Re: [Matplotlib-users] Drawing filled circles (discs)
To: mat...@li...
Message-ID: <178...@ta...>
Content-Type: text/plain; charset=us-ascii
 > Or are you effectively doing a scatter plot? Could you use scatter?
 >
 > Eric
 >
Yes, I've already tried doing the trick with a scatter plot, but since the
filling colors correspond to a "physical quantity" and the radius of the
scatters are the "real" circle radius, using RegularPolygons is more
straightforward.
Isn't it better to use "Circle" new collection?
From: sidimok <si...@gm...> - 2008年06月17日 14:59:56
Thank you very much indeed guys, you made my day. =)
-- 
View this message in context: http://www.nabble.com/Circle-Collection-tp17866685p17913009.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Bryan F. <bry...@gm...> - 2008年06月17日 14:42:09
Has anyone had a problem posting to either of these mailing lists. I am a
member and have sent a few posts to each of them over the last couple
months, but none of them show up in the list. I always receive a 'awaiting
moderator approval' email. I have sent an email to the owner about this,
but have not received a response.
Bryan
From: Michael D. <md...@st...> - 2008年06月17日 14:34:34
My e-mail has been kind of sporadic this morning... but we seem to be in 
agreement.
Just realised get_verts could actually be slightly better --
If we use Path.to_polygons() then any curves in the patch will get 
converted to line segments. Then even patches like Ellipse and Arc will 
work and do the expected thing. I've committed this (along with a small 
bugfix to to_polygons).
Cheers,
Mike
John Hunter wrote:
> On Tue, Jun 17, 2008 at 7:34 AM, Michael Droettboom <md...@st...> wrote:
>
> 
>> Now -- for the other developers on this list: We may want to add a
>> .get_verts() function back to patches that does exactly what I recommend
>> above. It won't behave identically to 0.91 since it will return a
>> transformed copy of the vertices, but that won't matter in all cases
>> (such as this one).
>> 
>
> Hmm, we are asking each other the same question in different threads :-)
>
> http://sourceforge.net/mailarchive/forum.php?thread_name=88e473830806161822u418bad86hada6ed655dee77bc%40mail.gmail.com&forum_name=matplotlib-users
>
> I committed this method.
>
> JDH
> 
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
From: John B. <J.D...@ke...> - 2008年06月17日 14:19:48
Hi,
I am trying to use matplotlib to generate png image plots to display in web pages using apache on solaris. The problem is that savefig(sys.stdout) fails to generate any output or any error messages. The scripts run ok when run by hand, either by me or by the apache user. They also work when used as cgi scripts on a debian linux system. I am at a bit of a loss as to how to investigate what could be going wrong so any pointers would be helpful.
The matplotlib version is 0.98.0 and I am using the Agg backend.
John Bovey
From: John H. <jd...@gm...> - 2008年06月17日 14:06:06
On Tue, Jun 17, 2008 at 7:34 AM, Michael Droettboom <md...@st...> wrote:
> Now -- for the other developers on this list: We may want to add a
> .get_verts() function back to patches that does exactly what I recommend
> above. It won't behave identically to 0.91 since it will return a
> transformed copy of the vertices, but that won't matter in all cases
> (such as this one).
Hmm, we are asking each other the same question in different threads :-)
 http://sourceforge.net/mailarchive/forum.php?thread_name=88e473830806161822u418bad86hada6ed655dee77bc%40mail.gmail.com&forum_name=matplotlib-users
I committed this method.
JDH
From: John B. <J.D...@ke...> - 2008年06月17日 13:53:14
Hi,
I am trying to use matplotlib to generate png image plots to display in web pages using apache on solaris. The problem is that savefig(sys.stdout) fails to generate any output or any error messages. The scripts run ok when run by hand, either by me or by the apache user. They also work when used as cgi scripts on a debian linux system. I am at a bit of a loss as to how to investigate what could be going wrong so any pointers would be helpful.
The matplotlib version is 0.98.0 and I am using the Agg backend.
John Bovey
From: John H. <jd...@gm...> - 2008年06月17日 13:52:04
On Tue, Jun 17, 2008 at 7:16 AM, Michael Droettboom <md...@st...> wrote:
> Christopher Barker wrote:
>> If we really think that would help, and we would use it for MPL, we
>> could try to get it done -- but I doubt that it's worth it -- we have
>> enough trouble keeping the wx back-ends maintained as it is.
> Yes --- there is something to be said for keeping the number of backends
> to a minimum. Each one needs to have a reason to exist ;)
>>
>>>> If you can come up with an self-contained example of this, a post
>>>> tot he wxPython list may yield results.
>>>>
>>> It might be worth it just to get to the bottom of this.
>>
>> so are you working on an example? Or should I?
> I'm happy to do it, but may not get to it for a few days. My own test
> was to run "simple_plot_fps.py" with "handle_clip_rectangle" (in
> backend_wx.py) turned on and off. But obviously the wxPython folks will
> want a more standalone example.
I am happy to keep backends around if someone cares enough about it to
step up and maintain it. Michael you are stretched pretty thin w/ all
the other stuff you are doing for matplotlib, and I know you don't use
wx yourself or at work, so I suggest we let Ken or Chris or someone
who has a vested interest in this backend pursue it. As it stands,
wxagg is superior for almost every use case, and we want to encourage
people to use it. Any effort we spend optimizing would be much better
put into agg, since that would help almost every user, rather than the
 few who are using native wx.
JDH
From: Michael D. <md...@st...> - 2008年06月17日 12:34:13
You've hit one of the changed APIs in 0.98. You can see the list of 
changed APIs here:
http://matplotlib.svn.sourceforge.net/viewvc/*checkout*/matplotlib/trunk/matplotlib/API_CHANGES
Patches no longer store lists of vertices, they store Path objects + 
Affine transforms. So rather than "get_verts()", you can use the 
admittedly obtuse "circle.get_transform().transform(get_path().vertices)".
Note also another change is required in your script for something that 
probably only worked by accident before. The "ax.add_patch(p)" should 
be "ax.add_collection(p)", since p is a PolyCollection.
Now -- for the other developers on this list: We may want to add a 
.get_verts() function back to patches that does exactly what I recommend 
above. It won't behave identically to 0.91 since it will return a 
transformed copy of the vertices, but that won't matter in all cases 
(such as this one).
We may want to add a PatchCollection class that takes a list of patches, 
so users don't have to manually take patches apart like this. This is 
now possible because all patches are basically the same thing. This 
would also make it easier to use an bezier-approximated Ellipse rather 
than a polygonal approximated one.
Cheers,
Mike
sidimok wrote:
> Hi everyone, 
>
> The code below was working for me as a charm, but since the new matlplotlib
> flavor 0.98, I'm getting this error message: 
>
> 
>>> AttributeError: 'CirclePolygon' object has no attribute 'get_verts' << 
>>> 
>
> Any idea?
>
> - - - - - - - - - - - - - - - - - - -
> 
> import matplotlib 
> from matplotlib.patches import CirclePolygon 
> from matplotlib.collections import PolyCollection 
> import pylab 
>
> fig=pylab.figure() 
> ax=fig.add_subplot(111) 
>
> resolution = 50 # the number of vertices 
> N = 20 
> x = pylab.rand(N) 
> y = pylab.rand(N) 
> radii = 0.1*pylab.rand(N) 
> colors = 100*pylab.rand(N) 
> verts = [] 
> for x1,y1,r in zip(x, y, radii): 
> circle = CirclePolygon((x1,y1), r, resolution) 
> verts.append(circle.get_verts()) 
> 
> p = PolyCollection(verts, cmap=matplotlib.cm.jet) 
> p.set_array(pylab.array(colors)) 
> ax.add_patch(p) 
> pylab.colorbar(p) 
>
> ax.axis('equal') 
> pylab.show() 
>
> 
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
From: Michael D. <md...@st...> - 2008年06月17日 12:16:49
Christopher Barker wrote:
> Michael Droettboom wrote:
>
>> Creates a wx.GraphicsContext from a native context. This native 
>> context must be eg a CGContextRef for Core Graphics, a Graphics 
>> pointer for GDIPlus or a cairo_t pointer for Cairo. NOTE: For 
>> wxPython we still need a way to make this value usable.
>
> If we really think that would help, and we would use it for MPL, we 
> could try to get it done -- but I doubt that it's worth it -- we have 
> enough trouble keeping the wx back-ends maintained as it is.
Yes --- there is something to be said for keeping the number of backends 
to a minimum. Each one needs to have a reason to exist ;)
>
>>> If you can come up with an self-contained example of this, a post 
>>> tot he wxPython list may yield results.
>>> 
>> It might be worth it just to get to the bottom of this.
>
> so are you working on an example? Or should I?
I'm happy to do it, but may not get to it for a few days. My own test 
was to run "simple_plot_fps.py" with "handle_clip_rectangle" (in 
backend_wx.py) turned on and off. But obviously the wxPython folks will 
want a more standalone example.
>
>> I think the best we'll be able to do performance-wise with 
>> wx.GraphicsContext is the same as the Cairo backend (since 
>> wx.GraphicsContext is built on top of Cairo on X11, at least)
>
> so, does Cairo render a bitmap, and then push that to the X Server? If 
> so, that would explain why the new wx backend isn't any better than 
> wxAgg with remote X connections -- and that's was the only reason I 
> know to use it.
I believe it does from what I've read (assuming one isn't using the 
OpenGL backend), but don't know that first hand.
>
>> already slower than Agg, so there's no compelling reason for the Wx 
>> backend to exist, IMHO, *unless* it needs to integrate with other 
>> code that draws to a wx.GraphicsContext.
>
> I cant really imagine why anyone would try to do that -- and if you 
> really wanted to, you could still transfer the Agg buffer to a 
> wxBitmap, and draw to that with GraphicsContext anyway.
True.
>
> So, like you, I'm curious (and I need GraphicsContext for other 
> projects), so I'd still like to know what the deal is.
>
Thanks for all the info so far... Hopefully we can get to the bottom of 
this.
Cheers,
Mike
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
From: Johan M. <joh...@gm...> - 2008年06月17日 11:20:11
Hi
The thing is that if you installed the package matplotlib through your
package manager, you are not supposed and you don't need to install it
manually from the sources with the two commands I gave you.
The main interest of using the source of 0.91.3 is to use a debugged version
of the 0.91 release. In fact, the package 0.91.2 that you can get from your
package manager still have some bugs.
But maybe, you are using the 0.91.3 version since you typed "pyhton setup.py
build" and "pyhton setup.py install" in the source directory (despite of the
fact that you previously installed a matplotlib package).
I'm not good enough in Linux to tell what is the behaviour of the system in
this case.
Anyway, good for you if it's actually working. :)
Regards
Johan
2008年6月17日 Marjolaine Rouault <mro...@cs...>:
> Dear Johan,
>
> I have downloaded the matplotlib 0.91.2 version (the one installed by
> default by my package manager) and ran the python setup.py build as you
> suggested before running the python setup.py install command. I fixed the
> problem! I am so grateful for you helping me sort this out finally. I am
> looking forwards to start using matplotlib.
>
> Cheers, marjolaine.
>
> >>> "Johan Mazel" <joh...@gm...> 06/17/08 10:15 AM >>>
> Hi
> I am working with matplotlib 0.91.3 on Hardy. I installed it (with "pyhton
> setup.py build" and "pyhton setup.py install") from the source given on
> SourceForge. And it's working perfectly.
> Are you sure that you installed all the needed packages ? (Check with
> "pyhton setup.py build" and see wether there is no missing packages,
> especially development packages)
> NB : My matplotlib work without development packages from tkinter despite
> the fact that there are asked.
> Regards
> Johan
>
> 2008年6月17日 Marjolaine Rouault <mro...@cs...>:
>
> > Hi,
> >
> > I have tried reinstalling python-matplotlib and python-matplotlib-data as
> > well as reinstalling python-gtk2 and none of this proposed solutions
> work.
> > Still stuck unfortunately. I am thinking maybe my ubuntu is not right.
> Could
> > you guys let me know which repositories you use and I could try and
> upgrade
> > my ubuntu to one of new repositories lists?
> >
> > Thank
> >
> >
> >
> > --
> > This message is subject to the CSIR's copyright terms and conditions,
> > e-mail legal notice, and implemented Open Document Format (ODF) standard.
> > The full disclaimer details can be found at
> > http://www.csir.co.za/disclaimer.html.
> >
> > This message has been scanned for viruses and dangerous content by
> > MailScanner,
> > and is believed to be clean. MailScanner thanks Transtec Computers for
> > their support.
> >
> >
> > -------------------------------------------------------------------------
> > Check out the new SourceForge.net Marketplace.
> > It's the best place to buy or sell services for
> > just about anything Open Source.
> > http://sourceforge.net/services/buy/index.php
> > _______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >
>
>
> --
> This message is subject to the CSIR's copyright terms and conditions,
> e-mail legal notice, and implemented Open Document Format (ODF) standard.
> The full disclaimer details can be found at
> http://www.csir.co.za/disclaimer.html.
>
> This message has been scanned for viruses and dangerous content by
> MailScanner,
> and is believed to be clean. MailScanner thanks Transtec Computers for
> their support.
>
>
From: Marjolaine R. <mro...@cs...> - 2008年06月17日 10:40:14
Dear Johan,
I have downloaded the matplotlib 0.91.2 version (the one installed by default by my package manager) and ran the python setup.py build as you suggested before running the python setup.py install command. I fixed the problem! I am so grateful for you helping me sort this out finally. I am looking forwards to start using matplotlib.
Cheers, marjolaine.
 
>>> "Johan Mazel" <joh...@gm...> 06/17/08 10:15 AM >>> 
Hi
I am working with matplotlib 0.91.3 on Hardy. I installed it (with "pyhton
setup.py build" and "pyhton setup.py install") from the source given on
SourceForge. And it's working perfectly.
Are you sure that you installed all the needed packages ? (Check with
"pyhton setup.py build" and see wether there is no missing packages,
especially development packages)
NB : My matplotlib work without development packages from tkinter despite
the fact that there are asked.
Regards
Johan
2008年6月17日 Marjolaine Rouault <mro...@cs...>:
> Hi,
>
> I have tried reinstalling python-matplotlib and python-matplotlib-data as
> well as reinstalling python-gtk2 and none of this proposed solutions work.
> Still stuck unfortunately. I am thinking maybe my ubuntu is not right. Could
> you guys let me know which repositories you use and I could try and upgrade
> my ubuntu to one of new repositories lists?
>
> Thank
>
>
>
> --
> This message is subject to the CSIR's copyright terms and conditions,
> e-mail legal notice, and implemented Open Document Format (ODF) standard.
> The full disclaimer details can be found at
> http://www.csir.co.za/disclaimer.html.
>
> This message has been scanned for viruses and dangerous content by
> MailScanner,
> and is believed to be clean. MailScanner thanks Transtec Computers for
> their support.
>
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.
This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean. MailScanner thanks Transtec Computers for their support.
From: Lionel R. <lro...@li...> - 2008年06月17日 08:31:21
Don't sure last matplotlib version (and numpy) is in Hardy repositories. Here 
we do :
1- sudo apt-get --purge remove python-numpy* python-matplotlib* python-scipy*
2- manually remove all related folders under site-packages (with eggs!) 
3- download and install manually numpy, scipy and matplotlib (and basemap)
Le mardi 17 juin 2008, Marjolaine Rouault a écrit :
> Hi,
>
> I have tried reinstalling python-matplotlib and python-matplotlib-data as
> well as reinstalling python-gtk2 and none of this proposed solutions work.
> Still stuck unfortunately. I am thinking maybe my ubuntu is not right.
> Could you guys let me know which repositories you use and I could try and
> upgrade my ubuntu to one of new repositories lists?
>
> Thank
-- 
Lionel Roubeyrie - lro...@li...
Chargé d'études et de maintenance
LIMAIR - la Surveillance de l'Air en Limousin
http://www.limair.asso.fr
From: Johan M. <joh...@gm...> - 2008年06月17日 08:15:30
Hi
I am working with matplotlib 0.91.3 on Hardy. I installed it (with "pyhton
setup.py build" and "pyhton setup.py install") from the source given on
SourceForge. And it's working perfectly.
Are you sure that you installed all the needed packages ? (Check with
"pyhton setup.py build" and see wether there is no missing packages,
especially development packages)
NB : My matplotlib work without development packages from tkinter despite
the fact that there are asked.
Regards
Johan
2008年6月17日 Marjolaine Rouault <mro...@cs...>:
> Hi,
>
> I have tried reinstalling python-matplotlib and python-matplotlib-data as
> well as reinstalling python-gtk2 and none of this proposed solutions work.
> Still stuck unfortunately. I am thinking maybe my ubuntu is not right. Could
> you guys let me know which repositories you use and I could try and upgrade
> my ubuntu to one of new repositories lists?
>
> Thank
>
>
>
> --
> This message is subject to the CSIR's copyright terms and conditions,
> e-mail legal notice, and implemented Open Document Format (ODF) standard.
> The full disclaimer details can be found at
> http://www.csir.co.za/disclaimer.html.
>
> This message has been scanned for viruses and dangerous content by
> MailScanner,
> and is believed to be clean. MailScanner thanks Transtec Computers for
> their support.
>
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Marjolaine R. <mro...@cs...> - 2008年06月17日 07:58:20
Hi,
I have tried reinstalling python-matplotlib and python-matplotlib-data as well as reinstalling python-gtk2 and none of this proposed solutions work. Still stuck unfortunately. I am thinking maybe my ubuntu is not right. Could you guys let me know which repositories you use and I could try and upgrade my ubuntu to one of new repositories lists?
Thank
-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.
This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean. MailScanner thanks Transtec Computers for their support.
From: sidimok <si...@gm...> - 2008年06月17日 06:35:39
> Or are you effectively doing a scatter plot? Could you use scatter?
> 
> Eric
> 
Yes, I've already tried doing the trick with a scatter plot, but since the
filling colors correspond to a "physical quantity" and the radius of the
scatters are the "real" circle radius, using RegularPolygons is more
straightforward.
Isn't it better to use "Circle" new collection?
-- 
View this message in context: http://www.nabble.com/Drawing-filled-circles-%28discs%29-tp12672676p17879009.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Eric F. <ef...@ha...> - 2008年06月17日 01:30:36
John Hunter wrote:
> On Sun, Jun 15, 2008 at 7:48 AM, sidimok <si...@gm...> wrote:
> 
>> The code above was working for me as a charm, but since the new matlplotlib
>> flavor 0.98, I'm getting this error message:
>>
>>>> AttributeError: 'CirclePolygon' object has no attribute 'get_verts' <<
>> Any idea?
> 
> The new patches are more general since they work with general paths
> and not just patches, but the snippet below is analogous::
> 
> verts = []
> for x1,y1,r in zip(x, y, radii):
> circle = CirclePolygon((x1,y1), r, resolution)
> trans = circle.get_patch_transform()
> path = circle.get_path()
> transpath = path.transformed(trans)
> verts.append(transpath.vertices
> 
> Note when you add the PolyCollection to the Axes, you should be use
> ax.add_collection, not ax.add_patch::
> 
> p = PolyCollection(verts, cmap=matplotlib.cm.jet)
> p.set_array(pylab.array(colors))
> ax.add_collection(p)
> 
> But I'm guessing you could use a RegularPolyCollection here anyhow...
Or are you effectively doing a scatter plot? Could you use scatter?
Eric
> 
> Michael, do you think it is a good idea to add a get_verts
> compatability method to the patches where it makes sense?
> 
> JDH
> 
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: John H. <jd...@gm...> - 2008年06月17日 01:22:32
On Sun, Jun 15, 2008 at 7:48 AM, sidimok <si...@gm...> wrote:
> The code above was working for me as a charm, but since the new matlplotlib
> flavor 0.98, I'm getting this error message:
>
>>> AttributeError: 'CirclePolygon' object has no attribute 'get_verts' <<
>
> Any idea?
The new patches are more general since they work with general paths
and not just patches, but the snippet below is analogous::
 verts = []
 for x1,y1,r in zip(x, y, radii):
 circle = CirclePolygon((x1,y1), r, resolution)
 trans = circle.get_patch_transform()
 path = circle.get_path()
 transpath = path.transformed(trans)
 verts.append(transpath.vertices
Note when you add the PolyCollection to the Axes, you should be use
ax.add_collection, not ax.add_patch::
 p = PolyCollection(verts, cmap=matplotlib.cm.jet)
 p.set_array(pylab.array(colors))
 ax.add_collection(p)
But I'm guessing you could use a RegularPolyCollection here anyhow...
Michael, do you think it is a good idea to add a get_verts
compatability method to the patches where it makes sense?
JDH

Showing 25 results of 25

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 によって変換されたページ (->オリジナル) /