Home  >>  Archives  >>  Volume 18 Number 1  >>  gr0072

The Stata Journal
Volume 18 Number 1: pp. 262-286

Subscribe to the Stata Journal

Speaking Stata: Logarithmic binning and labeling

Nicholas J. Cox
Department of Geography
Durham University
Durham, UK
Abstract.  Histograms on logarithmic scale cannot be produced by an option like xscale(log). You need first to transform the variable concerned with a logarithm function. That raises small choices: how to select bin start, bin width, and informative axis labels and titles? Problems and solutions are discussed here in detail.

In contrast, for logarithmic scales on other graphs, options xscale(log) and yscale(log) may do most of what you want. But there is usually still scope for "nicer" axis labels than are given by default and indeed scope for differing tastes on what "nice" means. This column introduces the niceloglabels command for helping (even automating) label choice.

Historical notes and references are sprinkled throughout.
Terms of use     View this article (PDF)

View all articles by this author: Nicholas J. Cox

View all articles with these keywords: niceloglabels, logarithms, axis scales, axis labels, binning, histograms, quantile plots, transformations, graphics

Download citation: BibTeX  RIS

Download citation and abstract: BibTeX  RIS