Question: Angled textplot. Can angle be scaled with plot display?

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.

restart

with(plots):

P1:=[1,2]:P2:=[5/2,3]:

vec:=P2-P1

[3/2, 1]

(1)

ang:=arctan(vec[2],vec[1])

arctan(2/3)

(2)

plt1:=textplot([((P1+P2+[.2,.2])/2)[],"parallel piece of text",rotation=ang]):

plt2:=plottools:-line(P1,P2):

display(plt1,plt2)

 

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])

.7853981634

(3)

plt3:=textplot([((P1+P2+[.2,.2])/2)[],"parallel piece of text",rotation=ang1]):

display(plt3,plt2)

 
 

 

Download 2024-10-15_text_not_always_parallel.mw

Please Wait...