From: Fabio Z. <fab...@tu...> - 2014-11-03 10:57:23
Attachments:
smime.p7s
|
Dear all, I've been using matplotlib with great satisfaction for a few years, but one feature I've been missing is a "logit" scale. This is essentially a nonlinear scale that is log both towards 0+ and log towards 1-. It is useful when one has frequencies in a population (i.e. floats between 0 and 1) and both rare events and very common ones are interesting. For instance, say you ask about the fraction of people with blue eyes in various world populations, you want to spot even tiny deviations from zero or one. I have coded a scale according to matplotlib's documentation and it works well, so I was wondering whether you are interested into merging it into the the main repository. I think it'd be useful because lots of people have such frequency data, especially now that matplotlib is becoming popular in the biology/social sciences research communities. If there is interest, I'll just start a pull request on github and try to adapt the code to your coding style. It's already PEP8 and similia. Thanks. Cheers, Fabio |
From: Thomas C. <tca...@gm...> - 2014-11-03 11:58:50
|
Please create a pull request. This sounds reasonable to me, but I have never seen a plot with that scale and don't really understand it from your description. Seeing the code usually clarifies things. Tom On Mon, Nov 3, 2014, 05:58 Fabio Zanini <fab...@tu...> wrote: > Dear all, > > I've been using matplotlib with great satisfaction for a few years, but > one feature I've been missing is a "logit" scale. This is essentially a > nonlinear scale that is log both towards 0+ and log towards 1-. It is > useful when one has frequencies in a population (i.e. floats between 0 > and 1) and both rare events and very common ones are interesting. > > For instance, say you ask about the fraction of people with blue eyes in > various world populations, you want to spot even tiny deviations from > zero or one. > > I have coded a scale according to matplotlib's documentation and it > works well, so I was wondering whether you are interested into merging > it into the the main repository. I think it'd be useful because lots of > people have such frequency data, especially now that matplotlib is > becoming popular in the biology/social sciences research communities. > > If there is interest, I'll just start a pull request on github and try > to adapt the code to your coding style. It's already PEP8 and similia. > > Thanks. Cheers, > Fabio > > ------------------------------------------------------------ > ------------------ > _______________________________________________ > Matplotlib-devel mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > |
From: Pierre H. <pie...@cr...> - 2014-11-03 12:04:30
|
Hi Fabio, Le 03/11/2014 11:41, Fabio Zanini a écrit : > I've been using matplotlib with great satisfaction for a few years, but > one feature I've been missing is a "logit" scale. This is essentially a > nonlinear scale that is log both towards 0+ and log towards 1-. Nice coincidence, I was also playing with this idea back in April. http://nbviewer.ipython.org/gist/pierre-haessig/7e3e6a818edeb6819708 I was actually wondering whether this could interest other people in other fields... best, Pierre > It is > useful when one has frequencies in a population (i.e. floats between 0 > and 1) and both rare events and very common ones are interesting. > > For instance, say you ask about the fraction of people with blue eyes in > various world populations, you want to spot even tiny deviations from > zero or one. > > I have coded a scale according to matplotlib's documentation and it > works well, so I was wondering whether you are interested into merging > it into the the main repository. I think it'd be useful because lots of > people have such frequency data, especially now that matplotlib is > becoming popular in the biology/social sciences research communities. > > If there is interest, I'll just start a pull request on github and try > to adapt the code to your coding style. It's already PEP8 and similia. > > Thanks. Cheers, > Fabio > > |
From: Jens N. <jen...@gm...> - 2014-11-03 12:25:56
|
A pull request would be welcome. Note that we already have the symlog scale http://matplotlib.org/examples/pylab_examples/symlog_demo.html?highlight=symlog which is essentially a logscale with a linear fraction in the centre. As I understand this it is not quite the same but useful for a different purpose Jens On Mon, Nov 3, 2014 at 12:04 PM, Pierre Haessig <pie...@cr...> wrote: > Hi Fabio, > > Le 03/11/2014 11:41, Fabio Zanini a écrit : > > I've been using matplotlib with great satisfaction for a few years, but > > one feature I've been missing is a "logit" scale. This is essentially a > > nonlinear scale that is log both towards 0+ and log towards 1-. > > Nice coincidence, I was also playing with this idea back in April. > http://nbviewer.ipython.org/gist/pierre-haessig/7e3e6a818edeb6819708 > > I was actually wondering whether this could interest other people in > other fields... > > best, > Pierre > > > It is > > useful when one has frequencies in a population (i.e. floats between 0 > > and 1) and both rare events and very common ones are interesting. > > > > For instance, say you ask about the fraction of people with blue eyes in > > various world populations, you want to spot even tiny deviations from > > zero or one. > > > > I have coded a scale according to matplotlib's documentation and it > > works well, so I was wondering whether you are interested into merging > > it into the the main repository. I think it'd be useful because lots of > > people have such frequency data, especially now that matplotlib is > > becoming popular in the biology/social sciences research communities. > > > > If there is interest, I'll just start a pull request on github and try > > to adapt the code to your coding style. It's already PEP8 and similia. > > > > Thanks. Cheers, > > Fabio > > > > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Matplotlib-devel mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > |
From: Fabio Z. <fab...@tu...> - 2014-11-03 12:30:39
Attachments:
smime.p7s
|
@Pierre: Yeah, my code looks 99% the same like yours. I'll make a PR starting from a mix of both - probably closer to yours than to mine :-P @Jens: symlog extends to infinity, logit has a compact range, that's why it's not exactly the same. Ok I'll make a pull request. Shall I start with a test that fails, then add the function and show it succeeds? or shall I start directly with the code and add a test later on? Cheers, Fabio On 11/03/2014 12:58 PM, Thomas Caswell wrote: > Please create a pull request. > > This sounds reasonable to me, but I have never seen a plot with that > scale and don't really understand it from your description. Seeing the > code usually clarifies things. > > Tom > > On Mon, Nov 3, 2014, 05:58 Fabio Zanini <fab...@tu... > <mailto:fab...@tu...>> wrote: > > Dear all, > > I've been using matplotlib with great satisfaction for a few years, but > one feature I've been missing is a "logit" scale. This is essentially a > nonlinear scale that is log both towards 0+ and log towards 1-. It is > useful when one has frequencies in a population (i.e. floats between 0 > and 1) and both rare events and very common ones are interesting. > > For instance, say you ask about the fraction of people with blue eyes in > various world populations, you want to spot even tiny deviations from > zero or one. > > I have coded a scale according to matplotlib's documentation and it > works well, so I was wondering whether you are interested into merging > it into the the main repository. I think it'd be useful because lots of > people have such frequency data, especially now that matplotlib is > becoming popular in the biology/social sciences research communities. > > If there is interest, I'll just start a pull request on github and try > to adapt the code to your coding style. It's already PEP8 and similia. > > Thanks. Cheers, > Fabio > > ------------------------------__------------------------------__------------------ > _________________________________________________ > Matplotlib-devel mailing list > Matplotlib-devel@lists.__sourceforge.net > <mailto:Mat...@li...> > https://lists.sourceforge.net/__lists/listinfo/matplotlib-__devel > <https://lists.sourceforge.net/lists/listinfo/matplotlib-devel> > |
From: Fabio Z. <fab...@tu...> - 2014-11-03 15:13:45
Attachments:
smime.p7s
|
Dear all, I made a pull request for this: #3753, at https://github.com/matplotlib/matplotlib/pull/3753 Cheers, Fabio On 11/03/2014 01:30 PM, Fabio Zanini wrote: > @Pierre: Yeah, my code looks 99% the same like yours. I'll make a PR > starting from a mix of both - probably closer to yours than to mine :-P > > @Jens: symlog extends to infinity, logit has a compact range, that's why > it's not exactly the same. > > Ok I'll make a pull request. Shall I start with a test that fails, then > add the function and show it succeeds? or shall I start directly with > the code and add a test later on? > > Cheers, > Fabio > > On 11/03/2014 12:58 PM, Thomas Caswell wrote: >> Please create a pull request. >> >> This sounds reasonable to me, but I have never seen a plot with that >> scale and don't really understand it from your description. Seeing the >> code usually clarifies things. >> >> Tom >> >> On Mon, Nov 3, 2014, 05:58 Fabio Zanini <fab...@tu... >> <mailto:fab...@tu...>> wrote: >> >> Dear all, >> >> I've been using matplotlib with great satisfaction for a few years, but >> one feature I've been missing is a "logit" scale. This is essentially a >> nonlinear scale that is log both towards 0+ and log towards 1-. It is >> useful when one has frequencies in a population (i.e. floats between 0 >> and 1) and both rare events and very common ones are interesting. >> >> For instance, say you ask about the fraction of people with blue eyes in >> various world populations, you want to spot even tiny deviations from >> zero or one. >> >> I have coded a scale according to matplotlib's documentation and it >> works well, so I was wondering whether you are interested into merging >> it into the the main repository. I think it'd be useful because lots of >> people have such frequency data, especially now that matplotlib is >> becoming popular in the biology/social sciences research communities. >> >> If there is interest, I'll just start a pull request on github and try >> to adapt the code to your coding style. It's already PEP8 and similia. >> >> Thanks. Cheers, >> Fabio >> >> ------------------------------__------------------------------__------------------ >> _________________________________________________ >> Matplotlib-devel mailing list >> Matplotlib-devel@lists.__sourceforge.net >> <mailto:Mat...@li...> >> https://lists.sourceforge.net/__lists/listinfo/matplotlib-__devel >> <https://lists.sourceforge.net/lists/listinfo/matplotlib-devel> >> > |