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

Showing 9 results of 9

From: Damon M. <dam...@gm...> - 2012年11月12日 23:35:15
On Mon, Nov 12, 2012 at 2:17 PM, Paul Ivanov <piv...@gm...> wrote:
> On Mon, Nov 12, 2012 at 7:36 AM, Michael Droettboom <md...@st...> wrote:
>> On 11/11/2012 11:51 PM, Todd wrote:
>>> Now that 1.2 is out, can we revisit this? I would like to get it
>>> implemented for the next feature release.
>>>
>>
>> Absolutely. I think the next step, once you have an implementation,
>> would be to submit a pull request and we can all help with a review.
>
> This hasn't been mentioned yet, but Todd will hopefully find our
> developer docs useful:
> http://matplotlib.org/devel/index.html
>
> In particular, there's a section on writing a new pyplot function:
> http://matplotlib.org/devel/coding_guide.html#writing-a-new-pyplot-function
Thanks for that, Paul.
Todd, there's also a section on writing tests for matplotlib on the
page Paul pointed out. For a new feature there should be a couple of
tests to go with it to make sure everything passes sanity checks.
Thanks for spending your time contributing!
-- 
Damon McDougall
http://www.damon-is-a-geek.com
Institute for Computational Engineering Sciences
201 E. 24th St.
Stop C0200
The University of Texas at Austin
Austin, TX 78712-1229
On Mon, Nov 12, 2012 at 2:52 PM, Benjamin Root <ben...@ou...> wrote:
>
>
> On Mon, Nov 12, 2012 at 3:44 PM, Paul Ivanov <piv...@gm...> wrote:
>>
>> Hey everyone,
>>
>> So I don't have a clear picture in my head of our development cycle, and I
>> don't think it's well documented. I didn't want thread jack, but in another
>> thread Mike wrote:
>>
>> On Mon, Nov 12, 2012 at 7:36 AM, Michael Droettboom <md...@st...>
>> wrote:
>> > (BTW -- feel free to submit pull requests at any point in a release
>> > cycle -- we have both a master and a maintenance branch, so we can work
>> > on new stuff and stable stuff at the same time).
>>
>> My first question is, how are these two branches related, because I've
>> been submitting things against master, and then switching it to be against
>> 1.2.x when I was asked. From what I have gathered, 1.2.x is for bugfixes,
>> and master is for new features.
>>
>
> That is correct.
>
>>
>> Can someone clarify the current process, with a section like "Submitting
>> new Pull Requests" - this should probably go into one of these places:
>> http://matplotlib.org/devel/coding_guide.html
>> http://matplotlib.org/devel/gitwash/index.html
>>
>
> This is the essence of the gitwash process. Perhaps it needs to be clearer.
>
>>
>> My second question is that, if I do have the right idea about the current
>> process, and the distinction between master and 1.2.x, should we change
>> this? (I think we should).
>>
>> The trouble is that it seems to me now for a bugfix, if it is submitted
>> against 1.2.x, it won't be fixed in master until changes from 1.2.x are
>> merged back into master. So now as a developer trying to follow "bleeding
>> edge" matplotlib, I either have to live with bugs that have been fixed in
>> 1.2.x if I want the features from master, or if I want the bug fixes and
>> follow 1.2.x, I miss the new features in master.
>>
>
> A general rule is that whoever merges a bugfix to the maintenance branch
> should then also manually merge the maintenance branch down to master.
>
>>
>> I think that the mental picture is sufficiently clearer if *everything*
>> (bugfixes and new features) go into master, and then we backport the
>> critical bugfixes against 1.2.x. This would be easier to do if the core
>> developer merging the bugfix into master at least opens an issue for as a
>> placeholder / reminder for the bugfix being a candidate to go into the
>> maintenance branch. Because it seems like at this point, we aren't even sure
>> if we're going to do a 1.2.1 release...
>>
>
> There are other git workflows, which are all perfectly valid. If you can
> convince us to use another, feel free to propose one. However, we have done
> a couple of releases with gitwash, and it has worked quite well for us given
> how small our maintenance overhead is. Just have to remember to regularly
> merge the maintenance branch to master. That's all.
Personally, I use this one:
http://nvie.com/posts/a-successful-git-branching-model/
It does involve a little more effort, it does also mean that someone
installing from the master branch (which is the default branch) will
always get a stable release. My feeling is that the master branch
shouldn't contain any unstable code. Also, it means that the user can
just clone the git repository without having floating tarballs all
over their home directory.
I'm not necessarily proposing we should change it, I just wanted to
point out a different approach. The git branching workflow we use for
matplotlib is perfectly valid and I'm happy using it.
-- 
Damon McDougall
http://www.damon-is-a-geek.com
Institute for Computational Engineering Sciences
201 E. 24th St.
Stop C0200
The University of Texas at Austin
Austin, TX 78712-1229
From: Damon M. <dam...@gm...> - 2012年11月12日 23:26:37
On Mon, Nov 12, 2012 at 10:52 AM, Fernando Perez <fpe...@gm...> wrote:
> Hi folks,
>
> On Sun, Nov 11, 2012 at 1:20 PM, Damon McDougall
> <dam...@gm...> wrote:
>> Yeah that's a great idea. Get the word out.
>
> I did:
>
> https://speakerdeck.com/fperez/science-and-python-a-interactively-biased-retrospective-of-a-mostly-successful-decade?slide=17
>
> and the crowd actually erupted into spontaneous applause when I
> pointed out the py3 support!
That's what I like to hear. I played no part in the py3 support, but
it's a pretty herculean effort. In general I feel the 1.2.0 release is
an extremely robust release.
> So good job to the whole team.
>
> I also put in a slide about John pointing people to the memorial fund:
>
> https://speakerdeck.com/fperez/science-and-python-a-interactively-biased-retrospective-of-a-mostly-successful-decade?slide=50
Thanks Fernando.
-- 
Damon McDougall
http://www.damon-is-a-geek.com
Institute for Computational Engineering Sciences
201 E. 24th St.
Stop C0200
The University of Texas at Austin
Austin, TX 78712-1229
On Mon, Nov 12, 2012 at 3:44 PM, Paul Ivanov <piv...@gm...> wrote:
> Hey everyone,
>
> So I don't have a clear picture in my head of our development cycle, and I
> don't think it's well documented. I didn't want thread jack, but in another
> thread Mike wrote:
>
> On Mon, Nov 12, 2012 at 7:36 AM, Michael Droettboom <md...@st...>
> wrote:
> > (BTW -- feel free to submit pull requests at any point in a release
> > cycle -- we have both a master and a maintenance branch, so we can work
> > on new stuff and stable stuff at the same time).
>
> My first question is, how are these two branches related, because I've
> been submitting things against master, and then switching it to be against
> 1.2.x when I was asked. From what I have gathered, 1.2.x is for bugfixes,
> and master is for new features.
>
>
That is correct.
> Can someone clarify the current process, with a section like "Submitting
> new Pull Requests" - this should probably go into one of these places:
> http://matplotlib.org/devel/coding_guide.html
> http://matplotlib.org/devel/gitwash/index.html
>
>
This is the essence of the gitwash process. Perhaps it needs to be clearer.
> My second question is that, if I do have the right idea about the current
> process, and the distinction between master and 1.2.x, should we change
> this? (I think we should).
>
> The trouble is that it seems to me now for a bugfix, if it is submitted
> against 1.2.x, it won't be fixed in master until changes from 1.2.x are
> merged back into master. So now as a developer trying to follow "bleeding
> edge" matplotlib, I either have to live with bugs that have been fixed in
> 1.2.x if I want the features from master, or if I want the bug fixes and
> follow 1.2.x, I miss the new features in master.
>
>
A general rule is that whoever merges a bugfix to the maintenance branch
should then also manually merge the maintenance branch down to master.
> I think that the mental picture is sufficiently clearer if *everything*
> (bugfixes and new features) go into master, and then we backport the
> critical bugfixes against 1.2.x. This would be easier to do if the core
> developer merging the bugfix into master at least opens an issue for as a
> placeholder / reminder for the bugfix being a candidate to go into
> the maintenance branch. Because it seems like at this point, we aren't even
> sure if we're going to do a 1.2.1 release...
>
>
There are other git workflows, which are all perfectly valid. If you can
convince us to use another, feel free to propose one. However, we have
done a couple of releases with gitwash, and it has worked quite well for us
given how small our maintenance overhead is. Just have to remember to
regularly merge the maintenance branch to master. That's all.
Cheers!
Ben Root
Hey everyone,
So I don't have a clear picture in my head of our development cycle, and I
don't think it's well documented. I didn't want thread jack, but in another
thread Mike wrote:
On Mon, Nov 12, 2012 at 7:36 AM, Michael Droettboom <md...@st...> wrote:
> (BTW -- feel free to submit pull requests at any point in a release
> cycle -- we have both a master and a maintenance branch, so we can work
> on new stuff and stable stuff at the same time).
My first question is, how are these two branches related, because I've been
submitting things against master, and then switching it to be against 1.2.x
when I was asked. From what I have gathered, 1.2.x is for bugfixes, and
master is for new features.
Can someone clarify the current process, with a section like "Submitting
new Pull Requests" - this should probably go into one of these places:
http://matplotlib.org/devel/coding_guide.html
http://matplotlib.org/devel/gitwash/index.html
My second question is that, if I do have the right idea about the current
process, and the distinction between master and 1.2.x, should we change
this? (I think we should).
The trouble is that it seems to me now for a bugfix, if it is submitted
against 1.2.x, it won't be fixed in master until changes from 1.2.x are
merged back into master. So now as a developer trying to follow "bleeding
edge" matplotlib, I either have to live with bugs that have been fixed in
1.2.x if I want the features from master, or if I want the bug fixes and
follow 1.2.x, I miss the new features in master.
I think that the mental picture is sufficiently clearer if *everything*
(bugfixes and new features) go into master, and then we backport the
critical bugfixes against 1.2.x. This would be easier to do if the core
developer merging the bugfix into master at least opens an issue for as a
placeholder / reminder for the bugfix being a candidate to go into
the maintenance branch. Because it seems like at this point, we aren't even
sure if we're going to do a 1.2.1 release...
better,
-- 
Paul Ivanov
314 address only used for lists, off-list direct email at:
http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7
From: Paul I. <piv...@gm...> - 2012年11月12日 20:17:51
On Mon, Nov 12, 2012 at 7:36 AM, Michael Droettboom <md...@st...> wrote:
> On 11/11/2012 11:51 PM, Todd wrote:
>> Now that 1.2 is out, can we revisit this? I would like to get it
>> implemented for the next feature release.
>>
>
> Absolutely. I think the next step, once you have an implementation,
> would be to submit a pull request and we can all help with a review.
This hasn't been mentioned yet, but Todd will hopefully find our
developer docs useful:
http://matplotlib.org/devel/index.html
In particular, there's a section on writing a new pyplot function:
http://matplotlib.org/devel/coding_guide.html#writing-a-new-pyplot-function
-- 
Paul Ivanov
314 address only used for lists, off-list direct email at:
http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7
From: Fernando P. <fpe...@gm...> - 2012年11月12日 16:52:46
Hi folks,
On Sun, Nov 11, 2012 at 1:20 PM, Damon McDougall
<dam...@gm...> wrote:
> Yeah that's a great idea. Get the word out.
I did:
https://speakerdeck.com/fperez/science-and-python-a-interactively-biased-retrospective-of-a-mostly-successful-decade?slide=17
and the crowd actually erupted into spontaneous applause when I
pointed out the py3 support!
So good job to the whole team.
I also put in a slide about John pointing people to the memorial fund:
https://speakerdeck.com/fperez/science-and-python-a-interactively-biased-retrospective-of-a-mostly-successful-decade?slide=50
Cheers,
f
From: Michael D. <md...@st...> - 2012年11月12日 15:38:12
On 11/11/2012 11:51 PM, Todd wrote:
> On Thu, Sep 27, 2012 at 8:18 PM, Todd <tod...@gm...> wrote:
>> On Thu, Sep 27, 2012 at 1:44 PM, Todd <tod...@gm...> wrote:
>>> On Thu, Sep 27, 2012 at 1:12 PM, Damon McDougall
>>> <dam...@gm...> wrote:
>>>> Hi Todd,
>>>>
>>>> Firstly, thanks for taking the time to crystallise your thoughts in
>>>> words first. This is one of my bad habits; I tend to rush into things.
>>>>
>>>> I have some feedback for you, hopefully we can all work together to
>>>> get this right. It's difficult when something new gets implemented and
>>>> someone expects it to do something and the only way to resolve it is
>>>> to break the calling API.
>>> Where is API broken?
>>>
>>>> Anyway, I hope you'll find my comments
>>>> helpful at the least. I also encourage others to weigh in with
>>>> opinions and ideas.
>>> Okay, I will discuss the rationale. I will snip out anything you
>>> agree on for brevity.
>>>
>>>>> Assuming we go with the name, here is my proposed call signature:
>>>>>
>>>>> EventRaster(x, offset=0, height=1, **kargs)
>>>> CamelCase is discouraged for method names. Perhaps 'eventraster'?
>>> Fair enough.
>>>
>>>> Also, we could also let **kwargs swallow the 'offset' and 'height'
>>>> keyword arguments. Then the user isn't constrained by which order to
>>>> put them in. The downside of this approach is that introspection is
>>>> more difficult.
>>> I don't understand the advantage of this approach. If you use keyword
>>> arguments, then the order doesn't matter. So with the approach above
>>> you can use keyword arguments, in which case you can use whatever
>>> order they want, or you can use positional arguments. On the other
>>> hand putting it in **kwargs, we lose the ability to use positional
>>> arguments. So we lose nothing by allowing both positional and keyword
>>> arguments. It is also easier to implement.
>>>
>>>>> offset determines the positions of the rows. By default, the first
>>>>> row is placed with the line center y=0, and subsequent rows are placed
>>>>> with the line centers at increasing 1-unit increments. If offset is
>>>>> defined and is a scalar, the first row is placed at the offset, and
>>>>> subsequent rows are placed at increasing 1-unit increments. If offset
>>>>> is an array, it must be a 1D array of the same length as the second
>>>>> dimension of x. In this case each element in offset determines the
>>>>> center of the corresponding row in the plot.
>>>> How about letting offset be either: a) a scalar, determining the
>>>> offset of all rows equally; or b) an array, determining the offset of
>>>> each row individually.
>>> Because people are almost never going to want to have all the lines
>>> stacked right on top of each other. The plot would be indecipherable
>>> that way. The defaults are chosen to handle the most common use-cases
>>> most easily.
>>>
>>>> In fact, why plot each row at integer y
>>>> coordinates? Could we allow for an optional y-coordinate array, each
>>>> element of which would be the y-coordinate at which to plot a row of
>>>> lines. Then you wouldn't need offset.
>>> That is exactly what offset does if you pass an array.
>>>
>>>>> If this is going to be used to implement rug plots, it would need some
>>>>> way to handle columns of horizontal lines in addition to rows of
>>>>> vertical lines. I see two ways to implement this. First is to have
>>>>> to plot types, perhaps HEventRaster and VEventRaster. The first would
>>>>> be as described above, while the second would be similar but
>>>>> everything rotated 90 degrees. Another possibility is to change the
>>>>> call signature to this:
>>>>>
>>>>> EventRaster(x, y=None, offset=0, height=1, **kargs)
>>>> I think accepting an 'orientation' kwarg, which can take either
>>>> 'horizontal' or 'vertical', determining the orientation of the lines
>>>> and reversing the roles of the x and y arrays.
>>> That would work as well. Probably cleaner that way
>>>
>>>>> The function will return a list of a new collection type I am
>>>>> tentatively calling EventCollection. My thinking would be this would
>>>>> be a subclass of a new collection type called GenericLineCollection,
>>>>> which the current LineCollection would also subclass. They would
>>>>> share things like the color handling and segment handling, however the
>>>>> segment handling will be a "private" method that LineCollection will
>>>>> have a public wrapper for. On the other hand methods to set or add
>>>>> segments will remain private in EventCollection, although there will
>>>>> be a method to return the segments if an artist really wants to
>>>>> manipulate individual segments.
>>>> Why can't we just use LineCollection? I don't see a good reason to
>>>> create a new collection class here; the plot is simple.
>>> Explained below.
>>>
>>>>> The reason for doing it this way is that manipulating individual rows
>>>>> of events should be very common, such as changing their position,
>>>>> color, marker, width, and so on. On the other hand manipulating lines
>>>>> individually should not be as common, although still supported.
>>>> Fair enough, then maybe a better idea is to create your own
>>>> EventRaster class (note camel case) to hold all the relevant data in
>>>> arrays. Then make a 'construct_raster' method could return a
>>>> LineCollection. Then again, weren't you passing extra kwargs to
>>>> 'plot'? This approach would surely use ax.add_lines or
>>>> ax.add_linecollection something (I can't remember what it's called).
>>> The whole point of creating a new collection type is that artists will
>>> be able to manipulate individual sets of events.
>>>
>>> For example, with an ordinary LineCollection it will be extremely
>>> difficult to change the marker type, since doing so will change the
>>> marker for all 3 points on each segment rather than just the middle
>>> point. So if someone makes the plot, than wants to set rows to have
>>> different marker types instead of being lines, they can do that if we
>>> use a new collection class. But if we use LineCollection this becomes
>>> much more difficult.
>>>
>>> Similarly, with a LineCollection the lines lose their status as
>>> objects with a single distinct position. They become objects with 3
>>> 2D coordinates. So if someone wants to add more events to the end,
>>> they need to take care of handling the x and y coordinates, making
>>> sure the x coordinates are the same and taking the y coordinates from
>>> one of the existing lines. Similarly changing the height or vertical
>>> position of all the objects is complicated, having to manually
>>> calculate and modify the y coordinates of each point in each segment.
>>>
>>> Again, the idea here is to make the most common use-cases as easy as
>>> possible. LineCollection objects aren't really suited to the sort of
>>> artistic changes that are typical with this sort of plot.
>>>
>>> In fact I would say that having a separate collection class is central
>>> to this idea. If users aren't able to manipulate the set of events as
>>> such after they create the plot, then there really isn't any advantage
>>> over just using a vlines plot. Calculating the ymin and ymax is one
>>> line of code each, it is the artistic changes that save many lines of
>>> code and a lot of complexity.
>> I would also like to add that the new collection object would be
>> useful outside of this plot type.
>>
>> For example if someone wanted to create a rug plot as Nathaniel
>> described, and they want those along the same axes as the main plot,
>> then they would most likely not be be using the plot function, but
>> rather creating two individual collection objects in an existing
>> figure.
>>
>> I can imagine other cases besides a strict rug plot where adding such
>> a collection object could be useful.
> Now that 1.2 is out, can we revisit this? I would like to get it
> implemented for the next feature release.
>
Absolutely. I think the next step, once you have an implementation, 
would be to submit a pull request and we can all help with a review.
(BTW -- feel free to submit pull requests at any point in a release 
cycle -- we have both a master and a maintenance branch, so we can work 
on new stuff and stable stuff at the same time).
Mike
From: Todd <tod...@gm...> - 2012年11月12日 04:51:20
On Thu, Sep 27, 2012 at 8:18 PM, Todd <tod...@gm...> wrote:
> On Thu, Sep 27, 2012 at 1:44 PM, Todd <tod...@gm...> wrote:
>> On Thu, Sep 27, 2012 at 1:12 PM, Damon McDougall
>> <dam...@gm...> wrote:
>>> Hi Todd,
>>>
>>> Firstly, thanks for taking the time to crystallise your thoughts in
>>> words first. This is one of my bad habits; I tend to rush into things.
>>>
>>> I have some feedback for you, hopefully we can all work together to
>>> get this right. It's difficult when something new gets implemented and
>>> someone expects it to do something and the only way to resolve it is
>>> to break the calling API.
>>
>> Where is API broken?
>>
>>> Anyway, I hope you'll find my comments
>>> helpful at the least. I also encourage others to weigh in with
>>> opinions and ideas.
>>
>> Okay, I will discuss the rationale. I will snip out anything you
>> agree on for brevity.
>>
>>>> Assuming we go with the name, here is my proposed call signature:
>>>>
>>>> EventRaster(x, offset=0, height=1, **kargs)
>>>
>>> CamelCase is discouraged for method names. Perhaps 'eventraster'?
>>
>> Fair enough.
>>
>>> Also, we could also let **kwargs swallow the 'offset' and 'height'
>>> keyword arguments. Then the user isn't constrained by which order to
>>> put them in. The downside of this approach is that introspection is
>>> more difficult.
>>
>> I don't understand the advantage of this approach. If you use keyword
>> arguments, then the order doesn't matter. So with the approach above
>> you can use keyword arguments, in which case you can use whatever
>> order they want, or you can use positional arguments. On the other
>> hand putting it in **kwargs, we lose the ability to use positional
>> arguments. So we lose nothing by allowing both positional and keyword
>> arguments. It is also easier to implement.
>>
>>>> offset determines the positions of the rows. By default, the first
>>>> row is placed with the line center y=0, and subsequent rows are placed
>>>> with the line centers at increasing 1-unit increments. If offset is
>>>> defined and is a scalar, the first row is placed at the offset, and
>>>> subsequent rows are placed at increasing 1-unit increments. If offset
>>>> is an array, it must be a 1D array of the same length as the second
>>>> dimension of x. In this case each element in offset determines the
>>>> center of the corresponding row in the plot.
>>>
>>> How about letting offset be either: a) a scalar, determining the
>>> offset of all rows equally; or b) an array, determining the offset of
>>> each row individually.
>>
>> Because people are almost never going to want to have all the lines
>> stacked right on top of each other. The plot would be indecipherable
>> that way. The defaults are chosen to handle the most common use-cases
>> most easily.
>>
>>> In fact, why plot each row at integer y
>>> coordinates? Could we allow for an optional y-coordinate array, each
>>> element of which would be the y-coordinate at which to plot a row of
>>> lines. Then you wouldn't need offset.
>>
>> That is exactly what offset does if you pass an array.
>>
>>>> If this is going to be used to implement rug plots, it would need some
>>>> way to handle columns of horizontal lines in addition to rows of
>>>> vertical lines. I see two ways to implement this. First is to have
>>>> to plot types, perhaps HEventRaster and VEventRaster. The first would
>>>> be as described above, while the second would be similar but
>>>> everything rotated 90 degrees. Another possibility is to change the
>>>> call signature to this:
>>>>
>>>> EventRaster(x, y=None, offset=0, height=1, **kargs)
>>>
>>> I think accepting an 'orientation' kwarg, which can take either
>>> 'horizontal' or 'vertical', determining the orientation of the lines
>>> and reversing the roles of the x and y arrays.
>>
>> That would work as well. Probably cleaner that way
>>
>>>> The function will return a list of a new collection type I am
>>>> tentatively calling EventCollection. My thinking would be this would
>>>> be a subclass of a new collection type called GenericLineCollection,
>>>> which the current LineCollection would also subclass. They would
>>>> share things like the color handling and segment handling, however the
>>>> segment handling will be a "private" method that LineCollection will
>>>> have a public wrapper for. On the other hand methods to set or add
>>>> segments will remain private in EventCollection, although there will
>>>> be a method to return the segments if an artist really wants to
>>>> manipulate individual segments.
>>>
>>> Why can't we just use LineCollection? I don't see a good reason to
>>> create a new collection class here; the plot is simple.
>>
>> Explained below.
>>
>>>> The reason for doing it this way is that manipulating individual rows
>>>> of events should be very common, such as changing their position,
>>>> color, marker, width, and so on. On the other hand manipulating lines
>>>> individually should not be as common, although still supported.
>>>
>>> Fair enough, then maybe a better idea is to create your own
>>> EventRaster class (note camel case) to hold all the relevant data in
>>> arrays. Then make a 'construct_raster' method could return a
>>> LineCollection. Then again, weren't you passing extra kwargs to
>>> 'plot'? This approach would surely use ax.add_lines or
>>> ax.add_linecollection something (I can't remember what it's called).
>>
>> The whole point of creating a new collection type is that artists will
>> be able to manipulate individual sets of events.
>>
>> For example, with an ordinary LineCollection it will be extremely
>> difficult to change the marker type, since doing so will change the
>> marker for all 3 points on each segment rather than just the middle
>> point. So if someone makes the plot, than wants to set rows to have
>> different marker types instead of being lines, they can do that if we
>> use a new collection class. But if we use LineCollection this becomes
>> much more difficult.
>>
>> Similarly, with a LineCollection the lines lose their status as
>> objects with a single distinct position. They become objects with 3
>> 2D coordinates. So if someone wants to add more events to the end,
>> they need to take care of handling the x and y coordinates, making
>> sure the x coordinates are the same and taking the y coordinates from
>> one of the existing lines. Similarly changing the height or vertical
>> position of all the objects is complicated, having to manually
>> calculate and modify the y coordinates of each point in each segment.
>>
>> Again, the idea here is to make the most common use-cases as easy as
>> possible. LineCollection objects aren't really suited to the sort of
>> artistic changes that are typical with this sort of plot.
>>
>> In fact I would say that having a separate collection class is central
>> to this idea. If users aren't able to manipulate the set of events as
>> such after they create the plot, then there really isn't any advantage
>> over just using a vlines plot. Calculating the ymin and ymax is one
>> line of code each, it is the artistic changes that save many lines of
>> code and a lot of complexity.
>
> I would also like to add that the new collection object would be
> useful outside of this plot type.
>
> For example if someone wanted to create a rug plot as Nathaniel
> described, and they want those along the same axes as the main plot,
> then they would most likely not be be using the plot function, but
> rather creating two individual collection objects in an existing
> figure.
>
> I can imagine other cases besides a strict rug plot where adding such
> a collection object could be useful.
Now that 1.2 is out, can we revisit this? I would like to get it
implemented for the next feature release.
-Todd

Showing 9 results of 9

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