BookmarkSubscribeRSS Feed
Quartz | Level 8

Hi community,

Recently I received an update request for the figure I have done before, but the update is so specific that I couldn't find any appropriate solution for it.
So I decided to ask here.
Below is the figure which needs to be updated.

box plot.PNG

Here is the update requested.

“During the review of the response, It was noted that for these figures the EOT boxes should not be connected with the others”. (The part highlighted above).

I think I found the responsible part in the macro (%mf_boxplot) which is created connecting lines. (I am calling the macro in the actual program).


Below is the macro calling with input parameters.

%mf_boxplot(data   = datin,					/*lab dataset to plot*/
            		rsl    = aval,				/*lab results variable to plot*/
            		grpvar = avisitn,	   		/*group by variable*/
            		grpfmt = avisit.,			/*group by variable format*/
            		symvar = trt,				/*treatment variable*/
			symfmt = $trt.,			     	/*treatment variable format*/
			symlab = Treatment,			/*treatment label*/
            		connect= median,			/*point to connect between boxplots*/
            		percent= 10,
			hlabel  = Visit,
			vlabel  = %BQUOTE(&test),
			ymax    = &ymax,
			t      = t,					/*Draws tops and bottoms on the whiskers*/
			bwidth = 1					/*Width of boxplots*/

So the actual problem is to remove the connecting line between last visit and EOT.

Could anyone please give some idea on this.
Any response will be helpful.

Thanks in advance.

Super User

When using GPLOT we would need:

1) any AXIS and SYMBOL statements in effect

2) The appropriate GPLOT code without any macro references

3) data set to test code, likely only need a couple of values of something that behaves like your &rel &grpvar and &connect


A typical approach would be to have the data so that your problem group was actually plotted with a different Y variable using a different Symbol statement and OVERLAY.


Please post code as text by copying from the editor or log and pasting into a code box opened using the forum's {I} or "running man" icon.

I can't copy code and may suggested changes to a picture and likely won't feel like retyping huge amounts of code the show the appropriate location .


The plot statement might look something like

Plo2t &connect*&grpvar=1 EOTYvariable*&grpvar=2  / overlay

Where the EOT value is a different variable than the current &connect. You may need to modify the Plot statement similarly using different symbol references. I haven't done a box plot in GPLOT for likely 8 years and nuances get lost.

I have to guess that your macro variables in the Plot statement are single variable references. If they are something else.


I would also be likely to move this from GPLOT to SGPLOT as there are lots more options there and a SAS/Graph license is not longer needed.



Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg



Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 2 in conversation