The SAS Output Delivery System and reporting techniques

how to create a vertical line in ods pdf ?

Reply
Contributor
Posts: 24

how to create a vertical line in ods pdf ?

Hi,

Im creating a report using ods pdf. Im using layout keyword as well. How can i insert a vertical line at a given x,y value ?

Thank  you

SAS Super FREQ
Posts: 8,868

how to create a vertical line in ods pdf ?

Hi:

  You say that you are creating a report, but you do not say what your procedure of choice is. Generally speaking, SAS procedures create 2 distinct types of reports -- tabular reports and graphical reports. Tabular reports do not have X,Y values -- they have report rows which represent either observations or calculated statistics or some type of analysis. Graphical reports can have X,Y values, in that the X axis is generally a midpoint axis and the Y axis is generally the response axis. Using the ANNOTATE facility, you can draw a line, overlaid on a graphical image, based on X,Y coordinates.

  Without knowing what procedure you are using to create your ODS PDF output file, this is a hard question to answer, especially since you say that you are also using ODS LAYOUT (which is experimental). I would recommend that you open a track with Tech Support on this question, as they can look at all your code and your data and your experimeantal ODS LAYOUT statements and see whether there a way to insert a line into your output.

cynthia

Contributor
Posts: 24

how to create a vertical line in ods pdf ?

Posted in reply to Cynthia_sas

Hi.

im generating a pdf page with two charts(Coming from two datasets).(using proc gplot then wrapping it in a ods region) I want to add a vertical seperator between those two charts). Hope this explanation is sufficient

Thanks

Super User
Posts: 10,035

how to create a vertical line in ods pdf ?

In the Arther Carpenter 's book complete guide to sas report process , I found this:

ods pdf style=default file="c:\temp\line.pdf" startpage=never;
proc report data=sashelp.class nowd;
run;
%annomac
* Build the annotate data set;
data Annolines;
length function color $8;
retain xsys ysys '5';
* Syntax for the LINE macro;
*LINE (x1, y1, x2, y2, color, line_type, size);
%line(.5,69.6,50.5,69.6,blue,1,30)
%line(.5,80.5,50.5,80.5,red,1,30)
%line(42.2,67,42.2,94,green,1,30)
run;
* Use the annotate data set;
proc gslide anno=annolines;
run;
quit;
ods _all_ close;

Ksharp

Contributor
Posts: 24

how to create a vertical line in ods pdf ?

Thanks ksharp,

I have couple of questions on the above code.

Is the macro "line" an inbuild macro ? i cannot find the macro.

Do i have to use the sas annonate if i to use this line macro ?

Thanks.

SAS Super FREQ
Posts: 8,868

how to create a vertical line in ods pdf ?

Hi:

  The ANNOTATE facility has a group of "autocall" macro programs that, used with SAS/GRAPH, simplifies the use of the ANNOTATE facility. So this is not an instream compiled macro program. Since it lives in the autocall location, it is loaded when needed. Every time you use these ANNOTATE macro programs, however, you must precede your usage with a reference to the organizing macro program %ANNOMAC -- which actually compiles the annotate macro programs for usage. You can read about them here:

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

cynthia

Contributor
Posts: 24

how to create a vertical line in ods pdf ?

Posted in reply to Cynthia_sas

Thanks cynthia.

I ll try it out and let you know how it goes. Smiley Happy

Contributor
Posts: 24

how to create a vertical line in ods pdf ?

Using ANNONATE facility i was able to solve my issue.


Thanks.

Valued Guide
Posts: 634

how to create a vertical line in ods pdf ?

Thank you for pointing out this example Ksharp.  Somehow I had missed the thread.  This technique was, as far as I know, pioneered by Pete Lund of Looking Glass Analytics.

Ask a Question
Discussion stats
  • 8 replies
  • 928 views
  • 6 likes
  • 4 in conversation