Skip to main content

Research Repository

Advanced Search

Speaking Stata: Automating axis labels: Nice numbers and transformed scales

Cox, Nicholas J.

Speaking Stata: Automating axis labels: Nice numbers and transformed scales Thumbnail


Authors



Abstract

Two common problems with graph axis labels are to decide in advance on some “nice” numbers to use on one or both axes and to show particular labels on some transformed scale. In this column, I discuss the nicelabels and mylabels commands, which address these problems. The first command is new to Stata, and the second is a revision of a previously published command. I also survey the myticks command for tick placement. In all commands, the main output is a local macro in the calling program’s space, in the interest of promoting automation in do-files and programs.

Citation

Cox, N. J. (2022). Speaking Stata: Automating axis labels: Nice numbers and transformed scales. The Stata Journal, 22(4), 975-995. https://doi.org/10.1177/1536867x221141058

Journal Article Type Article
Acceptance Date Nov 8, 2022
Online Publication Date Jan 5, 2023
Publication Date 2022
Deposit Date Jan 18, 2023
Publicly Available Date Jan 18, 2023
Journal The Stata Journal: Promoting communications on statistics and Stata
Print ISSN 1536-867X
Electronic ISSN 1536-8734
Publisher SAGE Publications
Peer Reviewed Peer Reviewed
Volume 22
Issue 4
Pages 975-995
DOI https://doi.org/10.1177/1536867x221141058

Files

Published Journal Article (630 Kb)
PDF

Publisher Licence URL
http://creativecommons.org/licenses/by/4.0/

Copyright Statement
This article is distributed under the terms of the Creative Commons Attribution 4.0 License (https://creativecommons.org/licenses/by/4.0/) which permits any use, reproduction and distribution of the work without further permission provided the original work is attributed as specified on the SAGE and Open Access pages (https://us.sagepub.com/en-us/nam/open-access-at-sage).





You might also like



Downloadable Citations