Hi!
I would like to produce a cleveland dot plot type of graph with lines that connects each x values for every given y, like this one: https://uc-r.github.io/public/images...plots/icon.png
In addition to this, I would like to attach the labels of the y variable to each value on the y axis.
Does the silly example data from the code below need any workaround or is there a simple way to connect the scatter dots by adding another type of twoway graph in addition to the scatter plots?
My first post on Statalist so please let me know if something is dissatisfying with my post.
Thanks!
/Anton
I would like to produce a cleveland dot plot type of graph with lines that connects each x values for every given y, like this one: https://uc-r.github.io/public/images...plots/icon.png
In addition to this, I would like to attach the labels of the y variable to each value on the y axis.
Does the silly example data from the code below need any workaround or is there a simple way to connect the scatter dots by adding another type of twoway graph in addition to the scatter plots?
My first post on Statalist so please let me know if something is dissatisfying with my post.
Thanks!
/Anton
Code:
sysuse auto, clear egen rank_price = rank(price) labmask rank_price, values(make) gsort rank_price gen price3 = round(price/1.75/100) gen price1 = round(price/100) // Graph twoway (scatter rank_price price1 if rank_price <= 10, mlabel(price1) msize(vlarge) mlabpos(0) mlabtextstyle(color(black))) /// (scatter rank_price price3 if rank_price <= 10, mlabel(price3) msize(vlarge) mlabpos(0) mlabtextstyle(color(black))), /// xlabel(0(5)45) /// title("Cleveland Dot Plot")
Comment