Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

st: RE: subscript in categorical axis labels


From   Andrew Zeitlin <andrew.zeitlin@economics.ox.ac.uk>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: RE: subscript in categorical axis labels
Date   Wed, 18 Aug 2010 11:45:53 +0100

Dear Michael,

Thanks very much for the suggested workaround.  Strangely, your trick seems to work only when the figure is exported to .eps, and not when exported in other formats.  

This is a workable fix, although .eps is not ideal for use in MS Office -- it would be nice to be able to export graphs with subscripts to other formats directly from within Stata.

Best wishes
Andrew



--- On Tue, 17 Aug 2010 at 10:25:25, Michael N Mitchell wrote: ---

Dear Andrew


I don't know if this helps, but when I bumped into this problem I found that the subscripts were properly displayed when I ultimately exported the file to a .eps file (even though the screen displayed improperly). If your ultimate goal is to export the graph to a file, the subscripts might display properly in the exported file.

I hope that might help,

Michael N. Mitchell
Data Management Using Stata      - http://www.stata.com/bookstore/dmus.html
A Visual Guide to Stata Graphics - http://www.stata.com/bookstore/vgsg.html
Stata tidbit of the week         - http://www.MichaelNormanMitchell.com


-----Original Message-----
From: Andrew Zeitlin 
Sent: 17 August 2010 17:26
To: 'statalist@hsphsun2.harvard.edu'
Subject: subscript in categorical axis labels

Hello,

I have a question regarding the use of subscripts in graphs in Stata 11. In particular, I wish to use subscripts in the label for the categorical axis of a bar graph, where I am using the over() option to specify categories.  The problem is that the subscripts appear as superscripts. 

For example, 

* ---  begin example  --- *

sysuse auto, clear
gr bar price, over(foreign, relabel(1 "Origin{sub:1}" 2 "Origin{sub:2}" ))

* ---  end example  --- *

The problem persists even if the values of the categorical variable are similarly labeled by defining and applying a value label prior to generating the graph.

I have seen Maarten Buis's solution to a similar problem for use in legends, via the alignment() option.  Is there a similar fix for categorical axis labels?

Thanks in advance,
Andrew


Dr. Andrew Zeitlin
Research Officer
Centre for the Study of African Economies, Department of Economics
Research Fellow in Applied Microeconomics
Lincoln College
University of Oxford
Tel: +44 (0) 1865 271084/284250 (direct)
Mob: +44 (0) 7733 263636
Fax: +44 (0) 1865 281447
Web: http://users.ox.ac.uk/~exet1357


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index