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: Changing line color for more than 20 overlaid twoway line plots
From
Roth Florian <[email protected]>
To
"[email protected]" <[email protected]>
Subject
st: Changing line color for more than 20 overlaid twoway line plots
Date
Thu, 31 Jan 2013 17:06:19 +0100
Dear All,
I am trying to make a number of overlaid twoway line plots for a variable (e.g. var1-var22) in a wide panel data set.
For this I use the Stata command:
. twoway line var1-var22 Year
Now, I would like to change the line color of var2-var22 to grey and the line of var1 to black. So I use:
. twoway line var1-var22 Year, lcolor(black gs10 ...)
I then get the error:
. p21(line(color(blue)) area(linestyle(color(blue)))): too many arguments
It seem as if lcolor does not allow for more than 20 arguments.
Now, I could transform my data to long format and use - xtline - with options - overlay - and -plot#opts() -
but then I would have to set the color for every line separately. This is not very practical because I would like to
make the same plot for many different data sets with a varying number of line plots overlaid.
I care only about visually distinguishing var1 from the rest. So maybe there is a way to threat var2-var22 as a group.
Or is there any other way to change the line color for a number of overlaid line plots.
Thank you for your consideration.
Best regards,
Florian
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/