Data visualization with SAS programming

NOTE: The graph will be rendered as an image due to the use of broken axes.

Reply
Respected Advisor
Posts: 3,832

NOTE: The graph will be rendered as an image due to the use of broken axes.

I have this code with IMAGEFMT=EMF.  Is there a way to have my EMF and broken axis too?

 

   proc sgplot data=analysis;
      series x=avisitn y=estimate / group=trt01pn GROUPDISPLAY=CLUSTER break markers CLUSTERWIDTH=&cw name='a';
      highlow x=avisitn high=UCLMean low=LCLMean / group=trt01pn GROUPDISPLAY=CLUSTER CLUSTERWIDTH=&cw lineattrs=(pattern=1) LOWCAP=SERIF HIGHCAP=SERIF;
      xaxis values=(0 2 8 10 12) ranges=(0-2.5 7.5-12) display=(nolabel);
      yaxis values=(-90 to 40 by 10) label='Percent Change from Baseline';
      keylegend 'a' / title='';
      xaxistable n / location=outside class=xtrt01pn colorgroup=trt01pn title='';
      format avisitn xweek. trt01pn xtrt. xtrt01pn x2trt.;
      run;
SAS Super FREQ
Posts: 1,264

Re: NOTE: The graph will be rendered as an image due to the use of broken axes.

Posted in reply to data_null__

Yes, there are some issues with rendering the default broken axis break region with EMF, due to lack of some clipping shapes.  You can try changing the  AXISBREAK option (= SQUIGGLE | BRACKET | NOTCH | SLANTEDLEFT | SLANTEDRIGHT | SPARK | Z) to BRACKET to see if that will work.  The break will be shown only on the axis only.

Respected Advisor
Posts: 3,832

Re: NOTE: The graph will be rendered as an image due to the use of broken axes.

Posted in reply to Sanjay_SAS

Sanjay_SAS wrote:

Yes, there are some issues with rendering the default broken axis break region with EMF, due to lack of some clipping shapes.  You can try changing the  AXISBREAK option (= SQUIGGLE | BRACKET | NOTCH | SLANTEDLEFT | SLANTEDRIGHT | SPARK | Z) to BRACKET to see if that will work.  The break will be shown only on the axis only.


I tried that but I still got the message and no EMF.  I was able to produce an acceptable EMF version by switching X axis to TYPE=DISCRETE and annotating \\ on the X axis between weeks 2 and 8.

Ask a Question
Discussion stats
  • 2 replies
  • 117 views
  • 0 likes
  • 2 in conversation