Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Twoway Range Plots

From   Erika Kociolek <>
Subject   Re: st: Twoway Range Plots
Date   Mon, 17 Jun 2013 15:21:35 -0700

Thank you for the great suggestion to combine rcap and scatter - works

The only way I can get labels to appear in this graph is to use the
following code:

twoway rcap high low group_numeric, xlabel(1 "US" 2 "Europe" 3 "Asia"
4 "Africa")

Is there a way to just use the labels from the variable group_numeric
(which was generated using encode(string_group),
generate(group_numeric)) instead of typing all of the group labels
manually into xlabel?


On Mon, Jun 17, 2013 at 2:56 PM, Nick Cox <> wrote:
> You need numeric axes for -twoway-. What is the difficulty in showing
> value labels?
> twoway rcap min max x || scatter mean x
> is one of several ways to show min, max and mean together.
> Nick
> On 17 June 2013 20:54, Erika Kociolek <> wrote:
>> I have a question about the range plots that can be generated using
>> Stata's twoway command. Is there any way to generate these plots with
>> a string variable on the x-axis? I tried encoding the string variable
>> of interest and plotting that (which works) but I cannot figure out
>> how to plot the labels of the encoded string variable on the x-axis.
>> Also, I really would like to show the min, mean, and max on a range
>> plot, but am not sure if that can be done (looks like twoway only
>> takes min/max inputs). Are there other ways to achieve this?
> *
> *   For searches and help try:
> *
> *
> *
*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index