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
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
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
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
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.
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:
cynthia
Thanks cynthia.
I ll try it out and let you know how it goes.
Using ANNONATE facility i was able to solve my issue.
Thanks.
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.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.