New spines capabilities question

I think this happens in all mpl graphs, you just don’t see it. The

axis limits are set to -2…2, and the sine is draw from -2…2. The

linewidth extends beyond 2, so it is clipped by the axes clipping to

the bounding rectangle. Normally you don’t see this, because visually

it is under the surrounding axes black edge.

Yes, I saw that it looks like it happens under the axes clipping.

You can either set the

ylimits wider:
ax.set_ylim(-2.1, 2.1)

But would this also make the spine have the larger limits? Basically, I want know if the spines can be used to create Tufte-style range-frames. Am I correct in thinking that these spines provide that? Or is there another way to get a range-frame?

or turn clipping off

ax.plot(x,y, clip_on=False)

This looks hopeful and I will give it a shot.

Cheers,

Brian

Brian Granger wrote:

    I think this happens in all mpl graphs, you just don't see it. The
    axis limits are set to -2..2, and the sine is draw from -2..2. The
    linewidth extends beyond 2, so it is clipped by the axes clipping to
    the bounding rectangle. Normally you don't see this, because visually
    it is under the surrounding axes black edge.

Yes, I saw that it looks like it happens under the axes clipping.

    You can either set the
    ylimits wider:

      ax.set_ylim(-2.1, 2.1)

But would this also make the spine have the larger limits? Basically, I want know if the spines can be used to create Tufte-style range-frames. Am I correct in thinking that these spines provide that?

Although I don't have a precise definition of "Tufte-style range frame"to go by, I think my intention was to do exactly what you're after.

I don't know how hard it would be to automatically increase the clipping box size by the size (line width or marker size, including edge width) of any artists on the border -- I imagine it may require querying backends in a way they don't currently support. I'll talk about this with John at SciPy 09.

  Or is there another way to get a range-frame?

    or turn clipping off

     ax.plot(x,y, clip_on=False)

This looks hopeful and I will give it a shot.

That's what I've been doing.

One thing you want with range frames is to have the length of the
spine equal the span of your dataset. Can we currently or with not
too much effort define the line segment of the spine to be in data
coords? Then we could make the axes as wide as we want with the ylim
to maintain the clipping region, but the spine would cover just the
span of the data (or whatever the user specified) rather than always
being ymin...ymax if it is defined as 0..1 in axes coords.

JDH

···

On Fri, Aug 7, 2009 at 11:54 AM, Andrew Straw<strawman@...36...> wrote:

But would this also make the spine have the larger limits? Basically,
I want know if the spines can be used to create Tufte-style
range-frames. Am I correct in thinking that these spines provide that?

Although I don't have a precise definition of "Tufte-style range
frame"to go by, I think my intention was to do exactly what you're after.

John Hunter wrote:

But would this also make the spine have the larger limits? Basically,
I want know if the spines can be used to create Tufte-style
range-frames. Am I correct in thinking that these spines provide that?
      

Although I don't have a precise definition of "Tufte-style range
frame"to go by, I think my intention was to do exactly what you're after.
    
One thing you want with range frames is to have the length of the
spine equal the span of your dataset. Can we currently or with not
too much effort define the line segment of the spine to be in data
coords?

This is implemented in r8044.

Then we could make the axes as wide as we want with the ylim
to maintain the clipping region, but the spine would cover just the
span of the data (or whatever the user specified) rather than always
being ymin...ymax if it is defined as 0..1 in axes coords.
  

Currently, if you want to limit the spine range, you'll have to call
spine.set_bounds(low,high) manually. I think one would almost always
want the spine endpoints at tick locations, so perhaps a better default
behavior than we now have is that in any case in which the spines are
not forming an old-style axes frame, they are automatically limited to
the outermost ticks. I haven't implemented that, but I don't think it
would be too hard to build on top of what I just committed.

-Andrew

···

On Fri, Aug 7, 2009 at 11:54 AM, Andrew Straw<strawman@...36...> wrote: