help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Alternate way to rotate text on plot


From: Jdyer0618
Subject: Alternate way to rotate text on plot
Date: Thu, 10 Oct 2019 15:56:43 -0500 (CDT)

So, if you're answering this post, you probably know that there is nothing
special about rotating text in a matlab plot. The following code would work
just fine to rotate text and fill the text background in matlab:

x=1:10
y=2*x+3
x1=length(x)/2
y1=2*x1+3
txt_angle=60
plot(x,y)
txt=text(x1,y1,'YOUR TEXT','Rotation',txt_angle)
set(txt,'BackgroundColor','w')

The issue arises using Octave where graphics_toolkit("qt") only allows
horizontal or vertical rotation. There are no problems with the text
background color not appearing, just the rotation.

By using graphics_toolkit("gnuplot"), I can achieve the text rotation I
want, but the text background color doesn't appear and the graph has to be
square, I can't pull it like the graph I get using the default graphics
toolkit (maybe there's a fix for that). Also, it takes 2-3 times longer to
run the code using this graphics toolkit which is a real bummer since the
lines plot a lot cleaner for gnuplot. All of this brings me to the following
question:

1) Do any of you know of an alternate graphics toolkit that will allow both
rotation of text and a text background to be utilized in a plot? Ideally it
would run at or near the same speed as the default toolkit.

Your help is appreciated. 




--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]