Line2D visible in axes

Hi,

  I have an 'axes' and some Line2D instance 'line' which is part of

the axes artists.

  Suppose the plot has been zoomed so only a small window of the

original axes is visible. Is there a fast/convenient method that
can be used to test if a Line2D object is visible at the current
zoom level.

  Of course you can test with

data = line.get_xydata()

  (x_0, x_1) = axes.get_xlim()

  (y_0, y_1) = axes.get_ylim()

        invisible_x =

(data[:,0].max() < x_0) or (data[:,0].min() > x_1)

        invisible_y = (data[:,1].max() < y_0) or

(data[:,1].min() > y_1)

  but there might be something more convenient method/approach for

this.

  Best regards,

  Mads
···
-- +-----------------------------------------------------+
| Mads Ipsen |
+----------------------+------------------------------+
| Gåsebæksvej 7, 4. tv | |
| DK-2500 Valby | phone: +45-29716388 |
| Denmark | email: |
+----------------------+------------------------------+

mads.ipsen@…287…