BookmarkSubscribeRSS Feed
cathy_sas
Calcite | Level 5

Hi All,

 

I am trying to get a plot using sgpanel. i am able to get the plot, but right side of the plot having more space(red color). i used offsetmax & offsetmin option in rowaxis & colaxis aswell. any insight will be helpful.

 

Below is my code:

proc sgpanel data=final;

    panelby grp/layout=columnlattice  novarname onepanel colheaderpos=top  ;
    needle x=subid y=val/ group = subject  LINEATTRS = (COLOR= gray PATTERN = 1 THICKNESS = 3) ;;;
    rowaxis label='Change (%)' offsetmin=0.01 offsetmax=0.01 values=(-125 to 250 by 50) ;
    colaxis display=(novalues noticks) offsetmin=.01 offsetmax=.01 min=0.1 max=.01;
    refline -25/lineattrs=(pattern=4);
    refline -50/lineattrs=(pattern=2);
    refline 25/lineattrs=(pattern=4);
    refline 50/lineattrs=(pattern=2);

 
run;

 

Capture.PNG

 

Thanks

Cathy

 

 

1 REPLY 1
Rick_SAS
SAS Super FREQ
Without your data it is hard to advise you, but try using the VALUESHINT option on the ROWAXIS statement. You have used the VALUES= option to explicitly set the range of the axis. If the largest data value is 2015, the plot is still going to use 250 as the largest tick value. The ValuesHint option tells the plot that the maximum axis value should be determined independently of the VALUES= option

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
  • 1 reply
  • 706 views
  • 1 like
  • 2 in conversation