Quantcast
Channel: Statistics Help @ Talk Stats Forum - SAS
Viewing all articles
Browse latest Browse all 310

Adjustment of colour and offset

$
0
0
Hey everyone,

Just a quick question.

Can anyone help me adjust the colour and the offset for the graph I've produced? Basically when you look at the graph, you can see 2 lines (ISO:2003 and ISO:2013). Now I want to make them different colours so they stand out more but having difficulty doing so.

Also, if you look at the graph, you can see that the edges of the graph go beyond (0,120) and (0,-120) and also (600,0). I've tried messing around with the offset but am kind of stumped as it won't fix.

I've attached to this post both my graph and copy and pasted my current SAS code :)

/*--Define data for the bands--*/
data bands;
input Grp $ xb lower upper;
datalines;
A 0 -15 15
A 75 -15 15
A 100 -20 20
A 200 -40 40
A 300 -60 60
A 400 -80 80
A 500 -100 100
A 600 -120 120
B 0 -15 15
B 100 -15 15
B 200 -30 30
B 300 -45 45
B 400 -60 60
B 500 -75 75
B 600 -90 90
;
run;

/*--Define data for band labels--*/
data labels;
xl=380; yl=100; label='DIN EN ISO 15197:2003'; output;
xl=500; yl=50; label='DIN EN ISO 15197:2013'; output;
run;

/*--Define data for some simulated data points--*/
data points;
keep x y;
do i=1 to 11;
x=600*ranuni(2);
y=240*ranuni(2)-120;
output;
end;
run;

/*--Merge all data into one data set--*/
data plot;
merge bands labels points;
run;

/*proc print;run;*/

/*--Make the Graph--*/
ods html close;
ods listing style=journal image_dpi=200;
ods graphics / reset width=5in height=3in imagename='Bland-Altman';
proc sgplot data=plot noautolegend;
title 'Blood Glucose Results';
band x=xb lower=lower upper=upper / group=grp outline nofill;
scatter x=x y=y;
scatter x=xl y=yl / markerchar=label;
refline 0;
xaxis grid offsetmin=0 offsetmax=0 label='YSI Plasma Result (mg/dL)';
yaxis grid values=(-120 to 120 by 20) label='Bias from YSI (mg/dL)';
run;


Thanks!
Attached Images
 

Viewing all articles
Browse latest Browse all 310

Trending Articles