I need to plot some data in a scatter plot, put the y-axis on a log scale, and plot an exponential line through the data. Any advice you have would be SO greatly appreciated. what am i doign wrong?
thank you!
data genexpert;
input cartridges diagnosis;
cards;
11160 7.97
12420 51.3
2220 1.77
11160 7.7
11940 103
4270 3.6
110110 459
5200 135
11670 3
20920 69.3
19100 305
31440 409
37500 135.4
24230 30.1
1388450 109
6260 108.4
23100 29.9
15400 650
14300 170
;
run;
procgplot data=genexpert;
plot cartridges*diagnosis;
symbol I=r;
title'GeneXpert Cartridges Ordered v. Percentage Increase in MDR-TB Diagnosis';
label diagnosis='Percentage increase in MDR-TB diagnosis'
cartridges='Number of GeneXpert cartridges ordered by country';
axis2 logbase=e logstyle=expand;
run;
You haven't told the plot statement how to associate the axis statement with the y axis and the symbol statement has been told not to display the scatter points (no Value option). Also you need to end the proc with a QUIT statement.
See if this helps:
axis2 logbase=e logstyle=expand;
symbol I=r v=dot;
proc gplot data=genexpert;
plot cartridges*diagnosis/vaxis=axis2;
title'GeneXpert Cartridges Ordered v. Percentage Increase in MDR-TB Diagnosis';
label diagnosis='Percentage increase in MDR-TB diagnosis'
cartridges='Number of GeneXpert cartridges ordered by country';
run;
quit;
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.