Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

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

From |
Michael McCulloch <mm@pinestreetfoundation.org> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: RE: RE: sts graph: specifying line pattern options |

Date |
Mon, 24 May 2010 17:01:02 -0700 |

*********** webuse drug2b, clear replace drug=2 in 36/48 replace studytime=studytime*2 if drug==2 sts graph, by(drug) /// plot1opts(lpattern(dot) lcolor(red)) /// plot2opts(lpattern(solid) lcolor(blue)) /// plot3opts(lpattern(dash) lcolor(orange)) *********** Thanks for your help, Michael On May 24, 2010, at 2:25 AM, Martin Weiss wrote:

<>" However this does not appear to help. It looks like -sts graph-takes thefirst line pattern specified, applies it to each of the lines, andignoresthe last two. "From the dialog box, it is clear you have to issue separate optioncalls foreach line you want to draw: *********** webuse drug2b, clear sts graph, by(drug) plot1opts(lpattern(dash)) /// plot2opts(lpattern(longdash_dot)) *********** HTH Martin -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Philip Ryan Sent: Montag, 24. Mai 2010 08:58 To: statalist@hsphsun2.harvard.edu Subject: st: RE: sts graph: specifying line pattern options MichaelWhen you specify the "formula" I think you need to enclose thesymbol(s) for_each_ line in double quotes. Sosts graph, by(drug) plotopts(lpattern("." "-" "-.-.")lcolor(black bluered))However this does not appear to help. It looks like -sts graph-takes thefirst line pattern specified, applies it to each of the lines, andignoresthe last two. Similarly lcolor() only obeys the first colourspecified.It's a bit more obvious if your first colour is other than black.Try:sts graph, by(drug) plotopts(lpattern("." "-" "-.-.") lcolor(redbluegreen))I don't have this problem with -graph twoway line yvar1 yvar2yvar3 xvar,lpattern(...) lcolor(...)-I'm using Stata/SE 64 bit on W/Vista with all latest updates. Ifsomeoneelse can reproduce this problem then StataCorp would need to have alook atthe code for -sts graph-. Phil Philip Ryan Professor and Director Data Management & Analysis Centre University of Adelaide -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of MichaelMcCullochSent: Monday, 24 May 2010 2:16 PM To: Statalist Statalist Subject: st: sts graph: specifying line pattern options Greetings, In v9 of Stata, I used to specify line pattern options in -sts graph-. In the example that follows, one group would be plotted in a solid line, one in dash, and one in long dash. All in black: *** begin example clear sysuse cancer.dta stset studytime, failure(died) version 9: sts graph, by(drug) lpattern(l - _) lcolor(black blue red) *** end example In v11, -lpattern()- needs to be contained within option -plotopts-, but in this example below, all three groups have the same line pattern and color: . sts graph, by(drug) plotopts(lpattern(l - _) lcolor(black blue red)) I tried "formula", but this makes all three groups sts graph, by(drug) plotopts(lpattern("l - _") lcolor(black blue red)) Any help would be appreciated, Michael McCulloch, LAc MPH PhD Pine Street Foundation 124 Pine Street San Anselmo, CA 94960-2674 tel: 415-407-1357 fax: 206-338-2391 * * 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/ * * 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/ * * 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/

Best wishes, Michael McCulloch, LAc MPH PhD Pine Street Foundation 124 Pine Street San Anselmo, CA 94960-2674 tel: 415-407-1357 fax: 206-338-2391 * * 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/

**References**:**st: sts graph: specifying line pattern options***From:*Michael McCulloch <mm@pinestreetfoundation.org>

**st: RE: sts graph: specifying line pattern options***From:*"Philip Ryan" <philip.ryan@adelaide.edu.au>

**st: RE: RE: sts graph: specifying line pattern options***From:*"Martin Weiss" <martin.weiss1@gmx.de>

- Prev by Date:
**Re: st: probit vs. logit** - Next by Date:
**Fw: st: RE: Proportional hazard assumption for interaction term** - Previous by thread:
**st: RE: RE: sts graph: specifying line pattern options** - Next by thread:
**st: RE: sts graph: specifying line pattern options - addendum** - Index(es):