Hi all,

I wonder if its posible a line break in a string variable, my idea is use this variable in a tabplot graph, example:

Code:

               clear
               input byte(a1 b1 c1)
               2 1 2
               1 2 1
               2 2 2
               2 2 1
               2 2 2
               2 1 1
               1 2 2
               3 3 3
               2 2 2
               2 2 1
               1 2 2
               1 1 1
               3 3 3
               3 3 3
               3 3 3
               3 3 3
               1 1 2
               2 1 1
               2 1 2
               3 3 3
               1 2 2
               2 2 1
               1 1 2
               1 1 1
               1 2 2
               2 2 1
               1 2 2
               1 2 1
               1 2 2
               2 2 1
               end
               label values a1 size
               label values b1 size
               label values c1 size
               label def size 1 "big", modify
               label def size 2 "small", modify
               label def size 3 "medium", modify

               rename (a1 b1 c1) (size=)
               gen long id = _n
               reshape long size, i(id) j(which) string

               bysort which size : gen freq = _N
               by which : gen pc = 100 * freq / _N
               gen show = "   " + string(freq) + " (" + string(pc, "%2.1f") + "%" +")"

tabplot size, by(which, col(1) compact note("")) ///
showval(show, offset(0.18)) ///
subtitle(, pos(9) nobox nobexpand fcolor(none)) ///
xtitle("") ytitle("") horizontal
The output is: Array



I wonder if its posible get (I use a photo editor to get it): Array


I did try with splitvallabels but not success:

Code:
ssc install splitvallabels

encode  show, gen(alt)
splitvallabels alt , length(9)        

tabplot size, by(which, col(1) compact note("")) ///
showval(`(rlabel)', offset(0.18)) ///
subtitle(, pos(9) nobox nobexpand fcolor(none)) ///
xtitle("") ytitle("") horizontal
output:
Array


Thanks in advance
Rodrigo