@@ -429,7 +429,7 @@ def trplot2(T, ax=None, dims=None, color='blue', frame=None, textcolor=None, lab
429
429
ax .quiver (o [0 ], o [1 ], x [0 ]- o [0 ], x [1 ]- o [1 ], angles = 'xy' , scale_units = 'xy' , scale = 1 , linewidth = width , facecolor = color , edgecolor = color )
430
430
ax .quiver (o [0 ], o [1 ], y [0 ]- o [0 ], y [1 ]- o [1 ], angles = 'xy' , scale_units = 'xy' , scale = 1 , linewidth = width , facecolor = color , edgecolor = color )
431
431
# plot an invisible point at the end of each arrow to allow auto-scaling to work
432
- ax .scatter ( x = [o [0 ], x [0 ], y [0 ]], y = [o [1 ], x [1 ], y [1 ]], s = [20 ,0 ,0 , 0 ])
432
+ ax .scatter ( x = [o [0 ], x [0 ], y [0 ]], y = [o [1 ], x [1 ], y [1 ]], s = [20 ,0 ,0 ])
433
433
else :
434
434
ax .plot ([o [0 ], x [0 ]], [o [1 ], x [1 ]], color = color , linewidth = width )
435
435
ax .plot ([o [0 ], y [0 ]], [o [1 ], y [1 ]], color = color , linewidth = width )
@@ -450,8 +450,10 @@ def trplot2(T, ax=None, dims=None, color='blue', frame=None, textcolor=None, lab
450
450
451
451
ax .text (x [0 ], x [1 ], "$%c_{%s}$" % (labels [0 ],frame ), color = color , horizontalalignment = 'center' , verticalalignment = 'center' )
452
452
ax .text (y [0 ], y [1 ], "$%c_{%s}$" % (labels [1 ], frame ), color = color , horizontalalignment = 'center' , verticalalignment = 'center' )
453
- except :
454
- pass
453
+
454
+ except : # pragma: no cover
455
+ def trplot2 (* args , ** kwargs ):
456
+ print ('** trplot2: no plot produced -- matplotlib not installed' )
455
457
456
458
if __name__ == '__main__' : # pragma: no cover
457
459
import pathlib
0 commit comments