Hi,
Using gplot for the below graph
1) I want to add the value of reference value on Y-axis which is Y= 0.05. I am unable to find a way to do so.
2) on the X axis I want to display only a few tickers values(50, 60, 90, 100, 120, 150, 200). I am using the program below, but it is not working. The log does not give any error.
goptions reset=all ;
axis1 order = (0 to 1 by 0.25) offset = (3,0) label = (a=90 'Power') minor=none value=(h=0.7 t=0.05);
axis2 order=(50 to 210 by 10 )
major= none minor = none
label =(h= 1.0 'Sample size')
value= (h=0.7 t=50 '' t=60 '' t=90 '' t=100 '' t=120 '' t=150 '' t=200);
symbol1 i = join c = black l=1 value=dot;
symbol2 i = join c = red l=2 value=star ;
symbol3 i = join c = blue l=7 value=square;
symbol4 i = join c = vilg l=4 value=special;
symbol5 i = join c = purple l=5 value=special;
ods graphics on;
proc gplot data = longfintest;
*by prev ppv0;
plot power*n=test/ VAXIS=axis1 haxis=axis2 ;
run;
quit;
ods graphics off;
Desired Axis is as below
@roshni04 wrote:
Using gplot for the below graph
1) I want to add the value of reference value on Y-axis which is Y= 0.05. I am unable to find a way to do so.
How about the VREF= option of the PLOT statement?
2) on the X axis I want to display only a few tickers values(50, 60, 90, 100, 120, 150, 200).
I also want to label 50 as (20,30).
I don't understand this.
I am using the program below, but it is not working.
For your future benefit, but also for this thread, please do not say "it is not working" and then provide no other information. We can't help you. We need to know what part is not working, we need explanation, we need information.
Answer to both: You can use HAXIS or VAXIS as appropriate. It specifically says in the documentation
"For numeric variables, value-list is either an explicit list of values..."
Example
yaxis order=(0.05 0.25 0.5 0.75 1);
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
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.