Announcement

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

  • Coloring specific distributions within a series of bar graphs

    In Stata 17, the command below has produced the attached bar graph, which has two "over" variables. For the second "over" variable, "algor" (algorithm), I would like to display the bar graphs associated with algor==4 (SUMS) and algor==5 (DA) in a different color from the first three sets of bar graphs (algor<4). More specifically, I would like the interior of the SUMS and DA sets of bar graphs to be hollow.

    Code:
    graph bar (mean) freqstudrank1st if stud_rank_rank1st==1 & four_employers==0, over(stud_pref_rank1st) over(algor) ytitle(Frequency) yscale(range(0(0.2)1.05)) title(Frequency Student reciprocates top rank by Preference and Algorithm in 5x5 markets, size(small))

    Any suggestions?

    While useful, this article does not address my question: https://www.stata-journal.com/sjpdf....iclenum=gr0049
    Attached Files

  • #2
    What do you mean by "hollow" bars? You can only have bars with no color; Stata does not do 3D graphics. Present a data example using the dataex command (see FAQ Advice #12 for details).

    Comment


    • #3
      Code:
      separate freqstudrank1st, by(algor >= 4) veryshortlabel
      
      graph bar (mean) freqstudrank1st? if stud_rank_rank1st==1 & four_employers==0, over(stud_pref_rank1st) over(algor) nofill ytitle(Frequency) yscale(range(0(0.2)1.05)) title(Frequency Student reciprocates top rank by Preference and Algorithm in 5x5 markets, size(small))
      may help.

      Comment


      • #4
        Thank you very much, Nick! It worked!

        Comment

        Working...
        X