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: _matplot
From
Maarten Buis <[email protected]>
To
[email protected]
Subject
Re: st: _matplot
Date
Mon, 2 Jan 2012 13:25:18 +0100
On Mon, Jan 2, 2012 at 12:38 PM, micdepo mic wrote:
> I am trying the _matplot function to plot values in a matrix where the
> 1st column is the index and the second and third columns are X1 and
> X2. I can plot X1 and X2 individually with respect to the index. But,
> I would like X1 and X2 to be plotted together with respect to the
> index. I couldn't manage this so far
I don't think you can make that graph with _matplot. Instead you
should turn your matrix into a dataset and graph the dataset:
*--------- begin example ----------
clear
matrix foo = 1, 2, 3 \ ///
2, 2, 2 \ ///
3, 3, 3 \ ///
4, 3, 2
svmat foo
scatter foo2 foo3 foo1
*--------- 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/