Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Setting angles other than vertical/horizontal for graph object (added text)

    Dear Statalist,

    I am currently working on a graph that requires me to angle a text object. The label works okay being vertical, but I was wondering if there is any way to set these objects to other angles, like 45 degrees, or even in a continuous way?

    Attached below is the graph in question, where I would prefer to rotate the label of "Partille" a smidgeon.
    Click image for larger version

Name:	Skärmklipp.PNG
Views:	1
Size:	29.4 KB
ID:	1703231





    Code used to add and edit the object:

    gr_edit .plotregion1.AddTextBox added_text editor 6402717.572242864 328032.4757764266
    gr_edit plotregion1.added_text_new = 1
    gr_edit plotregion1.added_text_rec = 1
    gr_edit plotregion1.added_text[1].text = {}
    gr_edit plotregion1.added_text[1].text.Arrpush Partille
    gr_edit plotregion1.added_text[1]._set_orientation vertical
    gr_edit plotregion1.added_text[1].style.editstyle size(1.25) editcopy


    Any help would be greatly appreciated. Or is there another way of going about this? For example, can you piggyback off the "angle0" option of a pie chart to make it work?

    Sincerely
    Johan Karlsson
    Last edited by Johan Karlsson; 24 Feb 2023, 02:39.
Working...
X