DATA Step, Macro, Functions and more

proc gplot

Reply
Contributor
Posts: 72

proc gplot

I am plotting a graph with two plots inside proc gplot. One of the variable is having all the missing observation. Due to this other variables are also not plotted. If i put this observation at the end then the graph will be plotted.
Please Let me know what is the solution
Super Contributor
Super Contributor
Posts: 3,174

Re: proc gplot

For this type of post, it is best to at least share your SAS code, ideally as part of your SAS log pasted in your post or reply to your own post.

Scott Barry
SBBWorks, Inc.
Contributor
Posts: 72

Re: proc gplot

NOTE: 19 observation(s) contained a MISSING value for the TRIAL_PATIENTS_PLAN * PERIOD_END_DATE
request.
NOTE: 19 observation(s) contained a MISSING value for the TRIAL_PATIENTS_ACTUAL * PERIOD_END_DATE
request.
NOTE: 19 observation(s) contained a MISSING value for the TREAT_PATIENTS_ACTUAL * PERIOD_END_DATE
request.


Other than that my data set has many missing observations. If i make the missing observation to 0 then it plots. but i dont need 0 to be plotted in my graph.
Super Contributor
Super Contributor
Posts: 3,174

Re: proc gplot

Please share your SAS code, not just the SAS NOTEs.

Possibly you have a data problem to address - would you expect the "missing value" condition.

What are you hoping to get back from the forum subscribers input/feedback?

Again - you really need to post your SAS code as it occurs in the SAS-generated log -- you may need to add the statement below to get the most diagnostic output:

OPTIONS SOURCE SOURCE2 MACROGEN MPRINT;

Scott Barry
SBBWorks, Inc.
Contributor
Posts: 72

Re: proc gplot

I dont have any problem in sharing the code. But its a big program and with lot of dependent data.

I am able to get succeed about 80% on this problem. Now i am stuck with order of the axis. If i dont mention the by value in order value then the order is clustered. These orders are dynamic always. For .eg
In axis if i put order = 1(a) to 100000(b) by 1000(c) - It works fine with beautiful graph
But if put order = 1(a) to 100000(b) then the graph is clustered.
Problem is i do know the a and b. But determing the c is becoming challenge for me.
Super Contributor
Posts: 291

Re: proc gplot

I think you might mean cluttered rather than clustered.
If that's the case, you will want to limit the number of major tick marks. This can be done without specifying the increment c with an axis statement option such as
axis1 minor=none
major=(n=5)
;
If you add order, it might still get messy.
Another option might be to use proc means to find the min & max of the data for each variable and then run the results through a data step to round the min & max values, calculate an increment, and then output them to macro variables. These macro variables are then used in the axis statement, e.g. order=&min to &max by &incr.
Ask a Question
Discussion stats
  • 5 replies
  • 172 views
  • 0 likes
  • 3 in conversation