I have angled some test to be parallel to the slope of a line. It tuns out that the text is only parallel if scaling = constrained is used. That is not necasserily pratical for many plots. In prcttice I have a nice proedure for this. Is there any way to pickup the plot x-y scaling factor that maple decides on so I could built that into the procedure. I have manually rescaled her to demonstrate.
mmm...I see the website viewer does not rotate the text.
![[3/2, 1]](/view.aspx?sf=239211_question/79e62a7608d041b1fe486f323c3fb674.gif)
|
(1) |
> |
ang:=arctan(vec[2],vec[1])
|

|
(2) |
> |
plt1:=textplot([((P1+P2+[.2,.2])/2)[],"parallel piece of text",rotation=ang]):
|
> |
plt2:=plottools:-line(P1,P2):
|
> |
display(plt1,plt2,scaling=constrained)
|
> |
#scaling factor looks to be 1.5 i.e.delta(x)/delta(y) (2.5-1)/{3/2)
|
> |
ang1:=arctan(1.5*vec[2],vec[1])
|

|
(3) |
> |
plt3:=textplot([((P1+P2+[.2,.2])/2)[],"parallel piece of text",rotation=ang1]):
|
|
Download 2024-10-15_text_not_always_parallel.mw