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: 3D bar plot
From
Maarten Buis <[email protected]>
To
[email protected]
Subject
Re: st: 3D bar plot
Date
Wed, 18 Jan 2012 09:03:56 +0100
On Wed, Jan 18, 2012 at 7:33 AM, Ning Li <[email protected]> wrote:
> What is the command for drawing a 3D bar plot? by 3D bar plot it is meant -
>
> Suppose our data set is {(x,y,z)}={(8.3, 2.3, 2), (9.2, 1.8, 4), (7.1, 0.9, 5)}
> For each point in the (x,y) plate, a vertical bar with height that equals the corresponding z value is drawn. ie., in the position (x,y)=(8.3,2.3), a vertical bar of length 2 is presented, ....
>
> When x and y represent, respectively, within-person mean and within-person standard deviation, and z the frequency of the corresponding pattern, this plot should give a graphic summary of the panel data.
I would look at Nick Cox's -tabplot- (see: -ssc descr tabplot-). It is
not 3D, but I think it does what you want to do. Here is an example:
*---------- begin example ---------------
webuse union, clear
xtset idcode year
bys id: egen m = mean(union)
bys id : egen sd = sd(union)
bys id (year) : gen byte mark = _n == 1
// we need some rounding in this dataset
// to get a readable graph
replace m = round(100*m ,10)
replace sd = round(100*sd,10)
// the graph
tabplot m sd if mark
*----------- end example ----------------
(For more on examples I sent to the Statalist see:
http://www.maartenbuis.nl/example_faq )
Hope this helps,
Maarten
--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany
http://www.maartenbuis.nl
--------------------------
*
* 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/