Announcement

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

  • Dividing legend in two lines (half on the first and half on the next)

    Hi,

    I generated stack bar graph using the code mentioned below. Everything seems fine expect appearance of legend. The legend mentioned in code is very long. After reducing its size it appears too small. Is there any way/option through which I can divide my legend text in two lines?

    graph bar x5* if group==1, over(xcat, label(labsize(small)) relabel(1 "All union union" 2 "1-50%" 3 "51-99%" 4 "All black union")) percent stack ///
    title("Representation of Minorities on organization" "And Participation in National Civil Society Convention ") ///
    legend(label(1 "Participated in Civil Society Convention") label(2 "Not participated in Civil Society convention") size(vsmall))


    Thanks,
    Abbas

  • #2
    Code:
    legend(label(1 "Participated in Civil Society Convention") label(2 "Not participated in Civil Society convention") size(vsmall) col(1))
    Roman

    Comment


    • #3
      You could factor out "Participated in Civil Society Convention?" and put it somewhere else, e.g. a subtitle, a note, or a caption. You are also losing some real estate through a long title. The title could be split into axis titles. Your graph, but the point is that you have several ways of cutting down text.

      Comment

      Working...
      X