Hi Stata Community,
I am use this sample dataset.
I created a bar chart using this code.
The course titles on the left side of the chart are centered aligned. How do you right align the titles? Thank you.
I am use this sample dataset.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str75 top4_title float(freq index total) "General Work Experience " 990 1 4405 "Business And Commerce, General " 383 2 4405 "English " 287 3 4405 "Child Development/Early Care And Education " 285 4 4405 "Business Management " 245 5 4405 "General Studies " 201 6 4405 "Nutrition, Foods, And Culinary Arts " 162 7 4405 "Business Administration " 152 8 4405 "Education, General " 140 9 4405 "Health Occupations, General " 121 10 4405 "Computer Software Development " 97 11 4405 "Psychology, General " 94 12 4405 "Administration Of Justice " 93 13 4405 "Art " 80 14 4405 "Hospitality " 74 15 4405 "Computer Information Systems " 68 16 4405 "Economics " 63 17 4405 "Photography " 55 18 4405 "Digital Media " 53 19 4405 "Automotive Technology " 52 20 4405 "Real Estate " 45 21 4405 "Commercial Music " 38 22 4405 "Biology, General " 37 23 4405 "Speech Communication " 37 24 4405 "Radio And Television " 35 25 4405 "Oceangraphy " 34 26 4405 "Biotechnology And Biomedical Technology " 31 27 4405 "Computer Infrastructure And Support " 31 28 4405 "Anthropology " 24 29 4405 "French " 24 30 4405 "Dance " 22 31 4405 "Construction Crafts Technology " 22 32 4405 "Music " 22 33 4405 "Technical Theater " 22 34 4405 "Athletic Training And Sports Medicine " 21 35 4405 "Accounting " 21 36 4405 "Manufacturing And Industrial Technology " 17 37 4405 "Information Technology, General " 13 38 4405 "Marketing And Distribution " 13 39 4405 "Emergency Medical Services " 12 40 4405 "Architecture And Architectural Technology " 11 41 4405 "Drafting Technology " 11 42 4405 "Spanish " 11 43 4405 "Graphic Art And Design " 11 44 4405 "Medical Assisting " 9 45 4405 "Political Science " 9 46 4405 "Office Technology/Office Computer Applications " 9 47 4405 "Kinesiology " 9 48 4405 "Comparative Literature " 8 49 4405 "Fine Arts, General " 7 50 4405 "Engineering Technology, General " 7 51 4405 "Paralegal " 7 52 4405 "Applied Photography " 6 53 4405 "Chemistry, General " 6 54 4405 "Nursing " 6 55 4405 "Animal Science " 5 56 4405 "Physical Education " 4 57 4405 "Interior Design And Merchandising " 4 58 4405 "Library Science, General " 3 59 4405 "School Health Clerk " 3 60 4405 "Environmental Control Technology (Hvac) " 3 61 4405 "Horticulture " 3 62 4405 "Environmental Studies " 3 63 4405 "Family Studies " 3 64 4405 "Other Information Technology " 2 65 4405 "Health Information Technology " 2 66 4405 "Dramatic Arts " 2 67 4405 "Plant Science " 2 68 4405 "Astronomy " 1 69 4405 "Anatomy And Physiology " 1 70 4405 "Journalism " 1 71 4405 "Gerontology " 1 72 4405 "Law, General " 1 73 4405 "Applied Design " 1 74 4405 "Physical Sciences, General " 1 75 4405 "Fashion " 1 76 4405 "Automotive Collision Repair " 1 77 4405 "Physics, General " 1 78 4405 "Dental Occupations " 1 79 4405 "Commercial Art " 1 80 4405 "World Wide Web Administration " 1 81 4405 "Other Engineering And Related Industrial Technologies " 1 82 4405 "History " 1 83 4405 "Fire Technology " 1 84 4405 "Microbiology " 1 85 4405 "Occupational Therapy Technology " 1 86 4405 "Radiologic Technology " 1 87 4405 "Classics " 1 88 4405 "Geology " 1 89 4405 "Viticulture, Enology, And Wine Business " 1 90 4405 "Agriculture Business, Sales And Service " 1 91 4405 end
Code:
*Enrollments rates
graph hbar freq if freq >= 30, ///
over(top4_title, sort(index) label(labsize(small))) ///
title("") ///
bar(1, color("118 136 26")) ///
ytitle("") ///
blabel(bar, position(outside) color(black) size(vsmall))
The course titles on the left side of the chart are centered aligned. How do you right align the titles? Thank you.

Comment