SourceForge logo
SourceForge logo
Menu

matplotlib-devel — matplotlib developers

You can subscribe to this list here.

2003 Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
(1)
Nov
(33)
Dec
(20)
2004 Jan
(7)
Feb
(44)
Mar
(51)
Apr
(43)
May
(43)
Jun
(36)
Jul
(61)
Aug
(44)
Sep
(25)
Oct
(82)
Nov
(97)
Dec
(47)
2005 Jan
(77)
Feb
(143)
Mar
(42)
Apr
(31)
May
(93)
Jun
(93)
Jul
(35)
Aug
(78)
Sep
(56)
Oct
(44)
Nov
(72)
Dec
(75)
2006 Jan
(116)
Feb
(99)
Mar
(181)
Apr
(171)
May
(112)
Jun
(86)
Jul
(91)
Aug
(111)
Sep
(77)
Oct
(72)
Nov
(57)
Dec
(51)
2007 Jan
(64)
Feb
(116)
Mar
(70)
Apr
(74)
May
(53)
Jun
(40)
Jul
(519)
Aug
(151)
Sep
(132)
Oct
(74)
Nov
(282)
Dec
(190)
2008 Jan
(141)
Feb
(67)
Mar
(69)
Apr
(96)
May
(227)
Jun
(404)
Jul
(399)
Aug
(96)
Sep
(120)
Oct
(205)
Nov
(126)
Dec
(261)
2009 Jan
(136)
Feb
(136)
Mar
(119)
Apr
(124)
May
(155)
Jun
(98)
Jul
(136)
Aug
(292)
Sep
(174)
Oct
(126)
Nov
(126)
Dec
(79)
2010 Jan
(109)
Feb
(83)
Mar
(139)
Apr
(91)
May
(79)
Jun
(164)
Jul
(184)
Aug
(146)
Sep
(163)
Oct
(128)
Nov
(70)
Dec
(73)
2011 Jan
(235)
Feb
(165)
Mar
(147)
Apr
(86)
May
(74)
Jun
(118)
Jul
(65)
Aug
(75)
Sep
(162)
Oct
(94)
Nov
(48)
Dec
(44)
2012 Jan
(49)
Feb
(40)
Mar
(88)
Apr
(35)
May
(52)
Jun
(69)
Jul
(90)
Aug
(123)
Sep
(112)
Oct
(120)
Nov
(105)
Dec
(116)
2013 Jan
(76)
Feb
(26)
Mar
(78)
Apr
(43)
May
(61)
Jun
(53)
Jul
(147)
Aug
(85)
Sep
(83)
Oct
(122)
Nov
(18)
Dec
(27)
2014 Jan
(58)
Feb
(25)
Mar
(49)
Apr
(17)
May
(29)
Jun
(39)
Jul
(53)
Aug
(52)
Sep
(35)
Oct
(47)
Nov
(110)
Dec
(27)
2015 Jan
(50)
Feb
(93)
Mar
(96)
Apr
(30)
May
(55)
Jun
(83)
Jul
(44)
Aug
(8)
Sep
(5)
Oct
Nov
(1)
Dec
(1)
2016 Jan
Feb
Mar
(1)
Apr
May
Jun
(2)
Jul
Aug
(3)
Sep
(1)
Oct
(3)
Nov
Dec
2017 Jan
Feb
(5)
Mar
Apr
May
Jun
Jul
(3)
Aug
Sep
(7)
Oct
Nov
Dec
2018 Jan
Feb
Mar
Apr
May
Jun
Jul
(2)
Aug
Sep
Oct
Nov
Dec
S M T W T F S





1
2
3
4
(3)
5
(9)
6
(3)
7
(3)
8
(4)
9
(7)
10
(2)
11
(10)
12
13
(1)
14
(3)
15
(1)
16
17
18
(3)
19
(9)
20
(24)
21
(8)
22
(21)
23
(2)
24
(1)
25
(4)
26
(3)
27
(6)
28
(18)
29
(7)
30
(3)
31






Showing 8 results of 8

From: Andrew S. <str...@as...> - 2009年05月21日 21:59:02
The tests now seem to be running OK. There are some failures due to
image comparison mismatch, but I think we should attempt to track these
down as a team -- hopefully running on more computers than just mine and
with James' input. To see the latest test results, click on the "stdio"
link for each run of the "test" box in the waterfall display
http://mpl-buildbot.code.astraw.com/waterfall .
It would be nice if the buildbot web GUI would easily let us see, for
failed image-based tests, the baseline, output, and difference image,
but that's not implemented (as far as I know). It would probably be
possible to add something like this to the MplNosePlugin to do this with
relatively little pain, although the display would be easiest via a
pastebin or something rather than hooking back into a patched buildbot
framework that supported test images.
John Hunter wrote:
> On Wed, May 20, 2009 at 3:48 AM, Andrew Straw <str...@as...> wrote:
> 
>> Let's see if we can get all the tests passing and if this buildbot
>> approach looks sustainable -- if so, I'd like to get some more build
>> slaves into the mix and make MPL a good continuous integration citizen.
>> I don't think the buildbot master will take many resources on my server,
> 
> The sage project has given us access to a network accessible
> persistent OSX box, so I will try and get that setup with the buildbot
> infrastructure. I'm not yet familiar with the buildbot project or
> approach, so I have some learning to do, so if you have a cheatsheet
> or docs thaty you think are particularly handy, send them along
> (otherwise I'll just make my way through the site docs)
OK, here's what you do::
 # (Make a username you want to run this buildslave as.
 # Become that user. Change into a new directory e.g. $HOME/builbot)
 curl http://astraw.com/mpl/bootstrap-py.txt > bootstrap.py
 curl http://astraw.com/mpl/buildout-example.cfg > buildout.cfg
 # Edit buildout.cfg according the instructions in the file. Send me
 # the values you added.
 # python bootstrap.py
 # bin/buildout
Once you've been added to the build master:
 # bin/<slave-identifier-string> start
And that should be it.
For now we can start/stop builds by clicking the "force build" button in
the buildmaster web GUI. SVN polling doesn't seem to be working yet...
I'll look into that when I have time. Ditto for building binaries and
uploading them somewhere.
-Andrew
From: James E. <jre...@ea...> - 2009年05月21日 20:42:46
There seems to be some confusion as to how the mpl unit system works, I hope the following will help to clarify that and keep this
thread focused on the issue.
Currently mpl provides an API via the 'ConversionInterface' class in 'matplotlb.units' that allows a user to define how to translate
their data into something meaningful for mpl to process (i.e. floats). If you are already passing around floats, then this
interface is not for you. This interface is for typed data that is to be plotted (i.e. it needs to be "manipulated" to convert it
to a float).
This manipulation is handled via the user-defined and registered ConversionInterface sub-class.
The idea is not that a user will do the following:
>>> ax.plot( cms )
>>> ax.plot( inches )
As that would imply that the user has already converted their data to floats. But that the user will this intead:
>>> ax.plot( length_data1 )
>>> ax.plot( length_data2 )
Where the length_dataX is some user-defined data type and a user-defined conversion class has been pre-registered. mpl will choose
the default units based upon what the user-defined conversion class says the default should be. But if a more explicit
specification is required, then the user does the following instead:
>>> ax.plot( length_data1, xunits="cm" )
>>> ax.plot( length_data2 )
This would plot the length data in centimeters. If desired then the user can do the following:
>>> ax.xaxis.set_units( "cm" )
And the plot would be updated. The following also currently works:
>>> ax.plot( length_data1, xunits="cm" )
>>> ax.plot( length_data2, xunits="inches" )
And the final plot would be in inches. The current mpl interface for units is quite robust and supports a very generic interface
that is highly user-customizable (should the user want to do so). The interface is so robust that I defined a simple converter
class that will "convert" strings to floats. I use this with bar plots and do something like the following:
>>> ax.bar( ["a", "b', "c"], [1, 2, 3] )
An example can be seen in the matplotlib 'test/mplTest/units/StrConverter.py' file. Additionally other unit example classes can be
found in the 'test/mplTest/units' directory.
The issue is, as John has already stated with the individual plot functions. 'ax.plot' works perfectly fine due to the way the line
data is cached and updated as needed (the updates take into account if units might have changed). Some individual plot functions
strip out the units then manipulate the data, and others keep the unitized data and pass it along to be stripped out later. The
issue is getting a consistent mechanism for dealing with where the conversion is to occur.
I think that John's proposal of having higher level classes that handle this (as well as the caching) might be the way to go. It
would allow the individual plot functions to stay simplistic and true to what they provide and let the data handle itself. This
type of mechanism promises to be faster since the data only needs to be converted once (in the typical use case). Overhead of
re-converting would only occur when the user explicitly changes the units for a specified axis. Additionally this approach looks to
be more appealing when it comes to making plottable data items that are selectable and ultimately manipulatable via a gui interface.
--James Evans
From: John H. <jd...@gm...> - 2009年05月21日 20:13:02
On Thu, May 21, 2009 at 2:20 PM, Christopher Barker
<Chr...@no...> wrote:
> John Hunter wrote:
>> <Chr...@no...> wrote:
>>> If it's going to be done, I think it really shouldn't be too MPL
>>> specific -- it should be built on a good (and hopefully eventually
>>> widely used) unit-array system, perhaps like Darren Dale's Quantities
>>> package (there are quite a few other that should be looked at also).
>>
>> This is not how it works -- we will not be assuming any units package.
>> Rather, we provide an interface where any units package can be used
>> with mpl.
>
> Fair enough, but you still need to require a particular API to a unit-ed
> object, which it no so different.
No, this is incorrect. The object can have any API it wants. The
person who wants to add support for that object registers the object
type with a converter class for that object. The converter class can
be entirely external to the class, as in the datetime example I
posted, so the object's API is not exposed to mpl. This is the
crucial distinction. The converter class at a minimum must know how
to convert the object to a sequence of floats.
JDH
JDH
From: Robert K. <rob...@gm...> - 2009年05月21日 20:06:16
On 2009年05月21日 14:55, Pierre GM wrote:
> Anyway, the zoom-level dependent ticks we implemented might be a good
> starting point for implementing a "locator/formatter that decides
> whether to display cm or km"...
Well, if we're pushing products, Chaco has a subsystem for doing exactly this in 
a generic fashion for times or anything else:
 https://svn.enthought.com/svn/enthought/Chaco/trunk/enthought/chaco/scales/
It was written to be self-contained so that it could be shared with matplotlib 
or anything else that need it.
-- 
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
 -- Umberto Eco
From: Pierre GM <pgm...@gm...> - 2009年05月21日 19:55:36
<push product>
Er... Anybody has tried the plotting capacities of scikits.timeseries 
(pytseries.sourceforge.net)? In short, the package provides some 
extensions to matplotlib to plot timeseries. One of these extensions 
changes the ticks depending on the zoom level: start over a few 
decades and ticks will be every 5 y or so. Select a smaller area and 
the ticks will be every quarter, you get the idea. The series 
associated with the plot (either the first plotted or one given at 
plot creation) sets the units (frequency) of the xaxis. Afterwards, 
other series plotted on the same plot are converted to the plot's 
frequency) with our own conversion routines.
Theses extensions were coded about 18 months ago, at a time where the 
support for units was inexistent (or hidden somewhere I never fund 
it). A couple weeks ago I realized that units converting would 
probably be the way to go (and that in general, our extensions should 
be rewritten).
Anyway, the zoom-level dependent ticks we implemented might be a good 
starting point for implementing a "locator/formatter that decides 
whether to display cm or km"...
I'd be quite happy to get some feedback about these extensions...
Cheers
P.
</push product>
From: Christopher B. <Chr...@no...> - 2009年05月21日 19:19:06
John Hunter wrote:
> <Chr...@no...> wrote:
>> If it's going to be done, I think it really shouldn't be too MPL
>> specific -- it should be built on a good (and hopefully eventually
>> widely used) unit-array system, perhaps like Darren Dale's Quantities
>> package (there are quite a few other that should be looked at also).
> 
> This is not how it works -- we will not be assuming any units package.
> Rather, we provide an interface where any units package can be used
> with mpl.
Fair enough, but you still need to require a particular API to a unit-ed 
object, which it no so different.
One thing that strikes me is that there is a distinctive difference 
between something like Darren's Quantities (and other numpy-based 
packages) and what MPL no supports for DateTimes -- in Quantities, the 
sequence itself has units, whereas with Datetimes, you use a generic 
sequence, and each element has units. I suppose that difference can be 
dealt with in the API, though.
> The original use case is that the JPL has an internal units
> package and they want to pass their objects directly to mpl
But, of course, the rest of us probably don't want to (or can't) use 
JPL's package, so we'll want a more generic package to test with and 
write samples for, etc.
In general, I think it's next to impossible to write a generic API 
without AT LEAST two use cases -- so maybe JPL's and Quantities would be 
a good start.
> One nice thing about this is we were able to extend support to native
> datetime objects (which we cannot modify obviously) to mpl, so this
> facility works with both proper unit types as well as arbitrary types.
And I have enjoyed the DateTime support (except when it's not there, 
natch!). In thinking about this more, I think the real benefit is in the 
coupling with the units support with nifty things like AutoLocaters and 
AutoFormatters -- these are great for DateTimes, and my first thought 
was "who cares" for simpler units like meters. However, in thinking, I 
realize that I've written a fair bit of code for my data that may be in 
meters, for instance, that goes like:
if max < 1:
 do_stuff_to display_centimeters.
elif max < 1000:
 do_stuff_to display_meters.
else:
 do_stuff_to display_kilometers.
It would be nice to push that stuff into an MPL locater and formatter, 
even if I do need to write them myself. And, ideally between us all, a 
nice collection of generic ones could be written.
I could (and now that I think about it, will) still do that by simply 
assuring my data are always in a particular unit, but it would be nicer 
if the locaters could be unit aware, so that one could pass in any 
length unit, and apply a "SI_length_Formatter" to it. Or just 
SI_Formatter, now that I think about it.
I'm not sure how to resolve one issue:
If I have a locator/formatter that decides whether to display cm or km, 
etc, depending on values, I probably want the axis label to reflect that 
too, but I don't know how one can get all those to communicate.
Also, it sounds like you're talking about converting units to the same 
something -- but, for length, it might be feet, or miles, or cm, or.... 
This is a bit different than what is done for time, where datetimes are 
always converted to the same base -- days since 0001年01月01日 00:00:00. 
Perhaps this convention could be followed with a standard base unit for 
length, etc. though maybe that wouldn't capture the range of precisions 
that may be required -- some data in centuries, some in nanoseconds...
(by the way, there was some work on handling datetimes with numpy arrays 
a while back -- I wonder what came of that?)
> I'm open to the idea of not supporting post-facto conversions after
> data is added, but am mostly minus one on it, and I'd like to hear
> from the JPL who requested the ability initially. I think their users
> are working with complex plots and might have arrays in different
> distance units, and would like to be able to pass in any distance
> units as long as conversion is possible.
I can see that, but suggest that the unit finally displayed by the plot 
be specified by an axis method, or Locators or Formatters, or ??, but in 
any case, not change depending on what order you add data to the plot.
It would be pretty cool to be able to do:
ax.plot(x, data_in_feet)
ax.plot(x, data_in_meters)
and get it all scaled right!
> there is little difference between the code
> you suggest::
> 
> ax.plot(values.rescale('cm'))
> ax.set_xlim(limits.rescale('cm'))
> 
> and::
> 
> ax.plot(values.rescale('cm').tofloat())
> ax.set_xlim(limits.rescale('cm').tofloat())
> 
> where the latter means we have no units or custom type support.
there are a couple differences:
1) with date2num, we still always use float-days- since-epoc for the 
actual numbers. That means that there can be one set of formatters. In 
that example, what units would tofloat() return? If we want formatter to 
work, some info about the units needs to be passed into mpl.
2) in the second version -- every unit-ed data type would have to have a 
tofloat() method (and what units would those floats be in?), or it would be:
 ax.plot(mpl.length2num(values.rescale('cm')) )
 ax.set_xlim(mpl.length2num(limits.rescale('cm')) )
In the end, I think datetimes are easier, not as many options.
I'm not sure all this was very clear, but hopefully it added some signal 
with the noise!
-Chris
-- 
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chr...@no...
From: Tony S Yu <to...@MI...> - 2009年05月21日 17:36:05
I'm animating a Circle patch with a varying center and radius, and I 
noticed that changing the ``radius`` attribute has no effect on the 
patch. Currently, ``radius`` is only used to instantiate an Ellipse 
object, but updating radius has no effect (i.e. redrawing the patch 
doesn't use the new radius).
I've included a patch to add this feature. Also included in the patch 
is a small fix to one of the UI examples (sorry for included a 
completely unrelated patch but the fix seemed to small for a separate 
email).
BTW, I'm using a property idiom from: http://code.activestate.com/recipes/205183/ 
. I thought that this approach was better than polluting the namespace 
with getters and setters, especially since this would differ from the 
way the Ellipse class uses ``width`` and ``height`` attributes.
Cheers,
-Tony
===================================================================
--- lib/matplotlib/patches.py	(revision 7128)
+++ lib/matplotlib/patches.py	(working copy)
@@ -1131,6 +1131,14 @@
 self.radius = radius
 Ellipse.__init__(self, xy, radius*2, radius*2, **kwargs)
 __init__.__doc__ = cbook.dedent(__init__.__doc__) % artist.kwdocd
+
+ def radius():
+ def fget(self):
+ return self.width / 2.
+ def fset(self, radius):
+ self.width = self.height = 2 * radius
+ return locals()
+ radius = property(**radius())
 class Arc(Ellipse):
 """
Index: examples/user_interfaces/embedding_in_wx3.py
===================================================================
--- examples/user_interfaces/embedding_in_wx3.py	(revision 7128)
+++ examples/user_interfaces/embedding_in_wx3.py	(working copy)
@@ -147,7 +147,7 @@
 return True
 def OnBang(self,event):
- bang_count = XRCCTRL(self.frame,"bang_count")
+ bang_count = xrc.XRCCTRL(self.frame,"bang_count")
 bangs = bang_count.GetValue()
 bangs = int(bangs)+1
 bang_count.SetValue(str(bangs))
From: John H. <jd...@gm...> - 2009年05月21日 14:34:14
Now that we (finally!) got the bug fix release out for 0.98.5.3, which
I am hoping will be the last, I'd like to turn our attention to a
trunk release, which is where all the good stuff is, including the new
axes grid and mplot3d toolkits.
In advance of this, I suggest you commit any pending work you'd like
to see in the release, and try to tackle any pending sf bug reports or
patches (and file a bug report if you know of an issue that needs to
be addressed). In a week or so, I'll ask Michael to create a release
branch from HEAD at which point the 98.5 branch will die and the
release branch will become the new stable branch to which we apply
only bugfixes and not new features. We'll do a release candidate from
the branch, and then a release, in perhaps two weeks time.
Thanks,
JDH

Showing 8 results of 8

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