BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
esjackso
Quartz | Level 8

I cant seem to solve this problem I am having, so I am hoping someone out in the community can spot my obvious syntax problem that Im not seeing. I am trying to convert a sgplot with highlow and scatter plots and a by statement to a sgpanel with panelby being the by variable. But the highlow part is not working (SAS turns the syntax red and the output only has the scatter). On this machine Im running 9.3 (TS1M2) if it matters.

The way I read the documentation is that this should be fine.

Thanks for any help!

EJ


sgpanel code.jpg
1 ACCEPTED SOLUTION

Accepted Solutions
DanH_sas
SAS Super FREQ

On the ODS GRAPHICS statement, specify the WIDTH and/or HEIGHT. If you specify only one of them, the other is calculated internally to maintain aspect. For example:

ods graphics / width=600px height=1000px;

The units can be in the standard units supported in ODS (px, in, cm, etc.)

- Dan

View solution in original post

6 REPLIES 6
DanH_sas
SAS Super FREQ

This should work, despite the red syntax. What messages do you get in the log?

esjackso
Quartz | Level 8

Thanks for the reponse Dan. I think the red syntax just threw me down the wrong path. I think it is working, just my graph scale is two small to see the lines. So now I need to figure out how to make the taller and wider. And the panel might not work anyway since I thought the y axis would be independently adjusted for each graph but it looks like its the same for all three. Output attached.

EJ


sgpanel output.jpg
DanH_sas
SAS Super FREQ

On the PANELBY statement, say UNISCALE=COLUMN and you will get what you want.

esjackso
Quartz | Level 8

Thanks Dan! That worked liked a charm. While we are on the subject whats the easiest way to get the output taller and wider?

EJ

DanH_sas
SAS Super FREQ

On the ODS GRAPHICS statement, specify the WIDTH and/or HEIGHT. If you specify only one of them, the other is calculated internally to maintain aspect. For example:

ods graphics / width=600px height=1000px;

The units can be in the standard units supported in ODS (px, in, cm, etc.)

- Dan

esjackso
Quartz | Level 8

Thanks again Dan!

That was painless!

EJ


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!

How to Concatenate Values

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.

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
  • 6 replies
  • 1125 views
  • 6 likes
  • 2 in conversation