Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: -sliceplot- and -connected- problems with legends
From
Nick Cox <[email protected]>
To
[email protected]
Subject
Re: st: -sliceplot- and -connected- problems with legends
Date
Thu, 16 Aug 2012 10:07:32 +0100
Maarten has given one good suggestion.
-sliceplot- is from SJ and SSC:
SJ-6-3 gr0025 . . . . . . . . . . . . Speaking Stata: Graphs for all seasons
(help cycleplot, sliceplot if installed) . . . . . . . . . N. J. Cox
Q3/06 SJ 6(3):397--419
illustrates producing graphs showing time-series seasonality
sliceplot from http://fmwww.bc.edu/RePEc/bocode/s
'SLICEPLOT': module for time series or other plot in slices / sliceplot
produces a time series or other plot divided into a / series of slices and
then combined. The horizontal variable may / be any numeric variable, but
the program is motivated by the case / of time series plots that would
-sliceplot- was inspired by examples for single time series, and I
don't think I ever gave any thought to the legend that will
necessarily spring into existence with multiple time series. But in
essence -sliceplot- is just a wrapper for -graph combine- and so the
do-it-yourself option is a good way to go. I'd single out the
-fysize()- option to get better sizes for the graphs.
Nick
On Thu, Aug 16, 2012 at 5:54 AM, <[email protected]> wrote:
> I am using Nick Cox's -sliceplot- with -connected- and am having
> issues controlling the legend.
>
> The general command gives multiple plots, each with a legend:
>
> * begin example 1 *
> sysuse sp500.dta
>
> sliceplot connected open high low close date, slices(3)
> * end example 1 *
>
> One (sub-optimal solution) is:
>
> * begin example 2 *
> sysuse sp500.dta
>
> tw connected open high low close date, legend(off), in 1/83
> graph save Graph "Graph1.gph", replace
> tw connected open high low close date, legend(off), in 84/166
> graph save Graph "Graph2.gph", replace
> tw connected open high low close date,, in 167/248
> graph save Graph "Graph3.gph", replace
> graph combine graph1.gph graph2.gph graph3.gph, col(1)
> * end example 2 *
>
> Do any of the graphics gurus have suggestions to produce only a single
> legend with three equal-size plots?
*
* 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/