[matplotlib-devel] idea for a matplotlib figure contest (in memoriam John Hunter)

2012-08-30 Thread Andrew Straw
Hi all,

Shocked by news of John Hunter's untimely severe health problems and now 
death, I have been thinking about what we could do as a community to 1) 
fuel matplotlib to further heights and 2) give everyone, but especially 
John's family, some appreciation for how wide, and ongoing, his impact 
is. To those ends, I envision an MPL figure contest.

I have a lot of ideas about the shape such a contest could take (it 
could be an annual event, have multiple categories, have corporate 
sponsored prizes, and so on). Ultimately, however, I simply don't have 
the time to organize the contest myself. I do see this as an ideal 
project for someone who wants to contribute to the MPL community without 
necessarily requiring in-depth technical skills. Consequently, I'm 
floating this idea here, and I hope someone in the community can run 
with it. You would certainly have figure submissions from my lab!

Best regards,
Andrew

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] idea for a matplotlib figure contest (in memoriam John Hunter)

2012-08-30 Thread Phil Elson
What a great idea! Perhaps we could arrange judging at the annual SciPy
conference (or similar) with printouts of all the submissions.
This would be a great opportunity for everybody in the community to see the
broad and diverse usage of matplotlib globally, and an even greater
opportunity to reflect on the amazing work that John did on bringing this
fantastic community together.

Regards,


On 30 August 2012 08:58, Andrew Straw  wrote:

> Hi all,
>
> Shocked by news of John Hunter's untimely severe health problems and now
> death, I have been thinking about what we could do as a community to 1)
> fuel matplotlib to further heights and 2) give everyone, but especially
> John's family, some appreciation for how wide, and ongoing, his impact
> is. To those ends, I envision an MPL figure contest.
>
> I have a lot of ideas about the shape such a contest could take (it
> could be an annual event, have multiple categories, have corporate
> sponsored prizes, and so on). Ultimately, however, I simply don't have
> the time to organize the contest myself. I do see this as an ideal
> project for someone who wants to contribute to the MPL community without
> necessarily requiring in-depth technical skills. Consequently, I'm
> floating this idea here, and I hope someone in the community can run
> with it. You would certainly have figure submissions from my lab!
>
> Best regards,
> Andrew
>
>
> --
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> ___
> Matplotlib-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] Fwd: Patch: set capsize of errorbar via matplotlibrc

2012-08-30 Thread Hans Dembinski

Dear developers,

I submitted a patch a few weeks ago that I think would be useful to have 
in the matplotlib, but I didn't get any response. I use the library 
extensively for science work and would like to be able to contribute to 
this great project.


Since I didn't get any responses, I would like to know what you want me 
to do in order to get my ideas into the project. I cannot commit much 
time, but I am sure I will find little neat pieces to add every now and 
then.


Please allow me to participate.

 Original Message 
Subject: Patch: set capsize of errorbar via matplotlibrc
Date: Thu, 09 Aug 2012 14:10:27 +0200
From: Hans Dembinski 
To: [email protected]

Hi fellow developers,

I am using matplotlib in particle physics where we generally do not plot
the little end caps of error bars. They add no information, but they
make the plot harder to read, especially if it is a busy plot.

In physics, we follow the general aesthetic rule to maximise the "data
to ink ratio", which means that the information should be presented with
a minimum of optical gimmicks.

So, I end up calling errorbar everytime with capsize=0. I argue that
having end caps or not is a global style option, and therefore it makes
sense to put this into matplotlibrc.

I prepared a patch in order to do that and would like you to include it
into the distribution.

Please tell me what you think of it.



>From cbb2df219068a51ee1556a9318b39d19224bc10e Mon Sep 17 00:00:00 2001
From: Hans Dembinski 
Date: Thu, 9 Aug 2012 14:02:17 +0200
Subject: [PATCH] get capsize via configuration entry lines.capsize

---
 lib/matplotlib/axes.py|   12 +++-
 lib/matplotlib/rcsetup.py |1 +
 matplotlibrc.template |1 +
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/lib/matplotlib/axes.py b/lib/matplotlib/axes.py
index d2dec62..f29decb 100644
--- a/lib/matplotlib/axes.py
+++ b/lib/matplotlib/axes.py
@@ -4604,7 +4604,7 @@ class Axes(martist.Artist):
   *yerr*if not None, will be used to generate
 errorbars on the bar chart
   *ecolor*  specifies the color of any errorbar
-  *capsize* (default 3) determines the length in
+  *capsize* determines the length in
 points of the error bar caps
   *error_kw*dictionary of kwargs to be passed to
 errorbar method. *ecolor* and *capsize*
@@ -4652,7 +4652,7 @@ class Axes(martist.Artist):
 yerr = kwargs.pop('yerr', None)
 error_kw = kwargs.pop('error_kw', dict())
 ecolor = kwargs.pop('ecolor', None)
-capsize = kwargs.pop('capsize', 3)
+capsize = kwargs.pop('capsize', None)
 error_kw.setdefault('ecolor', ecolor)
 error_kw.setdefault('capsize', capsize)
 
@@ -4882,7 +4882,7 @@ class Axes(martist.Artist):
   *yerr*if not None, will be used to generate
 errorbars on the bar chart
   *ecolor*  specifies the color of any errorbar
-  *capsize* (default 3) determines the length in
+  *capsize* determines the length in
 points of the error bar caps
   *align*   'edge' (default) | 'center'
   *log* [False|True] False (default) leaves the
@@ -5175,14 +5175,14 @@ class Axes(martist.Artist):
 
 @docstring.dedent_interpd
 def errorbar(self, x, y, yerr=None, xerr=None,
- fmt='-', ecolor=None, elinewidth=None, capsize=3,
+ fmt='-', ecolor=None, elinewidth=None, capsize=None,
  barsabove=False, lolims=False, uplims=False,
  xlolims=False, xuplims=False, errorevery=1, **kwargs):
 """
 Call signature::
 
   errorbar(x, y, yerr=None, xerr=None,
-   fmt='-', ecolor=None, elinewidth=None, capsize=3,
+   fmt='-', ecolor=None, elinewidth=None, capsize=None,
barsabove=False, lolims=False, uplims=False,
xlolims=False, xuplims=False)
 
@@ -5337,6 +5337,8 @@ class Axes(martist.Artist):
 ys = [thisy for thisy, b in zip(ys, mask) if b]
 return xs, ys
 
+if capsize is None:
+  capsize = rcParams['lines.capsize']
 
 if capsize > 0:
 plot_kw = {
diff --git a/lib/matplotlib/rcsetup.py b/lib/matplotlib/rcsetup.py
index 6df1d4b..e3d3b85 100644
--- a/lib/matplotlib/rcsetup.py
+++ b/lib/matplotlib/rcsetup.py
@@ -379,6 +379,7 @@ defaultParams = {
 'lines.solid_joinstyle' : ['round', validate_joinstyle],
 'lines.dash_capstyle'   : ['butt', validate_capstyle],
 'lines.solid_capstyle'  : ['projecting', validate_capstyle],
+'lines.capsize' : [3, validate_int],
 
 # patch props
 'patch.linewidth'   : [1.0, validate_float], # line width in points
diff --git a/matp

Re: [matplotlib-devel] idea for a matplotlib figure contest (in memoriam John Hunter)

2012-08-30 Thread Michael Droettboom
Yes, this is a great idea, and I think SciPy is a great forum for it.  
I'll coordinate with next year's organizers and see if we can't add this 
as a new category along with the paper submissions.


Mike

On 08/30/2012 04:58 AM, Phil Elson wrote:
What a great idea! Perhaps we could arrange judging at the annual 
SciPy conference (or similar) with printouts of all the submissions.
This would be a great opportunity for everybody in the community to 
see the broad and diverse usage of matplotlib globally, and an even 
greater opportunity to reflect on the amazing work that John did on 
bringing this fantastic community together.


Regards,


On 30 August 2012 08:58, Andrew Straw > wrote:


Hi all,

Shocked by news of John Hunter's untimely severe health problems
and now
death, I have been thinking about what we could do as a community
to 1)
fuel matplotlib to further heights and 2) give everyone, but
especially
John's family, some appreciation for how wide, and ongoing, his impact
is. To those ends, I envision an MPL figure contest.

I have a lot of ideas about the shape such a contest could take (it
could be an annual event, have multiple categories, have corporate
sponsored prizes, and so on). Ultimately, however, I simply don't have
the time to organize the contest myself. I do see this as an ideal
project for someone who wants to contribute to the MPL community
without
necessarily requiring in-depth technical skills. Consequently, I'm
floating this idea here, and I hope someone in the community can run
with it. You would certainly have figure submissions from my lab!

Best regards,
Andrew


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond.
Discussions
will include endpoint security, mobile security and the latest in
malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Matplotlib-devel mailing list
[email protected]

https://lists.sourceforge.net/lists/listinfo/matplotlib-devel




--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/


___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] possible bug in quiver

2012-08-30 Thread David Raymond

Eric,

OK, that seems to work.  I tried something with scale_units earlier
without success, but I must have been doing something wrong.

Thanks for the help.

Dave

 > On 2012/08/29 10:07 AM, David Raymond wrote:
 > >
 > > I think that I have found a serious bug in vector plotting (quiver)
 > > when the "angle=xy" option is used on a plot with a large aspect
 > > ratio.  It is my understanding that with this option, the vector with
 > > tail at (x,y) would have its head at (x + vx,y + vy); at least this is
 > > what it says in the documentation.
 > 
 > Not a bug.
 > Note this in the documentation:
 > 
 >*scale_units*: *None*, or any of the *units* options.
 >  For example, if *scale_units* is 'inches', *scale* is 2.0, and
 >  ``(u,v) = (1,0)``, then the vector will be 0.5 inches long.
 >  If *scale_units* is 'width', then the vector will be half the width
 >  of the axes.
 > 
 >  If *scale_units* is 'x' then the vector will be 0.5 x-axis
 >  units.  To plot vectors in the x-y plane, with u and v having
 >  the same units as x and y, use
 >  "angles='xy', scale_units='xy', scale=1".
 > 
 > Try this modified call to quiver:
 > 
 > q = plt.quiver(X, Y, vx, vy, angles='xy', scale_units='xy')
 > 
 > Eric

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Fwd: Patch: set capsize of errorbar via matplotlibrc

2012-08-30 Thread Eric Firing
On 2012/08/29 11:57 PM, Hans Dembinski wrote:
> Dear developers,
>
> I submitted a patch a few weeks ago that I think would be useful to have
> in the matplotlib, but I didn't get any response. I use the library
> extensively for science work and would like to be able to contribute to
> this great project.

Good!

>
> Since I didn't get any responses, I would like to know what you want me
> to do in order to get my ideas into the project. I cannot commit much
> time, but I am sure I will find little neat pieces to add every now and
> then.

Submitting patches as github pull requests is strongly preferred.  See 
http://matplotlib.sourceforge.net/devel/index.html.

In the svn days, most devel discussions of proposed changes occurred on 
this mailing list, but now attention is much more on github PRs and less 
on the mailing list.

>
> Please allow me to participate.

We welcome you--but sometimes we are simply overwhelmed and/or 
unorganized, and consequently unresponsive.  There is a random aspect to it!

Regarding your patch: this sounds like it might be a good idea, but I 
don't think the rc param should be called lines.capsize because it is 
not a general line property, but something specific to errorbars. 
"lines.*cap*" refer to completely unrelated general line properties.

It would be good to get some thoughts from others as to whether to an 
"errorbar" or similar category should be added to rcParams, with your 
suggestion as the first entry in that category.  Maybe we need some 
policy guideline as to what should go in rcParams and what should not.

Eric

>
>  Original Message 
> Subject: Patch: set capsize of errorbar via matplotlibrc
> Date: Thu, 09 Aug 2012 14:10:27 +0200
> From: Hans Dembinski 
> To: [email protected]
>
> Hi fellow developers,
>
> I am using matplotlib in particle physics where we generally do not plot
> the little end caps of error bars. They add no information, but they
> make the plot harder to read, especially if it is a busy plot.
>
> In physics, we follow the general aesthetic rule to maximise the "data
> to ink ratio", which means that the information should be presented with
> a minimum of optical gimmicks.
>
> So, I end up calling errorbar everytime with capsize=0. I argue that
> having end caps or not is a global style option, and therefore it makes
> sense to put this into matplotlibrc.
>
> I prepared a patch in order to do that and would like you to include it
> into the distribution.
>
> Please tell me what you think of it.
>
>
>
>
>
> --
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>
>
>
> ___
> Matplotlib-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Fwd: Patch: set capsize of errorbar via matplotlibrc

2012-08-30 Thread Benjamin Root
On Thu, Aug 30, 2012 at 5:57 AM, Hans Dembinski wrote:

> Dear developers,
>
> I submitted a patch a few weeks ago that I think would be useful to have
> in the matplotlib, but I didn't get any response. I use the library
> extensively for science work and would like to be able to contribute to
> this great project.
>
> Since I didn't get any responses, I would like to know what you want me to
> do in order to get my ideas into the project. I cannot commit much time,
> but I am sure I will find little neat pieces to add every now and then.
>
> Please allow me to participate.
>
>
Sorry for the lack of a response.  We have been absolutely swamped with the
push for v1.2.0, and your email must have gotten lost in the pile.  Note,
repinging us as you have done is the absolutely correct thing to do.

Looking over your patch, the goal is sound, but the name of the rcparam you
choose would likely cause confusion.  "line.capsize" and "line.capstyle",
for instance, are referring to two completely different things that just
happens to have the same name "cap".  There are a lot of kwargs in axes.py
that have yet to be included into the rcparams, and we really need to push
to do this, but in a sensible and structured manner.

Anybody have thoughts on updating the naming scheme of the rc-params?

Ben Root
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel