@@ -2330,8 +2330,8 @@ def _vec2s(fmt, v):
2330
2330
2331
2331
def trplot (T , axes = None , block = False , dims = None , color = 'blue' , frame = None , # pylint: disable=unused-argument,function-redefined
2332
2332
textcolor = None , labels = ('X' , 'Y' , 'Z' ), length = 1 , style = 'arrow' ,
2333
- originsize = 20 , origincolor = None , projection = 'ortho' , wtl = 0.2 , width = None , d1 = 0.05 ,
2334
- d2 = 1.15 , anaglyph = None , ** kwargs ):
2333
+ originsize = 20 , origincolor = None , projection = 'ortho' , wtl = 0.2 , width = None ,
2334
+ d2 = 1.15 , flo = ( - 0.05 , - 0.05 , - 0.05 ), anaglyph = None , ** kwargs ):
2335
2335
"""
2336
2336
Plot a 3D coordinate frame
2337
2337
@@ -2371,8 +2371,11 @@ def trplot(T, axes=None, block=False, dims=None, color='blue', frame=None, # p
2371
2371
:type projection: str
2372
2372
:param width: width of lines, default 1
2373
2373
:type width: float
2374
- :param d1: distance of frame axis label text from origin, default 1.15
2375
- :type d2: distance of frame label text from origin, default 0.05
2374
+ :param flo: frame label offset, a vector for frame label text string relative
2375
+ to frame origin, default (-0.05, -0.05, -0.05)
2376
+ :type flo: array_like(3)
2377
+ :param d2: distance of frame axis label text from origin, default 1.15
2378
+ :type d2: float
2376
2379
:return: axes containing the frame
2377
2380
:rtype: Axes3DSubplot
2378
2381
:raises ValueError: bad arguments
@@ -2494,7 +2497,7 @@ def trplot(T, axes=None, block=False, dims=None, color='blue', frame=None, # p
2494
2497
trplot (Tk , axes = ax , block = block , dims = dims , color = color , frame = frame ,
2495
2498
textcolor = textcolor , labels = labels , length = length , style = style ,
2496
2499
projection = projection , originsize = originsize , origincolor = origincolor , wtl = wtl , width = width , d1 = d1 ,
2497
- d2 = d2 , anaglyph = anaglyph , ** kwargs )
2500
+ d2 = d2 , flo = flo , anaglyph = anaglyph , ** kwargs )
2498
2501
return
2499
2502
2500
2503
if dims is not None :
@@ -2540,7 +2543,7 @@ def trplot(T, axes=None, block=False, dims=None, color='blue', frame=None, # p
2540
2543
else :
2541
2544
origincolor = 'black'
2542
2545
2543
- o1 = T @ np .array ([ - d1 , - d1 , - d1 , 1 ])
2546
+ o1 = T @ np .array (np . r_ [ flo , 1 ])
2544
2547
ax .text (o1 [0 ], o1 [1 ], o1 [2 ], r'$\{' + frame + r'\}$' , color = textcolor , verticalalignment = 'top' , horizontalalignment = 'center' )
2545
2548
2546
2549
# add the labels to each axis
0 commit comments