Desktop productivity for business analysts and programmers

Report + Gcharts on one page in pdf.

Posts: 56

Report + Gcharts on one page in pdf.


I'm trying to put in one page report table and few graphs, for this moment I've tried this example (it's seems to be rather simple), but the result differs from what it's supposed to be(

(SAS Enterprise Guide, PDF-results)

goptions reset=all;
options orientation=landscape;
data test;
input x y @@;
1 2 2 4 3 8 4 10 5 15
ods layout start width=8.3in height=11.7in;
ods region x=0.5in y=1.7in height=2.3in width=3.5in;
proc gplot data=test;
title2 'PLOT #1';
plot y*x /name="gr_1" noframe;
ods region x=4.25in y=1.7in height=2.3in width=3.5in;
title2 'PLOT #2';
plot y*x /name="gr_2" noframe;
ods layout end;

it shows 2 pages instead of 1, first with 'Start'-title, second with 2 graphs (and one graph is higher than another). Why is that?


I guess it's obvious but I haven't found any confirmation yet: is legend facility used only with stacked bar charts? What if I used Bar chart wizard (in SAS EG) and choose Vertical Colored Bar, is there any way to make legend (in code copy) to specify compliance between color and bar-value?

Posts: 56

Report + Gcharts on one page in pdf.

And there's another question:

is it possible to type values of another variable for V-bars (for example: sum of sales outside and number of them inside of V-bar, axis2 is some sort of time characteristic)?

Posts: 56

Report + Gcharts on one page in pdf.

I found the way to do it (by reorganazing my data and using: inside=freq outside=sum), but there's anoher problem: no inside values appear, as I read this can cause it:

     WARNING: Unsupported device 'ACTIVEX' for PDF(EGPDF) destination. Using device 'ACTXIMG'      (unfortunately i have it....)

and I' ve also noticed that if I use:

     goptions reset=all;

values appear in a right way, but other settings are totally unappropriate( I like those I have wihout 'reset'. What can I do then?

Maybe I should use 'reset' and then restore previous settings, but how to know which ones?

Super User
Posts: 11,105

Re: Report + Gcharts on one page in pdf.

GOPTIONS RESET=ALL does a reset to everything as you have found out. You can reset specific subsytems such as AXIS, FOOTNOTE, LEGEND, PATTERN, SYMBOL, and TITLE but from your text I don't think thats actually what you want. You don't say with "other settings are unappropriate" so can't provide specific help.

Typically I would use the reset= all once for a project and then set the specific items as needed before each chart. Set a specific device that PDF likes if you're worried about the warning and especially if the output isn't as desirec.

The STYLE in effect for your PDF output will also set fonts, colors and markers unless specifiec in such things as AXIS, LEGEND, PATTERN, SYMBOL and TITLE statements.

I am assuming that your question "is there any way to make legend (in code copy) to specify compliance between color and bar-value?" refers to the same category having the same display color/pattern in multiple charts. It seems that the default in SAS for color assignment is the first value displayed gets the first color in the list. The easiest way I've managed similar behavior is to 1) Ensure that each chart has data group has a record for each category even if the dispaly value is missing and 2) Make sure the sort order of the categorical variables is the same. Quite often I actually pre-summarize the data to get the sum, mean etc. so I can see which categories I need to add with missing values.

Posts: 56

Report + Gcharts on one page in pdf.

I forgot to mention: there are some additional parameters for ODS PDF specified in Tools -> Options :

     style=user_defined_pdf  notoc startpage=never

when I erase 'startpage=never' first page has graphs on it (and they are located on the same level), with it - only title and the next page. What option should I use then?


Super Contributor
Posts: 543

Re: Report + Gcharts on one page in pdf.

Could you provide an example (visual example) of what you want?

It's not very clear to me.


Ask a Question
Discussion stats
  • 5 replies
  • 3 in conversation