BookmarkSubscribeRSS Feed
Fred7
Calcite | Level 5

Hi SAS communities,

I am trying to split the xasix values in two lines with PROC SGPLOT but it is not working.

 

Thanks for your idea.

 

ODS LISTING CLOSE;

ODS HTML style=custom_plot IMAGE_DPI=500 PATH="&libpath.\06_Outputs\" ;

ODS GRAPHICS ON / width=1000px height=600px IMAGENAME="Serology_PRPP_PII" reset=index border=off ;

proc sgplot data=graph noborder noautolegend;

scatter x=group y=val / group=exp jitter JITTERWIDTH=0.3 name="a" markerattrs=(symbol=circlefilled Size=9) groupdisplay=cluster clusterwidth=0.2;

SCATTER x=group y=GMT / name="b" markerattrs=( symbol=squarefilled color=DAGRAY Size=8) yERRORLOWER=lower10 yERRORUPPER=upper10 ERRORBARATTRS=(THICKNESS=2) GROUPDISPLAY=CLUSTER;

styleattrs datacontrastcolors=( red blue )

DATASYMBOLS=( circlefilled );

yAXIS TYPE=LOG LOGSTYLE=LOGEXPAND MINOR LOGBASE=10 LABEL="Individual titers, GMT and 95% CIs" ;

xaxis label="Group" type=discrete fitpolicy=SPLITALWAYS SplitChar="-" offsetmin=0.15 offsetmax=0.15 ;

xaxistable gmt / NOMISSINGCHAR stat=mean location=inside label="GMT" LABELATTRS=(Color=black Family=Arial Size=14) VALUEATTRS=(Color=black Family=Arial Size=14);

KEYLEGEND "a" / TITLE="Experiment" noborder location=outside position=bottom ;

format gmt 8.2 lower10 8.0 upper10 8.0;

format val yax. ;

run;

1 REPLY 1
Fred7
Calcite | Level 5
Found it. eror of typing

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


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
  • 1 reply
  • 462 views
  • 0 likes
  • 1 in conversation