@image_comparison(baseline_images=[u'EventCollection_plot__set_positions'])
def test__EventCollection__set_positions():
 (splt, coll, props) = generate_EventCollection_plot()
 new_positions = np.hstack([props[u'positions'], props[u'extra_positions']])
 coll.set_positions(new_positions)
 np.testing.assert_array_equal(new_positions, coll.get_positions())
 check_segments(coll, new_positions, props[u'linelength'], props[u'lineoffset'], props[u'orientation'])
 splt.set_title(u'EventCollection: set_positions')
 splt.set_xlim((-1), 90)

@ image_comparison ( baseline_images = [ u'EventCollection_plot__set_positions' ] ) def test__EventCollection__set_positions ( ) : ( splt , coll , props ) = generate_EventCollection_plot ( ) new_positions = np . hstack ( [ props [ u'positions' ] , props [ u'extra_positions' ] ] ) coll . set_positions ( new_positions ) np . testing . assert_array_equal ( new_positions , coll . get_positions ( ) ) check_segments ( coll , new_positions , props [ u'linelength' ] , props [ u'lineoffset' ] , props [ u'orientation' ] ) splt . set_title ( u'EventCollection: set_positions' ) splt . set_xlim ( ( - 1 ) , 90 )
check to make sure set_positions works properly .