I am using -tabplot- to realize the following graph (see attachment) and I would like to add one category more (in the last row, below 'Occupazioni dequalificate') which lists the total % of occupation for each year for 'Donne' and 'Uomini'. Since this will be obviously a much higher number (some xx,x%) I would like to show only the value but not the bar.
I tried the option -if- in the commands but it does not work.
Do you have any clue? Thanks a lot, best, G.
Here the data:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input byte(uomo setto) float perc byte anno 0 1 .5 1 0 2 4 1 0 3 4.4 1 0 4 6.7 1 0 5 7.3 1 0 6 1.9 1 0 7 3.3 1 0 8 1.5 1 0 9 4.2 1 1 1 2.4 1 end
Code:
label values uomo uomo label def uomo 0 "Donne", modify label def uomo 1 "Uomini", modify label values setto setto label def setto 1 "Legislatori, ufficiali e managers", modify label def setto 2 "Professionisti", modify label def setto 3 "Tecnici e professionisti associati", modify label def setto 4 "Impiegati", modify label def setto 5 "Addetti ai servizi e alle vendite", modify label def setto 6 `" "Qualificati nella pesca" "e agricoltura" "', modify label def setto 7 "Artigiani e operai", modify label def setto 8 `" "Operatori di macchina e" "di impianti e assemblatori" "', modify label def setto 9 "Occupazioni dequalificate", modify label define anno 1 "1992" 2 "2008" 3 "2015" 4"what" label values anno anno gen percshow = string(perc, "%04,1fc") tabplot setto anno [iw=perc], by(uomo, compact note("") title("Distribuzione di genere nelle professioni", place(e))) /// subtitle(, fcolor(none)) showval(percshow, mlabsize(vsmall)) /// xtitle("") ytitle("") yla(, labsize(medsmall)) /// separate(uomo) bar1(bfcolor(red*0.2) blcolor(red)) bar2(bfcolor(blue*0.2) blcolor(blue)) /// scheme(s1mono)
0 Response to Hiding bar of one category in -tabplot-
Post a Comment