BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Mani2
Calcite | Level 5

Hi,

 

I have a figure that displays 0.1 - 10000 in Log 10 scale on the Y-axis.

 

Due to the nature of the data - the maximum value I have in the data is 1996.  Hence is it possible to display the Y-axis from 0.1 to 2000 using Log 10 scale?

 

I have tried the following in my PROC TEMPLATE code using VIEWMIN and VIEWMAX, but this did not work:

proc template ;
    define statgraph series_ratio;

    begingraph; discreteattrvar attrvar=groupvar var=groupvar attrmap="GROUPVAR";
    layout lattice / columns=2 columnweights=(0.5 0.5) columngutter=15pct;
        legendItem type=line name="q8w" / lineattrs=(color=blue pattern=1) label="Q8W";
        legendItem type=line name="q4w" / lineattrs=(color=red pattern=1)  label="Q4W";

      cell;
        layout overlay / yaxisopts=(label=("Plasma DRUG1 (ng/mL)") labelsplitchar="~" LABELFITPOLICY=SPLIT type=log logopts=(base=10 tickintervalstyle=logexpand minorticks=TRUE thresholdmin=1 thresholdmax=1 viewmin=0 viewmax=2000 ))

                         xaxisopts=(offsetmin=0.05 offsetmax=0.05 label=("Time since Last DRUG1 Injection (weeks)") labelsplitchar="~" LABELFITPOLICY=SPLIT
                                    linearopts=(viewmin=0 viewmax=60 tickvaluesequence=(start=0 end=60 increment=4) tickvaluefitpolicy=none));

           seriesplot x=arelwk_rpv y=aval_rpv / group=groupvar;
        endlayout;
      endcell;

      cell;
        layout overlay / yaxisopts=(label=("Plasma DRUG2 (ug/mL)") labelsplitchar="~" LABELFITPOLICY=SPLIT type=log logopts=(base=10 /*tickintervalstyle=logexpand*/ minorticks=TRUE thresholdmin=1 thresholdmax=1 viewmin=0 viewmax=20 ))

                         xaxisopts=(offsetmin=0.05 offsetmax=0.05 label=("Time since Last DRUG2 Injection (weeks)") labelsplitchar="~" LABELFITPOLICY=SPLIT
                                    linearopts=(viewmin=0 viewmax=60 tickvaluesequence=(start=0 end=60 increment=4) tickvaluefitpolicy=none));

               seriesplot x=arelwk_cab y=aval_cab / group=groupvar;
        endlayout;
      endcell;
    endlayout;

    layout globallegend / border=false;
        discretelegend "q8w" "q4w"/ title="Treatment    ";
    endlayout;
    endgraph;
end;
run;

 

Thanks,

 

Mani
Mani

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

Doesn't work is awful vague.

Are there errors in the log?: Post the code and log in a code box opened with the {i} to maintain formatting of error messages.

No output? Post any log in a code box.

Unexpected output? Provide input data in the form of data step code pasted into a code box, the actual results and the expected results. Instructions here: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.

 

 

Also, since this is a graphic issue then you need to post an example of the output and describe what is "wrong". For instance, did you expect a tick mark to appear at equivalent of 200? Of did some or all of your expected values not plot? With out your data or an example of the result it is real hard to guess what might not have "worked".

View solution in original post

1 REPLY 1
ballardw
Super User

Doesn't work is awful vague.

Are there errors in the log?: Post the code and log in a code box opened with the {i} to maintain formatting of error messages.

No output? Post any log in a code box.

Unexpected output? Provide input data in the form of data step code pasted into a code box, the actual results and the expected results. Instructions here: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.

 

 

Also, since this is a graphic issue then you need to post an example of the output and describe what is "wrong". For instance, did you expect a tick mark to appear at equivalent of 200? Of did some or all of your expected values not plot? With out your data or an example of the result it is real hard to guess what might not have "worked".

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 469 views
  • 0 likes
  • 2 in conversation