Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

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

From |
Nick Cox <njcoxstata@gmail.com> |

To |
"statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |

Subject |
Re: st: horizontal box plots and log scale |

Date |
Thu, 13 Sep 2012 07:01:52 +0100 |

Nick

Thanks so much Nick for your very prompt reply.I had seen the FAQ... My sole reason for the transformation is toobtain equally spaced ticks for the values 0.4, 0.5, 0.66, 0.8, 1.0,1.25, 1.5, 2.0, 2.5 (as it's using relative risk) so I didn't thinkit was necessary/desirable to transform the data. (Incidentally, Ialso tried -stripplot-, but had the same problem).However, if that is the only option, then obviously that will haveto do.Thanks again, Susanna -----Original Message-----From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Nick CoxSent: Wednesday, 12 September 2012 7:04 PM To: statalist@hsphsun2.harvard.edu Subject: Re: st: horizontal box plots and log scale This is a FAQ. SeeFAQ . . . . . . . . . . . . . . . . . . . Box plots andlogarithmic scales. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .N. J. Cox9/05 How can I best get box plots on logarithmic scales? http://www.stata.com/support/faqs/graphics/boxandlog.htmlThe essence of the problem is that -xsc(log)- just takes the graphyou would have otherwise and transforms it logarithmically. You musttransform the data first, draw the box plot, and then fix the axislabels.-mylabels- (SSC) may help with the last.I think you are wrong about Stata version here: this is in principlea problem with any version of Stata and a wired in boxplot command.NickOn Wed, Sep 12, 2012 at 9:53 AM, Susanna Cramb <SusannaCramb@cancerqld.org.au> wrote:I am having difficulties in generating horizontal box plots on thelog scale.I am using Stata/SE 12.1 for Windows (32-bit), although I also havethe problem with the same version under (64-bit) and also Stata/SE11.2 for Windows (32-bit). I did not have this problem when usingearlier versions of Stata.If I run the following example from the graph box help file, Statagenerates the graph as expected:sysuse nlsw88, cleargraph hbox wage, over(ind, sort(1)) nooutside ytitle("") title("Hourlywage, 1988, woman aged 34-46", span) subtitle(" ") note( "Source:1988 data from NLS, U.S. Dept. of Labor, Bureau of LaborStatistics" ,span)However, if I request it on the log scale, as in the followingcode, I obtain a horizontal box plot where all the categories aresquished on top of each other at the very top of the graph, whilethe horizontal axis remains unchanged.sysuse nlsw88, cleargraph hbox wage, over(ind, sort(1)) nooutside ytitle("") title("Hourlywage, 1988, woman aged 34-46", span) subtitle(" ") note( "Source:1988 data from NLS, U.S. Dept. of Labor, Bureau of LaborStatistics" ,span) yscale(log) Has anyone else had this problem, and is there any solution?*

* * 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/

**Follow-Ups**:**RE: st: horizontal box plots and log scale***From:*Susanna Cramb <SusannaCramb@cancerqld.org.au>

**References**:**st: horizontal box plots and log scale***From:*Susanna Cramb <SusannaCramb@cancerqld.org.au>

**Re: st: horizontal box plots and log scale***From:*Nick Cox <njcoxstata@gmail.com>

**RE: st: horizontal box plots and log scale***From:*Susanna Cramb <SusannaCramb@cancerqld.org.au>

- Prev by Date:
**Re: st: xtnbreg and alternative methods** - Next by Date:
**RE: st: horizontal box plots and log scale** - Previous by thread:
**RE: st: horizontal box plots and log scale** - Next by thread:
**RE: st: horizontal box plots and log scale** - Index(es):