Bookmark and Share

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]

st: How to have different marker symbols in 'catplot' without using asyvars option


From   Philip Jones <[email protected]>
To   [email protected]
Subject   st: How to have different marker symbols in 'catplot' without using asyvars option
Date   Tue, 30 Nov 2010 10:40:02 -0500

Hello,

I'm trying to construct a dot chart and I'm running into a snag when trying to obtain different dot symbols by natural groupings of the data without having to use the asyvars option (as I want each data point on a separate horizontal dotted line on the chart).

For example, the following commands give me a plain dot chart showing the repair rating of cars (1-5) by their foreign/domestic status:

sysuse auto, clear
catplot foreign rep78, recast(dot)

But, what I want to do is to keep the structure of the above chart while having one symbol for all domestic lines (1-5) and another symbol for all foreign lines (1-5).

I can approach what I want that with the following command, but unfortunately this makes both domestic and foreign symbols appear on the same horizontal line.

catplot foreign rep78, recast(dot) asyvars marker(1,msymbol(o)) marker(2, msymbol(d) mcolor(blue))

I would like to preserve the structure of the first example (having foreign and domestic each on their own horizontal dotted line) with the symbol differentiation of the second example (having all foreign data points with one symbol and all domestic points with another symbol).

Can anyone help?

Thanks,

Phil
____________________________________________________________________
Philip M G Jones, MD PGDip FRCPC

Assistant Professor of Anesthesiology
Department of Anesthesiology & Perioperative Medicine
University of Western Ontario
London Health Sciences Centre

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index