Hi all,
For reasons that aren't really worth going into, I'm trying to reproduce the algorithm that Stata uses to automatically label plot axes. I understand from here and here that the first bit of the algorithm is to start with the range of the variable and divide it into (about) 5 equally spaced labels. But I think there are other steps n the process, because it also always chooses round numbers (at an appropriate order of magnitude) to display. I'm wondering, is there a command that will produce these values for you automatically for any variable? Or a standard algorithm I could implement?
My instinct was to calculate the range of the variable and divide it into 5 groups, and then maybe use the size of those groups and the floor function in some combination to determine the right level of rounding. By I'm a little stuck at that point. Any thoughts or guidance?
Related Posts with What is Stata's full algorithm for automatically labelling axes on plots?
Premature DeindustrializationHello everyone, I'm testing premature deindustrialization as Rodrik (2015) I regress manufacture em…
Xtqreg-qunaitle regression in a panel dataDear Joao Santos Silva I am trying to run fixed effects quantile regression for a panel of 260 firm…
create a new variable from weighted variables?Hello everyone, I'm now stuck into this one: I have a data-set and a (sample) weight variable. Due …
xtline and standard deviationHello everyone, I need to draw a lineplot for paneldata. I used the following command: collapse (m…
Merging two files on multiple criteria and imperfect matching?Hi, I have two data files I want to merge. The issue is I don't have an ID column shared by both fil…
Subscribe to:
Post Comments (Atom)
0 Response to What is Stata's full algorithm for automatically labelling axes on plots?
Post a Comment