On Mon, Mar 15, 2010 at 3:16 PM, klukas <klu...@wisc.edu> wrote:
>
> It's my understanding that there is no built-in method for generating a
> "broken axis" (where you skip over some range of values, indicating this
> with some graphical mark).  I wanted to do this, so I've put together a
> function which seems to be fairly robust, and I thought I might propose it
> as a starting point if there's interest in having a built-in facility for
> broken axes.
>
> Please let me know if this is not the appropriate place to be submitting
> this suggestion.

This is a nice start of an oft requested feature, and we are
definitely interested.  It is enabled by the spine contribution of
Andrew, so you can turn off the upper and lower spines between the
break, so it is nice to see some unintended benefits of his
refactoring.

>From a usability standpoint, one thing we try to do is make pyplot a
thin wrapper around functionality that exists in the API proper in
matplotlib.figure, matplotlib.axes, etc.  Functionally and in terms of
implementation, this broken axes implementation is in the style of
"twinx" which makes two axes for plotting on different scales

  http://matplotlib.sourceforge.net/examples/api/two_scales.html
  http://matplotlib.sourceforge.net/api/axes_api.html#matplotlib.axes.Axes.twinx
  http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.twinx

What would be great is if you could refactor the basic functionality
into a matplotlib.Axes.breaky method (and possibly breakx but most
people request a broken y axis), which would resize the "self" axes
and return the broken compliment which could be plotted onto.  Then
you could provide a thin pyplot wrapper much like pyplot.twinx, so
that pyplot as well as API users could benefit.

Finally, an svn patch which provided an example and patches to axes.py
and pyplot.py would be most helpful.

http://matplotlib.sourceforge.net/faq/howto_faq.html#submit-a-patch

An alternative implementation could craft a custom transform using
some custom artists for spines, but this might be a good bit harder.
Do you have an opinion Andrew on this approach?

JDH

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to