Proc GPlot, data points labeling

Reply
Contributor
Posts: 42

Proc GPlot, data points labeling

Hi,

Thanks for all your help.

ID           A          B           BB      WEEK

1            5           10          .             0

2            4            8           8          20

3            3            9.           .           0

....

298         2           17         17         20

299         1           15            .         0

300         2            7           7         20

GOPTIONS INTERPOL = JOIN;

SYMBOL V = DOT;

PROC GPLOT  DATA = TEMP;

PLOT A * B = ID    A*BB / OVERLAY;

RUN;

My question:

DATA  TEMP: this is a longitudinal data, right now I am looking at week 00 and week 20. I want to visualize the data by using PROC GPLOT.

The first plot is A *B  by ID which has lots of lines in the plot, each line stands for one ID, by connecting two data points, one from week 00, another from week 20,

2nd plot is A*BB, BB is only keeping data points from week 20, so no lines, could be labeled as some stars for example.

I actually want to to use this step to label data points from week 20 on the lines from first plot, so I can tell the trend/direction from baseline to week 20 for each ID. 

I want to overlay these two plots. But I have warning from SAS log:

WARNING: OVERLAY option specified conflicts with Y*X=Z type plot request. OVERLAY option ignored.


Can you help with this problem? Mainly is about how to label the week 20/week 00 data points on those lines from 1st plot. Please let me know if I didn't explain my question clearly.

Thank you,

Cheese Cube


Super User
Posts: 10,550

Re: Proc GPlot, data points labeling

You might try:

PLOT A * B = ID ;

plot2   A*BB ;


Contributor
Posts: 42

Re: Proc GPlot, data points labeling

Thank you for your great help!

This gives overlay plots, but since I used GOPTIONS INTERPOL = JOIN; the plot 2 connected all the data points. What I want is only to show dots/stars in plot2, so all the data points from week20 are labeled as dots/starts

Anyway for these two plots not to share GOPTIONS INTERPOL = JOIN, but overlay still works? Thank you!

Super User
Posts: 10,550

Re: Proc GPlot, data points labeling

You might remove the interpol = join from Goption and add to the symbol statement (you may need to RESET goptions for this work).

I'm having a real hard time imagining what this graph might look like.

It may be that you actually want an Annotate data set.

Or possibly you might investigate proc g3d so you can explicitly show the week.

Ask a Question
Discussion stats
  • 3 replies
  • 557 views
  • 0 likes
  • 2 in conversation