obspy/obspy — pull request #734 by leouieda (2014-02-16 17:28:32+00:00)
Title: Maintain beach ball aspect ratio

Plotting beach balls in non-scaled axis results in elliptical beach balls. This could be fixed by passing a height argument but this approach fails when resizing the plot.

The solution I found is to add a `matplotlib.transforms.IdentityTransform` to the patches collection produced by `Beach`. However, this breaks the positioning of the beach balls. A workaround was possible by translating all paths to the origin [0, 0] and using the `offsets` and `transOffset` properties of matplotlib `Collections` to set the positions of the beach balls. This required the `transData` attribute of the `Axes` instance of the plot. So an 'axes=None' keyword argument as added to `Beach` to enable this functionality.

I added test cases for:
* x 100x larger than y
* y 100x larger than x
* both above but given a height argument 0.5x the width for elliptical beach balls

This is what the test case looked like **without** the `axes` kwarg:

![bb_collection_aspect_y](https://f.cloud.github.com/assets/290082/2180777/1ff5c10a-972f-11e3-88b6-96083fae4455.png)

and now **with** `axes`:

![bb_collection_aspect_y](https://f.cloud.github.com/assets/290082/2180778/33ccf69e-972f-11e3-942f-d8d504001381.png)

Solution largely inspired by [matplotlib.pyplot.scatter](https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/axes/_axes.py#L3378).