Hi!
I'm running this code, (It's a density plot).
what I want is to have the background grey, and the inside-blue. what I get is the background -grey and the inside -black!! Where can I change it? The "c=blue" option doesn't seem to affect anything.
Thanks in Advance!
Tal
GOPTIONS RESET=all;
axis1 order=(0 to .1 by 0.01) label=(f=swiss h=0.35 cm a=90 'Density') value=(h=2) minor=none;
axis2 label=(f=swiss h=0.35 cm'O3') order=(-10 to 140 by 10) length=6 in offset=(.5 cm) value=(h=1.5) minor=none origin=(1.5 in, 1.5 in);
Not sure I'm following, but if you're meaning the background of the whole page gray & the background inside the plot axes blue, then here's what you'd want...
goptions cback=gray;
symbol1 color=yellow value=dot interpol=none;
proc gplot data=sashelp.class;
plot height*age / cframe=blue;
run;
Message was edited by: Robert Allison @ SAS
Thanks for your answers!
What I want is the second option you mentioned, but the symbol's specified color doesn't seem to actually affect the graph's color
Thanks again!
GOPTIONS RESET=all
cback=white
;
pattern1 v=solid c=grey;
symbol1 v=none i=join c=purple( I tried all kind of colors. I want it to be blue- but none actually affects it, they all produced the same graph).
;
axis1 order=(0 to .1 by 0.01) label=(f=swiss h=0.35 cm a=90 'Density') value=(h=2) minor=none;
axis2 label=(f=swiss h=0.35 cm'O3') order=(-10 to 140 by 10) length=6 in offset=(.5 cm) value=(h=1.5) minor=none origin=(1.5 in, 1.5 in);
proc gplot data=dens_hh.densplot_O3_&stat. gout=work.c;
plot density * o3/
name="&stat.o3" areas=2;
Generally, the shaded area covers/obscures the line.
If you want a visible line, you can plot a 2nd line (in addition to the area), and overlay that on top of the first one. Something like this, where I added "close*date=2 / overlay" (and specify the desired line color in the symbol2 statement) ...
GOPTIONS- CBACK=white makes what I want. (white, like in the picture)
so does the color in the pattern statement. (light grey, like in the picture)
but the color in the symbol statement doesn't make the density plot area blue (in the picture it's dark grey)
Thanks,
Tal
PS For some reason i don't have the sashelp.stocks file in my sashelp library.
Hmm ... I guess you're using a version older than v9.2, and sashelp.stocks is a new v9.2 sample data set [note - I *strongly* encourage everyone to upgrade to v9.2, because it has _lots_ of neat new features, etc!]
Ok - there are basically *three* colors you want to control ...
1 - The background of the entire page (goptions cback='white')
2 - The background/area within the axes (cframe=gray)
3 - The area under the line (pattern1 v=s color=blue)
(the color of the symbol statement really has no impact, since the line generated by the symbol statement is obscured/covered by the solid-filled area.)
Here's an example (using v9.1.3 sample data) that demonstrates this:
goptions cback=white;
pattern1 v=solid color=blue; /* color of area below line */
symbol1 value=none interpol=join color=blue; /* not really visible */
axis1 label=(angle=90);
proc gplot data=sashelp.citiday (where=(date le '01jan1990'd));
plot snydjcm*date / areas=1
vaxis=axis1
cframe=graydd /* color of area above line */
;
run;
Message was edited by: Robert Allison @ SAS
Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.