On Wed, Sep 7, 2011 at 12:09 AM, Jeffrey Spencer <jef...@gm...> wrote:
> Can I specify horizontal or vertical clipping?? Or what is the best way to
> get around this?
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)
|