Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: st: RE: AW: Graph matrix with multiple marker colors


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: RE: AW: Graph matrix with multiple marker colors
Date   Tue, 31 Mar 2009 17:43:24 +0100

Any character? I doubt it. But you can I think get away with anything
that -char()- recognises. Here's a dopey example. 

. gen mla2 = cond(foreign == 0, "`=char(216)'", "`=char(247)'")

. graph matrix  headroom trunk weight length, ms(none) mla(mla2)
mlabpos(0)

Mind you, a quick look at the results of -asciiplot- from SSC doesn't
suggest many symbols good for graphs that aren't accessible otherwise. 

See also

SJ-5-4  gr0023  . . . . Stata tip 27: Classifying data points on scatter
plots
        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  N.
J. Cox
        Q4/05   SJ 5(4):604--606                                 (no
commands)
        tips for using separate, gray-scale gradation, and text
        characters as class symbols to classify data points on
        a scatter plot

which is freely visible at 

http://www.stata-journal.com/sjpdf.html?articlenum=gr0023

Nick 
n.j.cox@durham.ac.uk 

David Airey

I always seem to forget that trick. I suppose one could use any  
character from a symbol font too.

On Mar 31, 2009, at 7:59 AM, Nick Cox wrote:

> As Martin says, -mcolor()- never takes anything other than something
> indicating a single colour.
>
> So, either you generate the individual graphs using -scatter- and then
> -graph combine-, or you distinguish genders in another way.
>
> Here's another easy solution, if not to your problem:
>
> . sysuse auto, clear
> (1978 Automobile Data)
>
> . gen mlbl = cond(foreign == 0, "o", "+")
>
> . graph matrix headroom trunk weight length, ms(none) mla(mlbl)
> mlabpos(0)
>

*
*   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/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index