On 4/6/07, Eric Firing <[EMAIL PROTECTED]> wrote:

> The size argument, s, is given in squared points; that is, it is a
> measure of area, not of linear dimensions.
>
> This strikes me as counterintuitive and not particularly useful.  It
> seems more natural that the size be a linear dimension; if a user wants
> size to vary with area, the user can pass in the square root of the area.
>
> Would anyone object to this change?  How strenuously?  I am not actually

This strikes me as a foolish consistency that may be best to live
with.  The basic scatter signature is the same as matlab's, which also
uses size in points squared.  It has never been intuitive to me
either, but I simply slavishly followed their convention.  By now we
have three constituencies who may find a change  irksome: current
users who have written code around the long-standing implementation,
prospective users coming from matlab who will find it confusing that
the signature is otherwise the same as matlab's but the size argument
is different, and developers who have to update the code, the
examples, the website screenshots, and the user's guide.

Since this irksome, somewhat counter-intuitive feature is well
documented, it seems preferable to me to let people simply square
their sizes for scatter and not break anyone's code.  It's not too
hard to do

  r = 10*rand(20)  # radii
  scatter(x, y, 2*pi*r**2)

Maybe we should simply add an example like the one above to the docstring.

Now there are those who are dusting off their pens as I type, getting
ready to point out that we should not slavishly follow matlab but
rather do the best thing possible.  Fair enough.  But we should also
be hesitant to break the API and existing code to fix a minor
annoyance that is easy to work around.  I think one thing that has
contributed to the success of matplotlib is that the API has been
extremely stable.

Code written against mpl 0.1 for the most part still runs, though
maybe an import statement needs to be changed (replace
matplotlib.matlab with matplotlib.pylab).  The major reason for this
is that we emulated matlab's API from the start.  In many cases we've
extended the matlab functionality significantly, particularly with all
of the stuff we do with keyword args, but we have rarely if ever
removed matlab compatibility once it was in place.  Hence people who
wrote their code against the original matlab-like API can still use
their code now.

JDH

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to