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: RE: How to have different marker symbols in 'catplot' without using asyvars option


From   Nick Cox <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: RE: How to have different marker symbols in 'catplot' without using asyvars option
Date   Tue, 30 Nov 2010 15:58:59 +0000

-catplot- is from SSC. Please explain where user-written programs you refer to come from, as requested long since in the FAQ.

I've wanted this myself, and I wrote -catplot-. What you're seeing is behaviour wired into -graph dot-, which is doing most of the work, and I don't know a way to subvert it easily. 

You can change symbols selectively in the Graph Editor, or you can go the long way round and re-create the graph using -twoway-, but no option of -graph dot- I know of does what you want. 

Nick 
[email protected] 

Philip M G Jones, MD PGDip FRCPC

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).


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