Announcement

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

  • Using ixtitle with by()

    Hello Everyone,

    I am not able to find examples on how to specify the independent xtitles when using the "ixtitle" option in the "by()" option of the twoway graph.
    Could someone give me an example on how to do this?

    To be clear, I have a 3 variables that I am plotting on top of each other using a twoway graph, however, the observations for each of the variables are found in one of 3 subgroups. Therefore, I have 3 graphs (one for each subgroup), which I obtained using "by(subgroup)", with 3 variables each.
    In my xtitles I want to say something like "rate of X on 2017" However, each subgroup had the data taken a different year, so I want to be able to specify a different xtitle for each one of them. That is when I found that doing "by(subgroup, ixtitle)" allows me to have a separate xtitle for each, but I can't seem to find how to specify what the titles are.

    Thank you in advance,
    Guadalupe

  • #2
    If you show all titles, can you edit them independently with the Graph Editor?

    Comment


    • #3
      Yes. They are shown as "xaxis1[1]" "xaxis1[2]" and "xaxis1[3]" (with sub category "title" each), which I can edit, but I was wondering if it could be done through the code so that it can be automated

      Comment


      • #4
        That's a great question. I wonder if there is an FAQ on this topic, or if it is handled in documentation to the graph editor. I google searched for "stata graph editor code" and looked at this:

        https://www.stata.com/statalist/arch.../msg00838.html

        Comment


        • #5
          Thank you very much!!

          The commands turned out to be:

          gr_edit plotregion1.xaxis1[1].title.text = {}
          gr_edit plotregion1.xaxis1[1].title.text.Arrpush Whatever Title For First X Axis

          Comment

          Working...
          X