Data visualization with SAS programming

need a help creating broken x-axis sgplot

Reply
Occasional Contributor
Posts: 8

need a help creating broken x-axis sgplot

Treatment_NoTimeSubjectSubject_GroupDayPeriodConcDose
B011120125
B0.5111295.9125
B11112381125
B21112646125
B31112751125
B411121130125
B611121070125
B81112965125
B121112919125
B241112729125
B481112234125
B72111267.3125
B96111218.4125
B12013280
B01152060
B0.5115211160
B11152102060
B21152121060
B31152113060
B41152126060
B6115285560
B8115277860
B12115275760
B24115278060
B48115217760
B72115249.660
B9611521660

I have this hypothetical datasets and i am trying to generate the conc*time. I need day 1 time start from the 0-96 hr  (x-axis), then need a gap on x-axis for Day 2 and then start day 3  time 0 to 96 hr on x-axis.

Here is what i did, i converted the day 2 and day 5 time by multiplying time by 24 hr. This gave me continuous time from 0 to let say 234 (dont quote on this) hr and plot the data using the below code.The problem is plot gave me x-axis tick 0-234, as expected. However, I need x-axis tick 0-96 (day1), day2, 0-96 (day5).

goption reset=global;

axis1 value=(font=swissb h=0.2800 cm)

label=(font=swissb h=0.2800 cm "Time (hr)")

offset=(2 pct,)

minor=none

order=(0 to 240 by 12);

axis2 value=( font=swissb justify=right h=0.3000 cm)

offset=(2 pct,)

minor=none

logbase= 10

/*order=(0 to 1200 by 100)*/

label=(font=swissb angle=90 h=0.4800 cm " Concentration (ng/mL)");

proc gplot data=B;

PLOT conc*time /  HAXIS=AXIS1 VAXIS=AXIS2 nolegend noframe des="" skipmiss;

symbol1 c=black interpol=joine l=1 w=1 r=1;

run;

Thanks

SAS Super FREQ
Posts: 939

Re: need a help creating broken x-axis sgplot

What version of SAS are you using?

Ask a Question
Discussion stats
  • 1 reply
  • 345 views
  • 0 likes
  • 2 in conversation