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

st: label in -graph bar-

From   Sue <[email protected]>
To   [email protected]
Subject   st: label in -graph bar-
Date   Tue, 22 Sep 2009 21:01:38 -0400

Dear Statalisters,

I'm running the following command but have trouble getting the label
on the xaxis correct. I want to relabel it as shown in the
parentheses, but it just shows the years as is.
So instead of displaying "2004-05", it displays "2005", etc. Can
someone please tell me what's wrong with the code? Your help is
greatly appreciated.

  foreach var in realloangrowth realdepositgrowth   {
  local v1: variable label `var'
  graph bar (mean) `var', label ///
  yvaroptions(relabel(2005 "2004-05" 2006 "2005-06" 2007 "2006-07"
2008 "2007-08")) ///
  over(year, label(labsize(vsmall))) ytitle(`v1') ///
  bargap(2) b1title("Year") by(ctype, title("`v1' by cgroup")) ///
  /*graph export `var'_pre.png, replace*/
*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index