Data visualization with SAS programming

Set the size of a graph when using sgplot and sgpanel

Reply
Contributor
Posts: 33

Set the size of a graph when using sgplot and sgpanel

Hi

Does anyone know how to specify the width and height of the graph that is generated from a proc sgplot and sgpanel? I have a simple barchart where i use sgplot and a grouped barchart where I use sgpanel.

The actual size is set to 480*640px.

Thanks in advance
Jenny
SAS Super FREQ
Posts: 863

Re: Set the size of a graph when using sgplot and sgpanel

You can set the size on the ODS GRAPHICS statement. The options are WIDTH and HEIGHT. If you set only one of those values, the aspect of the graph is maintained, but you can set both values if there is a specified aspect you want. Be sure to put the unit after the number your set, e.g. 100px, 2in, 5cm, etc.
Contributor
Posts: 33

Re: Set the size of a graph when using sgplot and sgpanel

Thanks!
Post a Question
Discussion Stats
  • 2 replies
  • 144 views
  • 0 likes
  • 2 in conversation