I have a simple SAS data set I am plotting as a scatter plot, my two questions are:
- I am trying to adjust the y-axis without excluding the (0.02,51) data point but I need the y-axis to only show 60 to 160 by 20. When I define this it excludes that specific data point and I don't know how to fix it.
- I cannot figure out how to add a custom fitted curve and display the formula. Here is my line: Y=(160.3*x)/(0.0477+x)
Here is my code:
proc sgplot data=work.sas1;
title 'Puromycin Uptake Experiments';
scatter x=x y=y/ markerattrs=(color=black);
xaxis Label='Reactant Concentration X (mg/l)';
yaxis Label='Reaction Velocity Y (mg/s)' values=(60 to 160 by 20);
run;
Can anyone please help?
y axis
There are a couple y-axis options can affect the axis rendering. consider
offsetmin
or a tweaked list in thevalues=
formula line
There is no
formula
statement inSGPLOT
so you have to create an auxiliary column for drawing the formula in aseries
. Some times you can align the x's of the data with the x's of the formula. However, for the case of wanting a higher density of x's for the formula you stack the scatter and formula data. Don't get hung up on the chunks of missing values and any feelings of wastefulness.I am not sure where your curve fit comes from, but statistical graphics (the SG in SGPLOT) has many features for fitting data built into it.