Uri Laserson, on 2011-01-16 17:41,  wrote:
> Hi all,
> 
> Does there already exist some python implementation (in MPL or other) of an
> easy-to-use 1D scale transformation?  This is something analogous to
> processing's map function or protovis's scale functionality.  It would work
> something like:
> 
> s = linear().domain(5,100).range(13000,15000)
> 
> or
> 
> s = root(p=5).domain(0.1,0.6).range(0,1)
> 
> There could be multiple versions, including linear, log, symlog, root
> (power), discrete, etc.

Hi Uri,

I think that the closest we have matplotlib is
matplotlib.colors.Normalize[1] and matplotlib.colors.LogNorm[2], but
both of these have a fixed range of the 0-1 (which is the reason
they are in colors). Both of these do end up with an inverse
method that you could leverage to get an arbitrary range, though.

1. 
http://matplotlib.sourceforge.net/api/colors_api.html#matplotlib.colors.Normalize
2. 
http://matplotlib.sourceforge.net/api/colors_api.html#matplotlib.colors.LogNorm

-- 
Paul Ivanov
314 address only used for lists,  off-list direct email at:
http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 

Attachment: signature.asc
Description: Digital signature

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to