BookmarkSubscribeRSS Feed
need_some_help
Calcite | Level 5

Hi!

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 @@;
datalines;
1 2 2 4 3 8 4 10 5 15
;
run;
title1"Start";
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;
run;
ods region x=4.25in y=1.7in height=2.3in width=3.5in;
title2 'PLOT #2';
plot y*x /name="gr_2" noframe;
run;
quit;
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?

P.S.

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?

5 REPLIES 5
need_some_help
Calcite | Level 5

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)?

need_some_help
Calcite | Level 5

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?

ballardw
Super User

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.

need_some_help
Calcite | Level 5

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?

    

AncaTilea
Pyrite | Level 9

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

It's not very clear to me.

Thanks.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 1017 views
  • 0 likes
  • 3 in conversation