Data visualization with SAS programming

Error with Proc Gsilde using Annotate Facility

Reply
Frequent Contributor
Posts: 99

Error with Proc Gsilde using Annotate Facility

Hi everyone,

                        I am having error in using annotate facility with proc gsilde. Please help.

Thanks,

Amit

data:

functioncolorstylerotatexsysysyshsyswhensizexy
piegreenpsolid360223a0.70.298793402-0.071374623
piegreenpsolid360223a0.70.972524828-0.878230289
piegreenpsolid360223a0.71.530872005-0.917012611
piegreenpsolid360223a0.70.298711887-0.073254838
piegreenpsolid360223a0.70.299087504-0.069009284

Error:

proc gslide annotate=testa;

20         run;

NOTE: ERROR DETECTED IN ANNOTATE= DATASET WORK.TESTA.

NOTE: PROBLEM IN OBSERVATION     2 -

      DATA SYSTEM REQUESTED, BUT VALUE IS NOT ON GRAPH    'Y'        

NOTE: PROBLEM IN OBSERVATION     3 -

      DATA SYSTEM REQUESTED, BUT VALUE IS NOT ON GRAPH    'Y'        

        quit;

NOTE: There were 5 observations read from the data set WORK.TESTA.

NOTE: PROCEDURE GSLIDE used (Total process time):

      real time           0.09 seconds

      cpu time            0.10 seconds

             

SAS Employee
Posts: 967

Re: Error with Proc Gsilde using Annotate Facility

I usually use xsys='3' ysys='3', and x/y coordinates in the range 0-100 with gslides.

I've used xsys='2' ysys='2' (data coordinate system) with gplot and gmap (which have 'data'), but never tried using it with gslide.  How did you come up with your x/y coordinates, and what is the "data coordinate system" for a gslide?

Frequent Contributor
Posts: 99

Re: Error with Proc Gsilde using Annotate Facility

Hi Robert ,

                     I am a big fan of your work. looking forward to using your book.

                   I am trying to visualize network data. THe x and y cordinates come from proc MDS. I am using code  from paper " Visualizing Healthcare Provider Network using SAS tools" by John Zheng presented at PharmaSUG2011. He provides sample code for the annotate facility to visualize network of healthcare providers.

      I dont know what you mean by "data cordinate system" for a gslide.

        I appreciate all your help.

Regards,

Amit

Valued Guide
Posts: 763

Re: Error with Proc Gsilde using Annotate Facility

hi ... re "coordinate systems" ... take a look at ...

http://support.sas.com/documentation/cdl/en/graphref/63022/HTML/default/viewer.htm#annodata-creating...

and scroll down to coordinates (the attached illustration is from that page)

ps  by all means, by Robert's book ...

Amazon.com: SAS/GRAPH: Beyond the Basics (9781607649892): Robert Allison Ph.D.: Books

Attachment
Frequent Contributor
Posts: 99

Re: Error with Proc Gsilde using Annotate Facility

Hi Mike/Rob,

              

                        Since I am using real data , the data cordinate system would be Absolute (2). Xsys and ysys also would be 2. Thats what the paper also does.

     

                     Thanks for your help.

Regards,

Amit

SAS Employee
Posts: 967

Re: Error with Proc Gsilde using Annotate Facility

I think it would be easiest for you to use 'proc gplot' rather than 'proc gslide' (at least, to start with), using your annotate data set as both the data= and the annotate=, and using a symbol statement to make your gplot markers small (or invisible).  And you can use your xsys and ysys='2' like this.

Something like ...

symbol1 value=point interpol=none color=gray;

proc gplot data=testa annotate=testa;

plot y*x=1;

run;

Frequent Contributor
Posts: 99

Re: Error with Proc Gsilde using Annotate Facility

Hi Rob,

              Thanks for the work around. It definitely helps.

          

             I dont need the axis and also is there a way to  expand the size of the plot area to space things out. I know i have too many points.

   Thanks for your help.

Regards,

Amit

        Results:

        procgplot_output.gif

SAS Employee
Posts: 967

Re: Error with Proc Gsilde using Annotate Facility

You can suppress the axes using something like this...

axis1 label=none major=none minor=none value=none style=0;

proc gplot data=testa annotate=testa;

plot y*x=1 / vaxis=axis1 haxis=axis1;

run;

You might need to make the entire plot larger, so that you can see more detail.  Depending on how you're generating your output, you could use something like:

goptions xpixels=1000 ypixels=1000;

Frequent Contributor
Posts: 99

Re: Error with Proc Gsilde using Annotate Facility

Thanks for your help.

Ask a Question
Discussion stats
  • 8 replies
  • 659 views
  • 3 likes
  • 3 in conversation