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

Showing 5 results of 5

From: Ryan M. <rm...@gm...> - 2010年04月20日 21:54:53
On Tue, Apr 20, 2010 at 4:02 PM, John Hunter <jd...@gm...> wrote:
> On Tue, Apr 20, 2010 at 3:26 PM, Ryan May <rm...@gm...> wrote:
>> Hi,
>>
>> Continuing the spurt of (independent) development that's been going on
>> lately, I committed support for generic timers. There's a base class
>> TimerBase that provides the basic API for a timer (start, stop,
>> controlling the interval, adding callbacks, etc.), and each GUI
>> backend subclasses this to wrap around their toolkit's native timer
>> classes. I added a method to each backend's canvas object to
>> facilitate creating a backend-specific timer without having to know
>> what backend was running. So far, I'm quite happy with how it turned
>> out, but I'm curious to hear feedback. Specifically:
>>
>> 1) Anything missing in the basic TimerBase API?
>
> You might want to pass the argument as keywords on from the
> add_timerr, so you can do
>
> timer = fig.canvas.new_timer(interval=100, callbacks=[(update_title, ax)])
>
> or something like that... Or support a single callback object.
I'll look at that. I had been trying to keep the constructor simple,
but those extra calls to get it fully initialized aren't in line with
the rest of the matplotlib API (been doing too much Qt!). I'll
probably make it callbacks=[(func, args, kwargs)], as I think I'm
going to go back and add **kwargs anyways.
> Speaking of callbacks, do you know about cbook.CallbackRegistry? It
> would be nice to standardize on a single interface for handling
> callbacks so users and developers can manipulate it directly.  We use
> this elsewhere in support of mpl event handling and the toolbar so it
> is fairly robust.
Can you further describe what you see here? I looked at this before,
and it seems more valuable if you have a variety of signals. I would
have 1. I *could* add a time_event to the list of events in the
canvas and use the canvas-level callback registry, but that would
actually seem to undo the encapsulation of the timer object. Plus
that would only allow one timer attached to a canvas. More
importantly, the CallbackRegistry, when processing signals, calls each
callback with the same arguments, so there's no way to specify per
callback information. Maybe I'm just being dense, so please correct
me if I'm missing your vision here. I'd always love to reuse existing
code and reduce my "opportunity" to contribute bugs to matplotlib. :)
Ryan
-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
From: John H. <jd...@gm...> - 2010年04月20日 21:03:01
On Tue, Apr 20, 2010 at 3:26 PM, Ryan May <rm...@gm...> wrote:
> Hi,
>
> Continuing the spurt of (independent) development that's been going on
> lately, I committed support for generic timers. There's a base class
> TimerBase that provides the basic API for a timer (start, stop,
> controlling the interval, adding callbacks, etc.), and each GUI
> backend subclasses this to wrap around their toolkit's native timer
> classes. I added a method to each backend's canvas object to
> facilitate creating a backend-specific timer without having to know
> what backend was running. So far, I'm quite happy with how it turned
> out, but I'm curious to hear feedback. Specifically:
>
> 1) Anything missing in the basic TimerBase API?
You might want to pass the argument as keywords on from the
add_timerr, so you can do
 timer = fig.canvas.new_timer(interval=100, callbacks=[(update_title, ax)])
or something like that... Or support a single callback object.
Speaking of callbacks, do you know about cbook.CallbackRegistry? It
would be nice to standardize on a single interface for handling
callbacks so users and developers can manipulate it directly. We use
this elsewhere in support of mpl event handling and the toolbar so it
is fairly robust.
> 2) Is adding new_timer() the canvas a good way to go? I needed a way
> to get to backend-specific classes without actually knowing what
> backend I'm running (and without calling _pylab_helpers or
> pyplot.get_backend()). Figure.canvas seemed to be just about the only
> way to go about this. It also makes some sense, because in the case
> of Wx and Tk, an actual widget is required to hook up the timer.
>
> I've added an example in:
> examples/event_handling/timers.py
>
> This just makes a plot with a title that is continually (100 ms)
> updating with the current time including milliseconds. It does a good
> job of showing the ease with which such interactive updates can be
> done now. In fact, this could probably be used to update and simplify
> the existing animation demos. However, I'm already finishing up a more
> complete animation framework based on this, which should simplify some
> of those even further. At that point, I'll probably update the
> examples.
>
Looking forward to seeing it -- thanks!
JDH
From: Ryan M. <rm...@gm...> - 2010年04月20日 20:26:43
Hi,
Continuing the spurt of (independent) development that's been going on
lately, I committed support for generic timers. There's a base class
TimerBase that provides the basic API for a timer (start, stop,
controlling the interval, adding callbacks, etc.), and each GUI
backend subclasses this to wrap around their toolkit's native timer
classes. I added a method to each backend's canvas object to
facilitate creating a backend-specific timer without having to know
what backend was running. So far, I'm quite happy with how it turned
out, but I'm curious to hear feedback. Specifically:
1) Anything missing in the basic TimerBase API?
2) Is adding new_timer() the canvas a good way to go? I needed a way
to get to backend-specific classes without actually knowing what
backend I'm running (and without calling _pylab_helpers or
pyplot.get_backend()). Figure.canvas seemed to be just about the only
way to go about this. It also makes some sense, because in the case
of Wx and Tk, an actual widget is required to hook up the timer.
I've added an example in:
examples/event_handling/timers.py
This just makes a plot with a title that is continually (100 ms)
updating with the current time including milliseconds. It does a good
job of showing the ease with which such interactive updates can be
done now. In fact, this could probably be used to update and simplify
the existing animation demos. However, I'm already finishing up a more
complete animation framework based on this, which should simplify some
of those even further. At that point, I'll probably update the
examples.
I still need to add some documentation to the event handling section
of the User's Guide, though this might better belong with a section on
animation's that I promise to write once the new framework is checked
in.
Also, I didn't add a TimerBase implementation for the CocoaAgg
backend. I have no idea about that toolkit, so I'd appreciate some
help there so we can have an implementation for all of the active GUI
toolkits.
Any feedback is appreciated.
Ryan
-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
From: Ryan M. <rm...@gm...> - 2010年04月20日 20:07:02
On Tue, Apr 20, 2010 at 2:46 PM, Eric Firing <ef...@ha...> wrote:
> During the last few days I have added some convenience methods and
> pyplot functions. Please review them to see whether names, APIs, or
> functionality should be changed. The general motivation is that
> formatters and locators are a bit obscure and hidden in the object
> hierarchy, so I wanted to make it easier for people to make simple
> changes. In addition, in autoscaling, one might want an option that is
> almost "tight" but leaves a little margin, so symbols at the edge don't
> get sliced off, for example.
No comments other than these seem like really good changes to reduce
the barrier for the users.
Nice work!
Ryan
-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
From: Eric F. <ef...@ha...> - 2010年04月20日 19:46:30
During the last few days I have added some convenience methods and 
pyplot functions. Please review them to see whether names, APIs, or 
functionality should be changed. The general motivation is that 
formatters and locators are a bit obscure and hidden in the object 
hierarchy, so I wanted to make it easier for people to make simple 
changes. In addition, in autoscaling, one might want an option that is 
almost "tight" but leaves a little margin, so symbols at the edge don't 
get sliced off, for example.
At the Axes and pyplot levels, the changes made so far include expanding 
ticklabel_format() and adding two new methods/functions, 
locator_params() and margins(). The change to ticklabel_format is the 
addition of a new kwarg:
 *useOffset* [True | False | offset]; if True,
 the offset will be calculated as needed;
 if False, no offset will be used; if a
 numeric offset is specified, it will be
 used.
This involved changing the underlying ScalarFormatter to accept a 
numeric offset as an alternative to calculating it automatically.
The docstrings for the new methods are:
 def locator_params(self, axis='both', tight=False, **kwargs):
 """
 Convenience method for controlling tick locators.
 Keyword arguments:
 *axis*
 ['x' | 'y' | 'both'] Axis on which to operate;
 default is 'both'.
 *tight*
 [True | False] Parameter passed to :meth:`autoscale_view`.
 Remaining keyword arguments are passed to directly to the
 :meth:`~matplotlib.ticker.MaxNLocator.set_params` method.
 Typically one might want to reduce the maximum number
 of ticks and use tight bounds when plotting small
 subplots, for example::
 ax.locator_params(tight=True, nbins=4)
 Because the locator is involved in autoscaling,
 :meth:`autoscale_view` is called automatically after
 the parameters are changed.
 This presently works only for the
 :class:`~matplotlib.ticker.MaxNLocator` used
 by default on linear axes, but it may be generalized.
 """
and
 def margins(self, *args, **kw):
 """
 Convenience method to set or retrieve autoscaling margins.
 signatures::
 margins()
 returns xmargin, ymargin
 ::
 margins(margin, tight=True)
 margins(xmargin, ymargin, tight=True)
 margins(x=xmargin, y=ymargin, tight=True)
 All three forms above set the xmargin and ymargin parameters.
 All keyword parameters are optional. A single argument
 specifies both xmargin and ymargin. The *tight* parameter
 is passed to :meth:`autoscale_view`, which is executed after
 a margin is changed.
 Specifying any margin changes only the autoscaling; for example,
 if *xmargin* is not zero, then *xmargin* times the X data
 interval will be added to each end of that interval before
 it is used in autoscaling.
 """
Eric

Showing 5 results of 5

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