Figure clipping incorrectly ; specify whether clips horizontally or vertically

I made the plot below but I don't want it to clip at the top because cuts off half of the boxes at the top. So it ends up looking a little weird when it goes flat. Then I turn clipping off and since the lines go outside they trail off past the graph. Can I specify horizontal or vertical clipping?? Or what is the best way to get around this?

220ActSteps.png

···

--
________________________
Jeffrey Spencer
jeffspencerd@...287...

my understanding is that the clipping is done with a "closed" path. so
I don't think one can do such thing as horizontal clipping, etc. I
guess one way is to simply increase the size of the clipping box
toward the direction you want. Here is a simple example,

Regards,

-JJ

x = np.arange(0, 8, 0.01)
y = np.sin(x)

ax = subplot(111)
l1, = plot(x, y, lw=4)

import matplotlib.transforms as mtransforms

bbox_ = mtransforms.Bbox.from_bounds(0, 0, 1., 1 + 0.1) # increase the height
bbox = mtransforms.TransformedBbox(bbox_, ax.transAxes)

l1.set_clip_box(bbox)

···

On Wed, Sep 7, 2011 at 12:09 AM, Jeffrey Spencer <jeffspencerd@...287...> wrote:

Can I specify horizontal or vertical clipping?? Or what is the best way to
get around this?