Title
mm_plot() -- Draw plot using Stata's graph twoway command
Syntax
void mm_plot(X [, plottype, options])
real scalar _mm_plot(X [, plottype, options])
where
X: real matrix containing data (rows are observations, columns variables)
plottype: string scalar specifying type of twoway plot (see help twoway; default is "scatter")
options: string scalar specifying options to be passed on to the graph command
Description
mm_plot(X) draws a twoway plot from the contents of X using Stata's graph twoway command. The columns of X are the variables to be plotted. mm_plot() aborts with error if the graph command cannot be executed successfully.
_mm_plot() performs the same action as mm_plot() but returns the appropriate Stata return code instead of aborting with error if the graph command cannot be executed successfully.
Remarks
Examples:
. mata: mm_plot(uniform(100,2))
. mata: mm_plot(sort(uniform(10,3),3),"line")
. mata: mm_plot(uniform(100,2), "", "msymbol(Th)")
Conformability
mm_plot(X, plottype, options): X: n x k plottype: 1 x 1 options: 1 x 1 result: void
_mm_plot(X, plottype, options): X: n x k plottype: 1 x 1 options: 1 x 1 result: 1 x 1
Diagnostics
None.
Source code
mm_plot.mata
Author
Ben Jann, ETH Zurich, jann@soz.gess.ethz.ch
Also see
Online: help for graph twoway, moremata