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 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 1602 views
  • 6 likes
  • 2 in conversation