[matplotlib-devel] colorbar extension size

2011-11-16 Thread Andrew Dawson
I would like some feedback on a new feature I have developed to control the
length of colorbar extension triangles. This is a feature I have desired
for some time, so that the plots I produce with matplotlib can be more
consistent with those produced from other popular plotting software (e.g.,
IDL). I have added a new keyword argument, extendfrac, to the ColorbarBase
class. This may be set to a scalar, a two-tuple, the string 'auto', or  the
string 'default'. The behaviour of this keyword depends on the setting of
the existing spacing keyword argument.

For spacing='uniform' or spacing='proportional':
extendfrac=None - sets the lengths of both the minimum and maximum
colorbar extension triangles to 0.05 times the interior colorbar length
(the existing hard-coded setting).
extendfrac='default' - same as None.
extendfrac=FRACTION - sets the lengths of both the minimum and maximum
colorbar extension triangles to the given fraction of the interior colorbar
length.

For spacing='uniform':
extendfrac='auto' - sets the lengths of both the minimum and maximum
colorbar extension triangles to be the same as the length of the interior
boxes.

For spacing='proportional':
extendfrac='auto' - sets the length of the minimum colorbar extension
triangle to the length of the left/bottom-most interior box, and the length
of the maximum colorbar extension triangle to the length of the
right/top-most interior box.
extendfrac=(FRACTION1, FRACTION2) - as for FRACTION above but the
minimum and maximum extension triangles may be different lengths.

This is quite a small modification actually, but it does change the API for
colorbars. I am wondering if this could be included in matplotlib? I have
set up a fork of matplotlib on Github to implement this feature, if anyone
thinks it is worth it...

Andrew
--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] Heads-up: master badly broken, syntaxerror in setup.py

2011-11-16 Thread Fernando Perez
(master)longs[matplotlib]> python setup.py
  File "setup.py", line 281
(float(i) / len(filtered) * 100.0), end='\r')
   ^
SyntaxError: invalid syntax


Sorry, can't debug it right now...

f

--
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Heads-up: master badly broken, syntaxerror in setup.py

2011-11-16 Thread Jens Nielsen
It works in python3

The python statement in python2.7 (and 2.6) does not support the end argument.
Adding a "from __future__ import print_function" to the beginning of
setup.py seems to fix it.

Greetings Jens

On Thu, Nov 17, 2011 at 5:03 AM, Fernando Perez  wrote:
> (master)longs[matplotlib]> python setup.py
>  File "setup.py", line 281
>    (float(i) / len(filtered) * 100.0), end='\r')
>                                           ^
> SyntaxError: invalid syntax
>
>
> Sorry, can't debug it right now...
>
> f
>
> --
> All the data continuously generated in your IT infrastructure
> contains a definitive record of customers, application performance,
> security threats, fraudulent activity, and more. Splunk takes this
> data and makes sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-novd2d
> ___
> Matplotlib-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>

--
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel