Data visualization with SAS programming

Graphs

Reply
Contributor
Posts: 38

Graphs

[ Edited ]

I need your helps. 

 

  1. for X axis i want pu max+100 and min-100 ranges, coz data changes every time and need to give automatically ranges.
  2. one line solid and second line shortdash (groupdisplay=cluster clusterwidth=0.5 lineattrs=(pattern=shortdash);
  3. need to drop labels for point and keep only for dashs. 

 

 

Photo attached Thanks a lot

 

 

proc sgplot data=final sganno=final pad=(bottom=14%);
	format dose dose. tmt box.;
	scatter x=dose y=mean / yerrorupper=UCLM yerrorlower=LCLM group=tmt
		groupdisplay=cluster clusterwidth=1
		markerattrs=(size=1 symbol=none);
	series x=dose y=mean / group=tmt groupdisplay=cluster
		clusterwidth=0.5 lineattrs=(pattern=shortdash);
	refline 26 / axis=x;
	refline 0 / axis=y lineattrs=(pattern=shortdash);
	xaxis type=linear values=(0 1 2 4 8 12 16 20 24 28) max=29
		valueshint display=(nolabel);
	yaxis label="Plasma &var2 Concentration (ng/mL)" values=(-100 to 1300 by 50);
	xaxis label="Time" values =(0 to 20 by 1);
	keylegend/ location=inside position=topright;
run;

 

Capture.PNG

Super User
Super User
Posts: 9,211

Re: Graphs

Look through this blog:

https://blogs.sas.com/content/graphicallyspeaking/

 

There are thousands of examples for all types of graphs and all options.  As you have not provided any code its pretty hard to answer.  The labels is simple (assuming your using proc sgplot/gtl, just label the point plot one name and don't use it in the legend statement).  The other two, range, get max from data, add 100, then block it up as you need the axis, and pass that as a dynamic variable.  The other about lines sound to me like your style needs updating.  

All these can be found as examples in the website given.

Contributor
Posts: 38

Re: Graphs

I have added
Ask a Question
Discussion stats
  • 2 replies
  • 191 views
  • 1 like
  • 2 in conversation