If rotating by 90° or 270° the text object gets placed with some pixel trash like shown here:

CreateTextObject (1,"AP- Rate (Hz)")
RotateTextObject(1,90)
changing the rotation to other values (here: 91°) resolves that issue:

CreateTextObject (1,"AP- Rate (Hz)")
RotateTextObject(1,91)