Announcement

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

  • Marker Labels in Dot Charts

    I want to be able to show marker labels next to the dots on a dot chart, but mlabel() does not do anything (nor does it throw an error).
    Is this possible with graph dot?


    Here an example of the code I am using (with different data):

    set scheme s1color
    sysuse auto, clear
    format mpg %3.1f
    graph dot (asis) mpg, nofill over(make, label(labsize(*.6))) ///
    by(foreign, ///
    title(" Example", color(black) margin(zero) size(medsmall)) ///
    note("Source: sysuse auto", size(tiny) color(gs8)) ///
    legend(pos(11) margin(zero)) ) ///
    legend(rows(1) size(*0.9)) ///
    ytitle("MPG", size(*0.9)) ///
    subtitle(, lcolor(gs14) size(*0.9)) ylabel(,labsize(*0.8) grid) ///
    marker(1, mlabel(mpg) mlabpos(3) mlabsize(*0.8) ///
    ms(Oh) msize(*1.2) mlwidth(*1.2)) ///
    linetype(line) lines(lwidth(vvthin) lcolor(gs13))
    Click image for larger version

Name:	example_mpg.png
Views:	1
Size:	50.5 KB
ID:	1325849

  • #2
    I don't think that approach will work as you are trying to use twoway options within a program that isn't a twoway command.

    http://www.stata-journal.com/sjpdf.h...iclenum=gr0034 discusses some technique in this territory.

    Comment

    Working...
    X