BookmarkSubscribeRSS Feed
Anthony_eng
Obsidian | Level 7

Hello,

I am trying to create a graph that has multiple plots.  The data should all have the same general behavior, but over different timeframes.  I have uploaded an example similar to what I will be plotting.

ExampleGraph.png

My data currently has time on the x-axis rather than the synchrony level shown above.  I want all plots to be anchored or joined at the data point indicated by the number 3 in the image above (once the Y-values begin rising significantly).  The reason for this is because the data has different timeframes for the overall experiment (the rise in values does not always occur at the same time), but I need to analyze outliers based on differences between the plots and linking them when the y-value increases will be instrumental in doing this.  

 

 

DATA WORK.VALUE;
	FORMAT
	EXPERIMENTKEY
	Description
	TIMESTAMP
	Translated;
	SET WORK.TRANSLATED;
	ResponseTimeMS = dif(TIMESTAMP);
	ValueDifference = dif(Translated);
	ResponseTime=ifn(first.EXPERIMENTKEY, ., dif(TIMESTAMP));
	difValue=ifn(first.EXPERIMENTKEY, ., dif(Translated));
	IF (difValue < 100) THEN DO;
		TransitionLowToHigh = 'N';
		END;
	ELSE TransitionLowToHigh = 'Y';
	BY EXPERIMENTKEY TIMESTAMP;
RUN;

 

My idea was to use the first TransitionLowToHigh with a Y value as a way to join the plots at that time.  Unfortunately I don't know that it is possible.  Is there a way to do this in SAS?

2 REPLIES 2
Reeza
Super User
You don't show data (code but we don't have the data to run it) and you don't show a graph of what you're trying to create. Even showing a hand drawn image would help.

I can see about three ways of anchoring given your description so please clarify what you're trying to achieve.
Anthony_eng
Obsidian | Level 7

Hi Reeza,

Thank you for the reply.  I have attached a picture of the plots with circles indicating the points that I am trying to anchor/join.  I would like to shift the data to the data plotted on the far right, but am open to any method that allows me to anchor/join the data at the requested points.Want the circled areas to be shifted horizontally so that each data group 'rises' at the same point on the x-axis.Want the circled areas to be shifted horizontally so that each data group 'rises' at the same point on the x-axis.

My data follows:

EXPERIMENTKEYTranslatedTIMESTAMPTransitionLowToHigh
72040654788330N
72040654793677N
720406547951015N
720406547961380N
720406547951765N
720406548088168N
7204065480214608N
7204065480121049N
7204065480221408N
7204065480321763N
7204065480922115N
7204065480422468N
7204065480522822N
7204065480423181N
7204065482623536N
7204065498923886Y
72040654121224238Y
72040654137224588Y
72040654145724943N
72040654149825318N
72040654151625715N
72040654152326079N
72040654170932480Y
72040654168238861N
72040802669338N
72040802670696N
720408026751073N
720408026741433N
720408026641788N
7204080269249776N
7204080268950135N
7204080270050500N
7204080269850850N
7204080269251215N
7204080269151573N
7204080268851930N
7204080269352292N
7204080268652655N
7204080268853013N
7204080267953386N
7204080267653748N
7204080266854094N
7204080268654469N
7204080268454826N
7204080267855202N
7204080268355552N
7204080268655904N
7204080269456257N
7204080268456609N
7204080268756955N
7204080270857342N
72040802129257707Y
72040802260058082Y
72040802329258453Y
72040802283058833N
72040802222059209N
72040802164459588N
72040802183359949Y
72040802201060323Y
72040802215160673Y
72040802219367135N
72040802227273605N
72041266697338N
72041266706702N
720412667041100N
720412667011506N
720412666961875N
720412667018320N
7204126670314740N
72041266203921201Y
72041266204421602N
72041266204621961N
72041266206622325N
72041266208822693N
72041266212929113N
72041266211935532N
72041296809805N
720412968071719N
720412968152613N
720412968263468N
720412968284347N
720412968055971N
720412968317608N
720412968239259N
7204129682110954N
7204129682312587N
7204129680614268N
7204129684715922N
7204129680017572N
7204129681719207N
7204129683820852N
7204129679621710N
7204129680822550N
7204129683123393N
7204129681324356N
7204129683325257N
7204129683626071N
7204129682926910N
7204129682627769N
7204129681328644N
7204129683929464N
7204129683430306N
7204129682531155N
7204129682031996N
7204129684432840N
7204129684033684N
7204129681534560N
7204129681135378N
7204129681136219N
7204129682137077N
7204129681037948N
7204129683538764N
7204129683139604N
7204129681140450N
7204129684241296N
7204129683042140N
7204129682542985N
7204129684743844N
7204129681644667N
7204129680745505N
7204129683546342N
7204129680947162N
7204129683148000N
7204129682748842N
7204129683649685N
7204129682250556N
7204129681751457N
7204129682152332N
7204129684753175N
7204129681354021N
7204129682954899N
7204129680755768N
7204129683756582N
7204129680957424N
7204129684858281N
7204129682859157N
7204129681859987N
7204129684160851N
7204129682161706N
7204129681962565N
7204129678463429N
7204129683764289N
7204129684065107N
7204129678965942N
7204129680366804N
7204129681467641N
7204129685368487N
7204129683369336N
7204129681470162N
7204129680670989N
7204129683871859N
7204129681772723N
7204129683073537N
7204129682774378N
7204129684475252N
7204129683876127N
7204129682176940N
7204129680077779N
7204129682278637N
7204129683679557N
7204129680780377N
7204129685481214N
7204129678882055N
7204129681282864N
7204129682783701N
7204129681584567N
7204129683885404N
7204129682186249N
7204129682487092N
7204129682887966N
7204129682188783N
7204129683089627N
7204129685290455N
7204129682791280N
7204129679692145N
7204129682893003N
7204129681093862N
7204129681794739N
7204129682995556N
7204129681996412N
7204129680397249N
7204129681298093N
7204129682198904N
7204129681099749N
72041296796100616N
72041296831101437N
72041296810102274N
72041296818103121N
72041296837103978N
72041296823104802N
72041296848105646N
72041296827106539N
720412961597107432Y
720412962145108274Y
720412961426109117N
720412962140109934Y
720412962523110780Y
720412962313112418N
720412962367114055N
720412962385115717N
720412962406117369N
720412962427119005N
720412962367120654N
720412962310122354N
720412962291124047N
720412962310125666N

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 2 replies
  • 295 views
  • 0 likes
  • 2 in conversation