Hi,
I am trying to use graphics schemes after years of typing a lot of msymbol(Oh) mcolor(black) etc etc. on every twoway command...
Anyway, I find the following problem.
I have twoway lfit y x plots and twoway scatter y x plots on the same plot, ie.,
twoway (scatter y x if s==1) (scatter y x if s==2) (lfit y x if s==1) (lfit y x if s==2)
So, I put in my scheme:
symbol p1 circle_hollow
symbol p2 diamond_hollow
symbol p3 triangle_hollow
symbol p4 square_hollow
color p1markline black
color p2markline blue
color p3markline red
color p4markline green
color p1lineplot black
color p2lineplot blue
color p3lineplot red
color p4lineplot green
I am trying to always get a hollow symbol and lfit line of the same color.
But, instead I get
plot 1 --> scatter plot that has Oh black (correct)
plot 2 --> scatter plot that has Dh blue (correct)
plot 3 --> lfit plot with a line that is red (WRONG)
plot 4 --> lfit plot with a line that is green (WRONG)
I say these are wrong because the scheme help file reads:
Entry Description
color p#lineplot colorstyle color for #th line plot
and also,
"For example, the entry color p3line yellow will make the third line plot yellow but will not affect the color of scatters, bars, or other plottypes"
But it seems like the scheme is actually just changing the color of the #th plot, not specifically the color of #th lineplot.
What am I missing? Is this an error in the documentation-- seems like that could be-- or why is graphics not keeping track of #th lineplot separately from #th plot?
Or any suggestion for a way to set this up. I do this kind of thing a lot-- scatter with lfits by strata s -- and would like to have a consistent color combination for up to, say, 5 levels of s. It is tedious and creates enormous surplus code to always specific symbols and colors in each twoway command-- and is prone to errors. So I would love to use schemes or some other way to automate this.
Scott
I am trying to use graphics schemes after years of typing a lot of msymbol(Oh) mcolor(black) etc etc. on every twoway command...
Anyway, I find the following problem.
I have twoway lfit y x plots and twoway scatter y x plots on the same plot, ie.,
twoway (scatter y x if s==1) (scatter y x if s==2) (lfit y x if s==1) (lfit y x if s==2)
So, I put in my scheme:
symbol p1 circle_hollow
symbol p2 diamond_hollow
symbol p3 triangle_hollow
symbol p4 square_hollow
color p1markline black
color p2markline blue
color p3markline red
color p4markline green
color p1lineplot black
color p2lineplot blue
color p3lineplot red
color p4lineplot green
I am trying to always get a hollow symbol and lfit line of the same color.
But, instead I get
plot 1 --> scatter plot that has Oh black (correct)
plot 2 --> scatter plot that has Dh blue (correct)
plot 3 --> lfit plot with a line that is red (WRONG)
plot 4 --> lfit plot with a line that is green (WRONG)
I say these are wrong because the scheme help file reads:
Entry Description
color p#lineplot colorstyle color for #th line plot
and also,
"For example, the entry color p3line yellow will make the third line plot yellow but will not affect the color of scatters, bars, or other plottypes"
But it seems like the scheme is actually just changing the color of the #th plot, not specifically the color of #th lineplot.
What am I missing? Is this an error in the documentation-- seems like that could be-- or why is graphics not keeping track of #th lineplot separately from #th plot?
Or any suggestion for a way to set this up. I do this kind of thing a lot-- scatter with lfits by strata s -- and would like to have a consistent color combination for up to, say, 5 levels of s. It is tedious and creates enormous surplus code to always specific symbols and colors in each twoway command-- and is prone to errors. So I would love to use schemes or some other way to automate this.
Scott
Comment