Example: biology

graph matrix — Matrix graphs - Stata

Matrix Matrix graphsDescriptionQuick startMenuSyntaxOptionsRemarks and examplesReferencesAlso seeDescriptiongraph matrixdraws scatterplot startScatterplot Matrix for variablesv1,v2,v3,v4, andv5graph Matrix v1 v2 v3 v4 v5As above, but draw only the lower trianglegraph Matrix v1 v2 v3 v4 v5, halfSeparate scatterplot matrices for each level ofcatvargraph Matrix v1 v2 v3 v4 v5, by(catvar)With hollow circles as markersgraph Matrix v1 v2 v3 v4 v5, half msymbol(Oh)As above, but with periods as markersgraph Matrix v1 v2 v3 v4 v5, half msymbol(p)Override the default text on the diagonal forv1andv3graph Matrix v1 v2 v3 v4 v5, diagonal("Variable 1" . "Variable 3")MenuGraphics>Scatterplot matrix12 graph Matrix Matrix graphsSyntaxgraph matrixvarlist[if][in][weight][,options]o ptionsDescriptionhalfdraw lower triangle onlymarkeroptionslook of markersmarkerlabeloptionsinclude labels on markersjitter(#)perturb location of markersjitterseed(#)random-number seed forjitter()diagonal(stringlist.)

graph matrix— Matrix graphs 5 std options allow you to specify titles (see Adding titles under Remarks and examples below, and see [G-3] title options), control the aspect ratio and background shading (see[G-3] region options),control the overall look of the graph (see[G-3] scheme option), and save the graph to disk (see[G-3] saving option).See[G-3] std options for an overview of the ...

Tags:

  Matrix, Graph, Graph matrix matrix graphs

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of graph matrix — Matrix graphs - Stata

1 Matrix Matrix graphsDescriptionQuick startMenuSyntaxOptionsRemarks and examplesReferencesAlso seeDescriptiongraph matrixdraws scatterplot startScatterplot Matrix for variablesv1,v2,v3,v4, andv5graph Matrix v1 v2 v3 v4 v5As above, but draw only the lower trianglegraph Matrix v1 v2 v3 v4 v5, halfSeparate scatterplot matrices for each level ofcatvargraph Matrix v1 v2 v3 v4 v5, by(catvar)With hollow circles as markersgraph Matrix v1 v2 v3 v4 v5, half msymbol(Oh)As above, but with periods as markersgraph Matrix v1 v2 v3 v4 v5, half msymbol(p)Override the default text on the diagonal forv1andv3graph Matrix v1 v2 v3 v4 v5, diagonal("Variable 1" . "Variable 3")MenuGraphics>Scatterplot matrix12 graph Matrix Matrix graphsSyntaxgraph matrixvarlist[if][in][weight][,options]o ptionsDescriptionhalfdraw lower triangle onlymarkeroptionslook of markersmarkerlabeloptionsinclude labels on markersjitter(#)perturb location of markersjitterseed(#)random-number seed forjitter()diagonal(stringlist.)

2 Override text on diagonaldiagopts(textboxoptions)renditio n of text on diagonalscale(#)overall size of symbols, labels, ([*]#)size of symbols, labels, within plotsmaxes(axisscaleoptionsaxislabelopti ons)labels, ticks, grids, log scales, controlby(varlist,..)repeat for subgroupsstdoptionstitle, aspect ratio, saving to diskAll options allowed bygraph twoway scatterare also allowed, but they are ,diagonal(),scale(), andiscale()areunique;jitter()andjitterse ed()arerightmostandmaxes()ismerged-impli cit; see [G-4]Concept: repeated ,.., the argument allowed bydiagonal(), is defined[{.|"string"}][{.|"string"}..][,t extboxoptions]aweights,fweights, andpweights are allowed; see[U] weight. Weights affect the size ofthe markers. SeeWeighted markersin [G-2] graph twoway that only the lower triangle of the scatterplot Matrix be the look of the markers used to designate the location of the points.

3 Theimportantmarkeroptionsaremsymbol(),mc olor(), andmsize().The default symbol used ismsymbol(O) solid circles. You specifymsymbol(Oh)if you wanthollow circles (a recommended alternative). If you have many observations, we recommendspecifyingmsymbol(p); seeMarker symbols and the number of observationsunderRemarks andexamplesbelow. See [G-4]symbolstylefor a list of marker symbol defaultmcolor()is dictated by the scheme; see [G-4]Schemes intro. See [G-4]colorstylefor a list of color careful specifying themsize()option. Ingraph Matrix , the size of the markers varies withthe number of variables specified; see optioniscale()below. If you specifymsize(), that willoverride the automatic [G-3]markeroptionsfor more information on Matrix Matrix graphs 3markerlabeloptionsallow placing identifying labels on the points.

4 To obtain this, you specify themarkerlabeloptionmlabel(varname); see [G-3]markerlabeloptions. These options are oflittle use for scatterplot matrices because they make the graph seem too (#)adds spherical random noise to the data before plotting.#represents the size of the noiseas a percentage of the graphical area. This is useful when plotting data which otherwise wouldresult in points plotted on top of each other. SeeJittered markersin [G-2] graph twoway scatterfor an explanation of (#)specifies the seed for the random noise added by thejitter()option.#shouldbe specified as a positive integer. Use this option to reproduce the same plotted points when thejitter()option is ([stringlist][,textboxoptions])specifies text and its style to be displayed along thediagonal.

5 This text serves to label the graphs (axes). By default, what appears along the diagonalsare the variable labels of the variables ofvarlistor, if a variable has no variable label, its graph Matrix mpg weight displ, diag(. "Weight of car")would change the text appearing in the cell corresponding to variableweight. We specified period(.) to leave the text in the first cell unchanged, and we did not bother to type a third string or aperiod, so we left the third element unchanged, may specifytextboxoptionsfollowingstringlist (which may itself be omitted) and a options will modify the style in which the text is presented but are of little use recommend that you do not specifydiagonal(,size())to override the default sizing ofthe text.

6 By default, the size of text varies with the number of variables specified; see optioniscale()below. Specifyingdiagonal(,size())will override the automatic size scaling. See[G-3]textboxoptionsfor more information on (textboxoptions)specify the look of text on the diagonal. This option is a shortcut fordiagonal(,textboxoptions).scale(#)spe cifies a multiplier that affects the size of all text and markers in a (1)isthe default, andscale( )would make all text and markers 20% [G-3] (#)andiscale(*#)specify an adjustment (multiplier) to be used to scale the markers, thetext appearing along the diagonals, and the labels and ticks appearing on the default,iscale()gets smaller and smaller the largernis, the number of variables specified invarlist.

7 The default is parameterized as a multiplier f(n) 0<f(n)<1,f (n)<0 that is used asa multiplier formsize(),diagonal(,size()),maxes(labsize()), andmaxes(tlength()).If you specifyiscale(#), the number you specify is substituted for f(n). We recommend thatyou specify a number between 0 and 1, but you are free to specify numbers larger than you specifyiscale(*#), the number you specify is multiplied by f(n), and that product is usedto scale text. Here you should specify#>0;#>1 merely means you want the text to be biggerthangraph matrixwould otherwise (axisscaleoptions axislabeloptions)affect the scaling and look of the axes. This is a casewhere you specify options within theaxisscaleoptions{y|x}scale(log), which produces logarithmic scales.

8 Typemaxes(yscale(log) xscale(log))to draw the scatterplot Matrix by using log scales. Rememberto specify bothxscale(log)andyscale(log), unless you really want just theyaxis or justthexaxis graph Matrix Matrix graphsOr consider theaxislabeloptions{y|x}label(,grid), which adds grid lines. Specifymaxes(ylabel(,grid))to add grid lines across,maxes(xlabel(,grid))to add grid linesvertically, and both options to add grid lines in both directions. When using both, you can spec-ify themaxes()option twice maxes(ylabel(,grid)) maxes(xlabel(,grid)) or oncecombined maxes(ylabel(,grid) xlabel(,grid)) it makes no difference becausemaxes()ismerged-implicit; see [G-4]Concept: repeated [G-3]axisscaleoptionsand [G-3]axislabeloptionsfor the suboptions that may appearinsidemaxes().

9 In reading those entries, ignore theaxis(#)suboption; graph matrixwillignore it if you specify you to assert axis-by-axis control over the labeling. Do not confuse this withmaxes(axislabeloptions), which specifies options that affect all the outside themaxes()option specify options that affect just one of the be repeated for each you specifyaxislabeloptionsoutsidemaxes(), you must specify the axis-label suboptionaxis(#). For instance, you might type. graph Matrix mpg weight displ, ylabel(0(5)40, axis(1))The effect of that would be to label the specified values on the firstyaxis (the one appearing onthe far right). The axes are numbered as follows:xxaxis(2) axis(4)v1/v2v1/v3v1/v4v1/v5yaxis(1)yaxis (2)v2/v1v2/v3v2/v4v2/v5v3/v1v3/v2v3/v4v3 /v5yaxis(3)yaxis(4)v4/v1v4/v2v4/v3v4/v5v 5/v1v5/v2v5/v3v5/v4yaxis(5)xxxaxis(1) axis(3) axis(5)and ifhalfis specified, the numbering scheme isyaxis(2)v2/v1yaxis(3)v3/v1v3/v2yaxis(4 )v4/v1v4/v2v4/v3yaxis(5)v5/v1v5/v2v5/v3v 5/v4xxxxxaxis(1) axis(2) axis(3) axis(4) axis(5)See [G-3]axislabeloptions; remember to specify theaxis(#)suboption, and do not specify thegraph matrixoptionmaxes().

10 By(varlist,..)allows drawing multiple graphs for each subgroup of the data. SeeUse with by( )underRemarks and examplesbelow, and see [G-3] Matrix Matrix graphs 5stdoptionsallow you to specify titles (seeAdding titlesunderRemarks and examplesbelow, and see[G-3]titleoptions), control the aspect ratio and background shading (see [G-3]regionoptions),control the overall look of the graph (see [G-3]schemeoption), and save the graph to disk (see[G-3]savingoption).See [G-3]stdoptionsfor an overview of the standard and are presented under the following headings:Typical useMarker symbols and the number of observationsControlling the axes labelingAdding grid linesAdding titlesUse with by( )HistoryTypical usegraph matrixprovides an excellent alternative to correlation matrices (see [R]correlate) as aquick way to examine the relationships among variables.


Related search queries